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 /board/mpl/common | |
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 'board/mpl/common')
-rw-r--r-- | board/mpl/common/usb_uhci.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/board/mpl/common/usb_uhci.c b/board/mpl/common/usb_uhci.c index a0094372a4..89ad6989b7 100644 --- a/board/mpl/common/usb_uhci.c +++ b/board/mpl/common/usb_uhci.c @@ -602,7 +602,7 @@ void handle_usb_interrupt(void) /* init uhci */ -int usb_lowlevel_init(void) +void *usb_lowlevel_init(int index) { unsigned char temp; int busdevfunc; @@ -610,7 +610,7 @@ int usb_lowlevel_init(void) busdevfunc=pci_find_device(USB_UHCI_VEND_ID,USB_UHCI_DEV_ID,0); /* get PCI Device ID */ if(busdevfunc==-1) { printf("Error USB UHCI (%04X,%04X) not found\n",USB_UHCI_VEND_ID,USB_UHCI_DEV_ID); - return -1; + return NULL; } pci_read_config_byte(busdevfunc,PCI_INTERRUPT_LINE,&temp); irqvec = temp; @@ -627,19 +627,18 @@ int usb_lowlevel_init(void) reset_hc(); start_hc(); irq_install_handler(irqvec, (interrupt_handler_t *)handle_usb_interrupt, NULL); - return 0; + return &usb_base_addr; } /* stop uhci */ -int usb_lowlevel_stop(void) +void usb_lowlevel_stop(int index) { if(irqvec==-1) - return 1; + return; irq_free_handler(irqvec); reset_hc(); irqvec = -1; - return 0; } /******************************************************************************************* |