diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-25 12:22:53 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:28 -0600 |
commit | a5762fe048bd537e4dfd52505134be403b4adb5c (patch) | |
tree | 6673ba3c3e21b7fae91011a587b157970ded30d8 /drivers/usb/host/xhci.h | |
parent | 779d12639152988ad65ceedf4a38b823f80425a7 (diff) | |
download | u-boot-imx-a5762fe048bd537e4dfd52505134be403b4adb5c.zip u-boot-imx-a5762fe048bd537e4dfd52505134be403b4adb5c.tar.gz u-boot-imx-a5762fe048bd537e4dfd52505134be403b4adb5c.tar.bz2 |
dm: usb: Support driver model in XHCI
Add driver model support in the XHCI support code so that it can be used by
XHCI USB drivers.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/usb/host/xhci.h')
-rw-r--r-- | drivers/usb/host/xhci.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 65c8880..2afa386 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1209,6 +1209,9 @@ void xhci_hcd_stop(int index); #define XHCI_STS_CNR (1 << 11) struct xhci_ctrl { +#ifdef CONFIG_DM_USB + struct udevice *dev; +#endif struct xhci_hccr *hccr; /* R/O registers, not need for volatile */ struct xhci_hcor *hcor; struct xhci_doorbell_array *dba; @@ -1260,6 +1263,27 @@ int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id); int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr, struct xhci_hcor *hcor); +/** + * xhci_deregister() - Unregister an XHCI controller + * + * @dev: Controller device + * @return 0 if registered, -ve on error + */ +int xhci_deregister(struct udevice *dev); + +/** + * xhci_register() - Register a new XHCI controller + * + * @dev: Controller device + * @hccr: Host controller control registers + * @hcor: Not sure what this means + * @return 0 if registered, -ve on error + */ +int xhci_register(struct udevice *dev, struct xhci_hccr *hccr, + struct xhci_hcor *hcor); + +extern struct dm_usb_ops xhci_usb_ops; + struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev); #endif /* HOST_XHCI_H_ */ |