2 * Copyright (c) 2015 Google, Inc
3 * Written by Simon Glass <sjg@chromium.org>
5 * SPDX-License-Identifier: GPL-2.0+
12 int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
14 struct pch_ops *ops = pch_get_ops(dev);
17 if (!ops->get_spi_base)
20 return ops->get_spi_base(dev, sbasep);
23 int pch_set_spi_protect(struct udevice *dev, bool protect)
25 struct pch_ops *ops = pch_get_ops(dev);
27 if (!ops->set_spi_protect)
30 return ops->set_spi_protect(dev, protect);
33 int pch_get_gpio_base(struct udevice *dev, u32 *gbasep)
35 struct pch_ops *ops = pch_get_ops(dev);
38 if (!ops->get_gpio_base)
41 return ops->get_gpio_base(dev, gbasep);
44 int pch_get_io_base(struct udevice *dev, u32 *iobasep)
46 struct pch_ops *ops = pch_get_ops(dev);
49 if (!ops->get_io_base)
52 return ops->get_io_base(dev, iobasep);
55 UCLASS_DRIVER(pch) = {
58 .post_bind = dm_scan_fdt_dev,