aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/include/intelblocks
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@chromium.org>2019-06-06 15:35:11 -0600
committerPatrick Georgi <pgeorgi@google.com>2019-07-19 17:14:35 +0000
commitef0c2265d73004860a7b18ae5e0f9cb1accfb869 (patch)
tree30a46e55b35a4531adfc43e6b91f9064a1a2ec33 /src/soc/intel/common/block/include/intelblocks
parent0f718312f1b57ec300b7486c95e53562be5a2325 (diff)
soc/intel/common/block/xhci: Add API to disable USB devices
Add API to disable USB devices that are not present but are configured in the device tree either after probing the concerned port status or as explicitly configured by the variants. BUG=None BRANCH=octopus TEST=Boot to ChromeOS. Change-Id: Ied12faabee1b8c096f2b27de89ab42ee8be5d94d Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33377 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/common/block/include/intelblocks')
-rw-r--r--src/soc/intel/common/block/include/intelblocks/xhci.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/include/intelblocks/xhci.h b/src/soc/intel/common/block/include/intelblocks/xhci.h
index 492c32a002..dd95bfb024 100644
--- a/src/soc/intel/common/block/include/intelblocks/xhci.h
+++ b/src/soc/intel/common/block/include/intelblocks/xhci.h
@@ -56,4 +56,21 @@ void soc_xhci_init(struct device *dev);
*/
const struct xhci_usb_info *soc_get_xhci_usb_info(void);
+/**
+ * usb_xhci_disable_unused() - Disable unused USB devices
+ * @ext_usb_xhci_en_cb: Callback function to be invoked, supplied by mainboard,
+ * to identify the status of externally visible USB ports.
+ * (Return true if port is present, false if port is absent)
+ *
+ * This function is used to disable unused USB devices/ports that are configured
+ * in the device tree. For the internal USB ports, the connect status of the port
+ * is probed from the XHCI controller block and the port is disabled if it is not
+ * connected. For the external USB ports, the mainboard provides the connect status
+ * of the concerned port depending on the variants and their SKUs. If the mainboard
+ * supplied callback function is NULL, then all the externally visible USB devices
+ * in the device tree are enabled.
+ */
+void usb_xhci_disable_unused(bool (*ext_usb_xhci_en_cb)(unsigned int port_type,
+ unsigned int port_id));
+
#endif /* SOC_INTEL_COMMON_BLOCK_XHCI_H */