From 27460be60d5fca8c6a4029387ee5209825c6544f Mon Sep 17 00:00:00 2001 From: Lukasz Dalek Date: Thu, 29 Nov 2012 13:59:23 +0100 Subject: [PATCH 01/11] pxa25x_udc: Remove usbdescriptors.h usbdescriptors.h conflicts with linux/usb/ch9.h. Remove it. Signed-off-by: Lukasz Dalek --- drivers/usb/gadget/pxa25x_udc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index dd741439ae..9ce98f0768 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -40,7 +40,6 @@ #include #include -#include #include #include #include From a33fada1c029f37f8c4670bfb536007066694f2e Mon Sep 17 00:00:00 2001 From: Lukasz Dalek Date: Thu, 29 Nov 2012 15:55:16 +0100 Subject: [PATCH 02/11] h2200: Add USB CDC ethernet support Add support for ethernet over USB which can be used for e.g. booting process. It works with tftp and dhcp clients code. Signed-off-by: Lukasz Dalek --- board/h2200/h2200.c | 11 +++++++++++ include/configs/h2200.h | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c index 30763061c7..720b06e4ce 100644 --- a/board/h2200/h2200.c +++ b/board/h2200/h2200.c @@ -22,9 +22,16 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; +int board_eth_init(bd_t *bis) +{ + usb_eth_initialize(bis); + return 0; +} + int board_init(void) { /* We have RAM, disable cache */ @@ -36,6 +43,10 @@ int board_init(void) /* adress of boot parameters */ gd->bd->bi_boot_params = 0xa0000100; + /* Let host see that device is disconnected */ + udc_disconnect(); + mdelay(500); + return 0; } diff --git a/include/configs/h2200.h b/include/configs/h2200.h index ef14dd38c5..516a26e9f1 100644 --- a/include/configs/h2200.h +++ b/include/configs/h2200.h @@ -154,4 +154,29 @@ #define CONFIG_BOOTARGS "root=/dev/ram0 ro console=ttyS0,115200n8" +#define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_USB_DEV_PULLUP_GPIO 33 +/* USB VBUS GPIO 3 */ + +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING + +#define CONFIG_BOOTDELAY 2 +#define CONFIG_BOOTCOMMAND \ + "setenv downloaded 0 ; while test $downloaded -eq 0 ; do " \ + "if bootp ; then setenv downloaded 1 ; fi ; done ; " \ + "source :script ; " \ + "bootm ; " + +#define CONFIG_USB_GADGET_PXA2XX +#define CONFIG_USB_ETHER +#define CONFIG_USB_ETH_SUBSET + +#define CONFIG_USBNET_DEV_ADDR "de:ad:be:ef:00:01" +#define CONFIG_USBNET_HOST_ADDR "de:ad:be:ef:00:02" +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial\0" \ + "stdout=serial\0" \ + "stderr=serial\0" + #endif /* __CONFIG_H */ From c5a927c61fde9c053be9d9915138537affb13596 Mon Sep 17 00:00:00 2001 From: Richard Genoud Date: Thu, 29 Nov 2012 23:18:31 +0000 Subject: [PATCH 03/11] usb documentation: fix typo Signed-off-by: Richard Genoud --- doc/README.usb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.usb b/doc/README.usb index ef1d6ba366..b4c3ef5224 100644 --- a/doc/README.usb +++ b/doc/README.usb @@ -63,7 +63,7 @@ Common USB Commands: Storage USB Commands: - usb scan: scans the USB for storage devices.The USB must be running for this command (usb start) -- usb device [dev]: show or set current USB staorage device +- usb device [dev]: show or set current USB storage device - usb part [dev]: print partition table of one or all USB storage devices - usb read addr blk# cnt: From b6d7852cf8b7ced786937d3d080956b0c7be9836 Mon Sep 17 00:00:00 2001 From: Vipin Kumar Date: Thu, 13 Dec 2012 16:25:53 +0530 Subject: [PATCH 04/11] usbh/ehci: Increase timeout for enumeration The current logic reads the port status just once after usb_hub_power_on and expects the portstatus and portchange to report the connection status immediately and correctly. Few pen drives are not able to report both of them immediately ie. those pens report the connection change but not the connected state after the first read. This opportunity once lost is gone for ever because the u-boot, unlike linux or any other OS, works in polling mode. This patch modifies the logic to read the port status continuously until the portstatus and portchange both report a connection change as well as a connected state or no connection change and no connection. This logic is placed in a timeout of 10 sec. At the end of it, the pen drive would have either reported a ONE or a ZERO in bit 1 of portstatus as well as portchange. It enhances the set of pen drives which can eventually be detected by u-boot Note: This 10 second timeout is based purely on several experiments done with the broken pen drives Signed-off-by: Vipin Kumar Acked-by: Igor Grinberg --- common/usb_hub.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index e4a120120d..4d75b902ff 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -396,14 +396,37 @@ static int usb_hub_configure(struct usb_device *dev) for (i = 0; i < dev->maxchild; i++) { ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1); unsigned short portstatus, portchange; + int ret; + ulong start = get_timer(0); - if (usb_get_port_status(dev, i + 1, portsts) < 0) { - USB_HUB_PRINTF("get_port_status failed\n"); + /* + * Wait for (whichever finishes first) + * - A maximum of 10 seconds + * This is a purely observational value driven by connecting + * a few broken pen drives and taking the max * 1.5 approach + * - connection_change and connection state to report same + * state + */ + do { + ret = usb_get_port_status(dev, i + 1, portsts); + if (ret < 0) { + USB_HUB_PRINTF("get_port_status failed\n"); + break; + } + + portstatus = le16_to_cpu(portsts->wPortStatus); + portchange = le16_to_cpu(portsts->wPortChange); + + if ((portchange & USB_PORT_STAT_C_CONNECTION) == + (portstatus & USB_PORT_STAT_CONNECTION)) + break; + + mdelay(100); + } while (get_timer(start) < CONFIG_SYS_HZ * 10); + + if (ret < 0) continue; - } - portstatus = le16_to_cpu(portsts->wPortStatus); - portchange = le16_to_cpu(portsts->wPortChange); USB_HUB_PRINTF("Port %d Status %X Change %X\n", i + 1, portstatus, portchange); From 359439d2888fdc3797903963607bb0bbd4582e08 Mon Sep 17 00:00:00 2001 From: Milind Choudhary Date: Wed, 12 Dec 2012 17:55:28 -0800 Subject: [PATCH 05/11] usb: Clean up newly allocated device nodes in case of configuration failure If probe of a newly connected device fails for some reason, clean up the allocated entry in usb_dev array. Signed-off-by: Milind Choudhary Signed-off-by: Simon Glass --- common/usb.c | 12 ++++++++++++ common/usb_hub.c | 2 ++ include/usb.h | 1 + 3 files changed, 15 insertions(+) diff --git a/common/usb.c b/common/usb.c index ac9b4ca8d5..6fc0fc1c0e 100644 --- a/common/usb.c +++ b/common/usb.c @@ -805,6 +805,18 @@ struct usb_device *usb_alloc_new_device(void *controller) return &usb_dev[dev_index - 1]; } +/* + * Free the newly created device node. + * Called in error cases where configuring a newly attached + * device fails for some reason. + */ +void usb_free_device(void) +{ + dev_index--; + USB_PRINTF("Freeing device node: %d\n", dev_index); + memset(&usb_dev[dev_index], 0, sizeof(struct usb_device)); + usb_dev[dev_index].devnum = -1; +} /* * By the time we get here, the device has gotten a new device ID diff --git a/common/usb_hub.c b/common/usb_hub.c index 4d75b902ff..b5eeb62fbe 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -259,6 +259,8 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port) /* Run it through the hoops (find a driver, etc) */ if (usb_new_device(usb)) { /* Woops, disable the port */ + usb_free_device(); + dev->children[port] = NULL; USB_HUB_PRINTF("hub: disabling port %d\n", port + 1); usb_clear_port_feature(dev, port + 1, USB_PORT_FEAT_ENABLE); } diff --git a/include/usb.h b/include/usb.h index 8d8a2c9b9d..d79c865884 100644 --- a/include/usb.h +++ b/include/usb.h @@ -392,5 +392,6 @@ int hub_port_reset(struct usb_device *dev, int port, struct usb_device *usb_alloc_new_device(void *controller); int usb_new_device(struct usb_device *dev); +void usb_free_device(void); #endif /*_USB_H_ */ From 8b57e2f0814a2fd9aed1fa09d8279eaf90764560 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 12 Dec 2012 17:55:29 -0800 Subject: [PATCH 06/11] usb: properly detect empty mass storage media reader When a USB card reader is empty, it will return "Not Ready - medium not present" as Key Code Qualifier. In that situation, it's useless waiting for the full timeout since the result won't change until the user inserts a card. Signed-off-by: Vincent Palatin Signed-off-by: Vadim Bendebury Signed-off-by: Simon Glass --- common/usb_storage.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/common/usb_storage.c b/common/usb_storage.c index 2d92ee1bb3..fb322b4015 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -970,6 +970,16 @@ static int usb_test_unit_ready(ccb *srb, struct us_data *ss) return 0; } usb_request_sense(srb, ss); + /* + * Check the Key Code Qualifier, if it matches + * "Not Ready - medium not present" + * (the sense Key equals 0x2 and the ASC is 0x3a) + * return immediately as the medium being absent won't change + * unless there is a user action. + */ + if ((srb->sense_buf[2] == 0x02) && + (srb->sense_buf[12] == 0x3a)) + return -1; mdelay(100); } while (retries--); From 5a413cae6a2201e0aee4741ab9e793317084707e Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 30 Nov 2012 08:01:05 +0000 Subject: [PATCH 07/11] g_dnl: Issue connect/disconnect as appropriate Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind. Signed-off-by: Pantelis Antoniou --- drivers/usb/gadget/g_dnl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 7d87050df3..25da73363a 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -83,7 +83,12 @@ static struct usb_gadget_strings *g_dnl_composite_strings[] = { static int g_dnl_unbind(struct usb_composite_dev *cdev) { - debug("%s\n", __func__); + struct usb_gadget *gadget = cdev->gadget; + + debug("%s: calling usb_gadget_disconnect for " + "controller '%s'\n", shortname, gadget->name); + usb_gadget_disconnect(gadget); + return 0; } @@ -153,6 +158,10 @@ static int g_dnl_bind(struct usb_composite_dev *cdev) device_desc.bcdDevice = __constant_cpu_to_le16(0x9999); } + debug("%s: calling usb_gadget_connect for " + "controller '%s'\n", shortname, gadget->name); + usb_gadget_connect(gadget); + return 0; error: From 598cf6062e0841ab10104ac7b64c9640284cec64 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 30 Nov 2012 08:01:06 +0000 Subject: [PATCH 08/11] g_dnl: Properly terminate string list. Well, not terminating the list causes very interesting crashes. As in changing the vendor & product ID crashes. Fun. Signed-off-by: Pantelis Antoniou --- drivers/usb/gadget/g_dnl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index 25da73363a..a5a4c1fe65 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -69,6 +69,7 @@ static struct usb_device_descriptor device_desc = { static struct usb_string g_dnl_string_defs[] = { { 0, manufacturer, }, { 1, product, }, + { } /* end of list */ }; static struct usb_gadget_strings g_dnl_string_tab = { From 41b13bc7c4133983361be893f419495dad1626d5 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Sun, 2 Dec 2012 13:59:18 +0200 Subject: [PATCH 09/11] twl4030: add gpio register offsets Add gpio register offsets for twl4030. Signed-off-by: Nikita Kiryanov Signed-off-by: Igor Grinberg --- include/twl4030.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/include/twl4030.h b/include/twl4030.h index 0c17f5929b..5aa184183e 100644 --- a/include/twl4030.h +++ b/include/twl4030.h @@ -580,6 +580,50 @@ #define TWL4030_USB_PHY_CLK_CTRL 0xFE #define TWL4030_USB_PHY_CLK_CTRL_STS 0xFF +/* GPIO */ +#define TWL4030_GPIO_GPIODATAIN1 0x00 +#define TWL4030_GPIO_GPIODATAIN2 0x01 +#define TWL4030_GPIO_GPIODATAIN3 0x02 +#define TWL4030_GPIO_GPIODATADIR1 0x03 +#define TWL4030_GPIO_GPIODATADIR2 0x04 +#define TWL4030_GPIO_GPIODATADIR3 0x05 +#define TWL4030_GPIO_GPIODATAOUT1 0x06 +#define TWL4030_GPIO_GPIODATAOUT2 0x07 +#define TWL4030_GPIO_GPIODATAOUT3 0x08 +#define TWL4030_GPIO_CLEARGPIODATAOUT1 0x09 +#define TWL4030_GPIO_CLEARGPIODATAOUT2 0x0A +#define TWL4030_GPIO_CLEARGPIODATAOUT3 0x0B +#define TWL4030_GPIO_SETGPIODATAOUT1 0x0C +#define TWL4030_GPIO_SETGPIODATAOUT2 0x0D +#define TWL4030_GPIO_SETGPIODATAOUT3 0x0E +#define TWL4030_GPIO_GPIO_DEBEN1 0x0F +#define TWL4030_GPIO_GPIO_DEBEN2 0x10 +#define TWL4030_GPIO_GPIO_DEBEN3 0x11 +#define TWL4030_GPIO_GPIO_CTRL 0x12 +#define TWL4030_GPIO_GPIOPUPDCTR1 0x13 +#define TWL4030_GPIO_GPIOPUPDCTR2 0x14 +#define TWL4030_GPIO_GPIOPUPDCTR3 0x15 +#define TWL4030_GPIO_GPIOPUPDCTR4 0x16 +#define TWL4030_GPIO_GPIOPUPDCTR5 0x17 +#define TWL4030_GPIO_GPIO_ISR1A 0x19 +#define TWL4030_GPIO_GPIO_ISR2A 0x1A +#define TWL4030_GPIO_GPIO_ISR3A 0x1B +#define TWL4030_GPIO_GPIO_IMR1A 0x1C +#define TWL4030_GPIO_GPIO_IMR2A 0x1D +#define TWL4030_GPIO_GPIO_IMR3A 0x1E +#define TWL4030_GPIO_GPIO_ISR1B 0x1F +#define TWL4030_GPIO_GPIO_ISR2B 0x20 +#define TWL4030_GPIO_GPIO_ISR3B 0x21 +#define TWL4030_GPIO_GPIO_IMR1B 0x22 +#define TWL4030_GPIO_GPIO_IMR2B 0x23 +#define TWL4030_GPIO_GPIO_IMR3B 0x24 +#define TWL4030_GPIO_GPIO_EDR1 0x28 +#define TWL4030_GPIO_GPIO_EDR2 0x29 +#define TWL4030_GPIO_GPIO_EDR3 0x2A +#define TWL4030_GPIO_GPIO_EDR4 0x2B +#define TWL4030_GPIO_GPIO_EDR5 0x2C +#define TWL4030_GPIO_GPIO_SIH_CTRL 0x2D + /* * Convience functions to read and write from TWL4030 * From 854a7836dc10d9ff818ba9eb4265538acd037cd9 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Sun, 2 Dec 2012 13:59:19 +0200 Subject: [PATCH 10/11] cm-t35: add USB host support Add support for USB host ports on cm-t3530 and cm-t3730. Signed-off-by: Nikita Kiryanov Signed-off-by: Igor Grinberg --- board/cm_t35/cm_t35.c | 77 ++++++++++++++++++++++++++++++++++++++++ include/configs/cm_t35.h | 8 ++++- 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c index 6c2e95b1d4..4db448aaed 100644 --- a/board/cm_t35/cm_t35.c +++ b/board/cm_t35/cm_t35.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -41,6 +42,8 @@ #include #include #include +#include +#include #include "eeprom.h" @@ -260,6 +263,36 @@ static void cm_t3x_set_common_muxconf(void) MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA6*/ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)); /*HSUSB0_DATA7*/ + /* USB EHCI */ + MUX_VAL(CP(ETK_D0_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT0*/ + MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT1*/ + MUX_VAL(CP(ETK_D2_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT2*/ + MUX_VAL(CP(ETK_D7_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT3*/ + MUX_VAL(CP(ETK_D4_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT4*/ + MUX_VAL(CP(ETK_D5_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT5*/ + MUX_VAL(CP(ETK_D6_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT6*/ + MUX_VAL(CP(ETK_D3_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DT7*/ + MUX_VAL(CP(ETK_D8_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_DIR*/ + MUX_VAL(CP(ETK_D9_ES2), (IEN | PTD | EN | M3)); /*HSUSB1_NXT*/ + MUX_VAL(CP(ETK_CTL_ES2), (IDIS | PTD | DIS | M3)); /*HSUSB1_CLK*/ + MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | DIS | M3)); /*HSUSB1_STP*/ + + MUX_VAL(CP(ETK_D14_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DT0*/ + MUX_VAL(CP(ETK_D15_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DT1*/ + MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | EN | M3)); /*HSUSB2_DT2*/ + MUX_VAL(CP(MCSPI2_CS1), (IEN | PTD | EN | M3)); /*HSUSB2_DT3*/ + MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | EN | M3)); /*HSUSB2_DT4*/ + MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTD | EN | M3)); /*HSUSB2_DT5*/ + MUX_VAL(CP(MCSPI2_CS0), (IEN | PTD | EN | M3)); /*HSUSB2_DT6*/ + MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | EN | M3)); /*HSUSB2_DT7*/ + MUX_VAL(CP(ETK_D12_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_DIR*/ + MUX_VAL(CP(ETK_D13_ES2), (IEN | PTD | EN | M3)); /*HSUSB2_NXT*/ + MUX_VAL(CP(ETK_D10_ES2), (IDIS | PTD | DIS | M3)); /*HSUSB2_CLK*/ + MUX_VAL(CP(ETK_D11_ES2), (IDIS | PTU | DIS | M3)); /*HSUSB2_STP*/ + + /* SB_T35_USB_HUB_RESET_GPIO */ + MUX_VAL(CP(CAM_WEN), (IDIS | PTD | DIS | M4)); /*GPIO_167*/ + /* I2C1 */ MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)); /*I2C1_SCL*/ MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)); /*I2C1_SDA*/ @@ -461,3 +494,47 @@ void __weak get_board_serial(struct tag_serialnr *serialnr) serialnr->low = 0; serialnr->high = 0; }; + +#ifdef CONFIG_USB_EHCI_OMAP +struct omap_usbhs_board_data usbhs_bdata = { + .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, + .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, + .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, +}; + +#define SB_T35_USB_HUB_RESET_GPIO 167 +int ehci_hcd_init(void) +{ + 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); + + offset = TWL4030_BASEADD_GPIO + TWL4030_GPIO_GPIODATADIR1; + twl4030_i2c_read_u8(TWL4030_CHIP_GPIO, &val, offset); + /* Set GPIO6 and GPIO7 of TPS65930 as output */ + val |= 0xC0; + twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, val, offset); + offset = TWL4030_BASEADD_GPIO + TWL4030_GPIO_SETGPIODATAOUT1; + /* Take both PHYs out of reset */ + twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0xC0, offset); + udelay(1); + + return omap_ehci_hcd_init(&usbhs_bdata); +} + +int ehci_hcd_stop(void) +{ + return omap_ehci_hcd_stop(); +} + +#endif /* CONFIG_USB_EHCI_OMAP */ diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index 568ae8e097..8db3a61941 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -114,9 +114,15 @@ #define CONFIG_DOS_PARTITION /* USB */ -#define CONFIG_MUSB_UDC #define CONFIG_USB_OMAP3 +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_OMAP +#define CONFIG_USB_ULPI +#define CONFIG_USB_ULPI_VIEWPORT_OMAP +#define CONFIG_USB_STORAGE +#define CONFIG_MUSB_UDC #define CONFIG_TWL4030_USB +#define CONFIG_CMD_USB /* USB device configuration */ #define CONFIG_USB_DEVICE From 41984e71231c7af4a5617f4f94f372714c64d987 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Mon, 3 Dec 2012 16:17:58 +0200 Subject: [PATCH 11/11] cm_t35: use new low level interface for usb ehci Update usb host support to use new version of omap_ehci_hcd_init. Signed-off-by: Nikita Kiryanov --- board/cm_t35/cm_t35.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/cm_t35/cm_t35.c b/board/cm_t35/cm_t35.c index 4db448aaed..edbb941985 100644 --- a/board/cm_t35/cm_t35.c +++ b/board/cm_t35/cm_t35.c @@ -503,7 +503,7 @@ struct omap_usbhs_board_data usbhs_bdata = { }; #define SB_T35_USB_HUB_RESET_GPIO 167 -int ehci_hcd_init(void) +int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { u8 val; int offset; @@ -529,7 +529,7 @@ int ehci_hcd_init(void) twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0xC0, offset); udelay(1); - return omap_ehci_hcd_init(&usbhs_bdata); + return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(void)