diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 21:32:30 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | 6d349e2e435340bf27c8f567f7607eaaba2ee77c (patch) | |
tree | aff095f18aee2b5d3ee479f8ed9c1c879fdbc557 /include | |
parent | 4b0ec52b9ee52de7aabb05c6a8386c0b788d2271 (diff) | |
download | u-boot-6d349e2e435340bf27c8f567f7607eaaba2ee77c.tar.gz |
p2sb: Add a method to hide the bus
The P2SB bus needs to be hidden in some cases so that it does not get
auto-configured by Linux. Add a method for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Tested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/p2sb.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/include/p2sb.h b/include/p2sb.h index 74eb08b7ff..93e1155dca 100644 --- a/include/p2sb.h +++ b/include/p2sb.h @@ -31,14 +31,37 @@ struct p2sb_uc_priv { }; /** - * struct p2sb_ops - Operations for the P2SB (none at present) + * struct p2sb_ops - Operations for the P2SB */ struct p2sb_ops { + /** + * set_hide() - Set/clear the 'hide' bit on the p2sb + * + * This device can be hidden from the PCI bus if needed. This method + * can be called before the p2sb is probed. + * + * @dev: P2SB device + * @hide: true to hide the device, false to show it + * @return 0 if OK, -ve on error + */ + int (*set_hide)(struct udevice *dev, bool hide); }; #define p2sb_get_ops(dev) ((struct p2sb_ops *)(dev)->driver->ops) /** + * p2sb_set_hide() - Set/clear the 'hide' bit on the p2sb + * + * This device can be hidden from the PCI bus if needed. This method + * can be called before the p2sb is probed. + * + * @dev: P2SB device + * @hide: true to hide the device, false to show it + * @return 0 if OK, -ve on error + */ +int p2sb_set_hide(struct udevice *dev, bool hide); + +/** * pcr_read32/16/8() - Read from a PCR device * * Reads data from a PCR device within the P2SB |