2 * Copyright (c) 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
12 DECLARE_GLOBAL_DATA_PTR;
14 int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
16 struct pch_ops *ops = pch_get_ops(dev);
19 if (!ops->get_spi_base)
22 return ops->get_spi_base(dev, sbasep);
25 int pch_set_spi_protect(struct udevice *dev, bool protect)
27 struct pch_ops *ops = pch_get_ops(dev);
29 if (!ops->set_spi_protect)
32 return ops->set_spi_protect(dev, protect);
35 int pch_get_gpio_base(struct udevice *dev, u32 *gbasep)
37 struct pch_ops *ops = pch_get_ops(dev);
40 if (!ops->get_gpio_base)
43 return ops->get_gpio_base(dev, gbasep);
46 int pch_get_io_base(struct udevice *dev, u32 *iobasep)
48 struct pch_ops *ops = pch_get_ops(dev);
51 if (!ops->get_io_base)
54 return ops->get_io_base(dev, iobasep);
57 UCLASS_DRIVER(pch) = {
60 .post_bind = dm_scan_fdt_dev,