summaryrefslogtreecommitdiffstats
path: root/board/compulab/cm_t35/cm_t35.c
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2014-11-03 11:32:19 +0200
committerTom Rini <trini@ti.com>2014-11-06 11:04:40 -0500
commit959bc1d5fa83eab057f12cb5ef79bd37ec98eb83 (patch)
treef8480d45105bb2910684ffb7cb019457e4bd32ec /board/compulab/cm_t35/cm_t35.c
parenta937fd1682625b1f87b555e2af9117fcb2999d7c (diff)
downloadblackbird-obmc-uboot-959bc1d5fa83eab057f12cb5ef79bd37ec98eb83.tar.gz
blackbird-obmc-uboot-959bc1d5fa83eab057f12cb5ef79bd37ec98eb83.zip
omap3: cm-t35: move the USB hub reset code
Extract the USB hub reset code to a common location where it can be reused by other compulab boards. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'board/compulab/cm_t35/cm_t35.c')
-rw-r--r--board/compulab/cm_t35/cm_t35.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index 5453942202..aca41c8f3d 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -568,21 +568,12 @@ struct omap_usbhs_board_data usbhs_bdata = {
#define SB_T35_USB_HUB_RESET_GPIO 167
int ehci_hcd_init(int index, enum usb_init_type init,
- struct ehci_hccr **hccr, struct ehci_hcor **hcor)
+ struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
u8 val;
int offset;
- if (gpio_request(SB_T35_USB_HUB_RESET_GPIO, "SB-T35 usb hub reset")) {
- printf("Error: can't obtain GPIO %d for SB-T35 usb hub reset",
- SB_T35_USB_HUB_RESET_GPIO);
- return -1;
- }
-
- gpio_direction_output(SB_T35_USB_HUB_RESET_GPIO, 0);
- udelay(10);
- gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1);
- udelay(1000);
+ cl_usb_hub_init(SB_T35_USB_HUB_RESET_GPIO, "sb-t35 hub rst");
offset = TWL4030_BASEADD_GPIO + TWL4030_GPIO_GPIODATADIR1;
twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, offset, &val);
@@ -599,6 +590,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
int ehci_hcd_stop(void)
{
+ cl_usb_hub_deinit(SB_T35_USB_HUB_RESET_GPIO);
return omap_ehci_hcd_stop();
}
#endif /* CONFIG_USB_EHCI_OMAP */
OpenPOWER on IntegriCloud