diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2011-08-01 11:41:42 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:24 -0700 |
commit | 94e9eb775fce848a47b2e5d0b40f7f0b8c3e8f3f (patch) | |
tree | 6aa843a76a17415b659e66f87e7786c4dc0251d0 /include | |
parent | 2ea85c0681a7e2bda2b4e357ac3cd5f30c2f55fc (diff) |
usb: update API for multiple controllers
Add the ability to have USB devices enumerated on several controllers
BUG=chrome-os-partner:5043
TEST=Compile U-Boot
Change-Id: If43d32d4dc90c15ba570e5b9f86641cbf60ce064
Reviewed-on: http://gerrit.chromium.org/gerrit/4951
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/usb.h b/include/usb.h index 53603a55822..71341780fd2 100644 --- a/include/usb.h +++ b/include/usb.h @@ -128,6 +128,7 @@ struct usb_device { int portnr; struct usb_device *parent; struct usb_device *children[USB_MAXCHILDREN]; + void *controller; /* hardware controller private data */ }; /********************************************************************** @@ -141,8 +142,20 @@ struct usb_device { defined(CONFIG_USB_OMAP3) || defined(CONFIG_USB_DA8XX) || \ defined(CONFIG_USB_BLACKFIN) || defined(CONFIG_USB_AM35X) -int usb_lowlevel_init(void); -int usb_lowlevel_stop(void); +/** + * Controller specific part of the USB initialization + * + * @param index controller number to initialize + * @return controller private data if ok, NULL on error + */ +void *usb_lowlevel_init(int index); + +/** + * Controller specific part of the USB shutdown + * + * @param index controller number to stop + */ +void usb_lowlevel_stop(int index); int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int transfer_len); int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, @@ -155,6 +168,10 @@ void usb_event_poll(void); #define USB_UHCI_VEND_ID 0x8086 #define USB_UHCI_DEV_ID 0x7112 +#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT +#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 +#endif + #else #error USB Lowlevel not defined #endif |