1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2015 Google, Inc
4 * Written by Simon Glass <sjg@chromium.org>
11 int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
13 struct pch_ops *ops = pch_get_ops(dev);
16 if (!ops->get_spi_base)
19 return ops->get_spi_base(dev, sbasep);
22 int pch_set_spi_protect(struct udevice *dev, bool protect)
24 struct pch_ops *ops = pch_get_ops(dev);
26 if (!ops->set_spi_protect)
29 return ops->set_spi_protect(dev, protect);
32 int pch_get_gpio_base(struct udevice *dev, u32 *gbasep)
34 struct pch_ops *ops = pch_get_ops(dev);
37 if (!ops->get_gpio_base)
40 return ops->get_gpio_base(dev, gbasep);
43 int pch_get_io_base(struct udevice *dev, u32 *iobasep)
45 struct pch_ops *ops = pch_get_ops(dev);
48 if (!ops->get_io_base)
51 return ops->get_io_base(dev, iobasep);
54 UCLASS_DRIVER(pch) = {
57 .post_bind = dm_scan_fdt_dev,