diff options
author | Lucas Stach <dev@lynxeye.de> | 2012-09-26 02:14:34 +0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 22:54:00 +0400 |
commit | c7e3b2b58636704d504ac270031d87b716d8b273 (patch) | |
tree | ccbba6153c289fdb23ce766b80094b0a98d53bd2 /include/usb.h | |
parent | 5527efe501c117fc86273e2d7c7b6f30884015c3 (diff) | |
download | u-boot-c7e3b2b58636704d504ac270031d87b716d8b273.tar.xz |
usb: lowlevel interface change to support multiple controllers
Carry an index in the lowlevel usb functions to make specify the
respective usb controller.
Also pass through an controller struct from lowlevel_init to the
creation of the root usb device of this controller.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include/usb.h')
-rw-r--r-- | include/usb.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/usb.h b/include/usb.h index ba3d169ea8..292a0425d8 100644 --- a/include/usb.h +++ b/include/usb.h @@ -140,6 +140,8 @@ struct usb_device { int portnr; struct usb_device *parent; struct usb_device *children[USB_MAXCHILDREN]; + + void *controller; /* hardware controller private data */ }; /********************************************************************** @@ -153,8 +155,9 @@ 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); +int usb_lowlevel_init(int index, void **controller); +int 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, @@ -382,7 +385,8 @@ void usb_hub_reset(void); int hub_port_reset(struct usb_device *dev, int port, unsigned short *portstat); -struct usb_device *usb_alloc_new_device(void); +struct usb_device *usb_alloc_new_device(void *controller); + int usb_new_device(struct usb_device *dev); #endif /*_USB_H_ */ |