The beagleboard XM requires an active high signal to enable the USB
hub. Previous versions required an active low signal. This patch
checks which version of the board is being used and sets the enable
line accordingly.

Singed-off-by: Max Thrun <[email protected]>

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c
b/arch/arm/mach-omap2/board-omap3beagle.c
index 73689c0..5a649b7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -297,9 +297,13 @@ static int beagle_twl_gpio_setup(struct device *dev,
        gpio_request(gpio + 1, "EHCI_nOC");
        gpio_direction_input(gpio + 1);

-       /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
+       /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM
active high / others active low) */
        gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
-       gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+               gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
+       } else {
+               gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+       }

        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to