OSDN Git Service

ARM: at91/USB host: specify and handle properly vbus_pin_active_low
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 28 Mar 2012 09:56:28 +0000 (11:56 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 4 Apr 2012 16:35:14 +0000 (18:35 +0200)
Due to an error while handling vbus_pin_active_low in ohci-at91 driver,
the specification of this property was not good in devices/board files.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@vger.kernel.org> [3.2+]
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c

index 53688c4..27cfce3 100644 (file)
@@ -72,7 +72,8 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
        /* Enable VBus control for UHP ports */
        for (i = 0; i < data->ports; i++) {
                if (gpio_is_valid(data->vbus_pin[i]))
-                       at91_set_gpio_output(data->vbus_pin[i], 0);
+                       at91_set_gpio_output(data->vbus_pin[i],
+                                            data->vbus_pin_active_low[i]);
        }
 
        /* Enable overcurrent notification */
index 698479f..ddf210a 100644 (file)
@@ -127,7 +127,8 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
        /* Enable VBus control for UHP ports */
        for (i = 0; i < data->ports; i++) {
                if (gpio_is_valid(data->vbus_pin[i]))
-                       at91_set_gpio_output(data->vbus_pin[i], 0);
+                       at91_set_gpio_output(data->vbus_pin[i],
+                                            data->vbus_pin_active_low[i]);
        }
 
        /* Enable overcurrent notification */
@@ -188,7 +189,8 @@ void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
        /* Enable VBus control for UHP ports */
        for (i = 0; i < data->ports; i++) {
                if (gpio_is_valid(data->vbus_pin[i]))
-                       at91_set_gpio_output(data->vbus_pin[i], 0);
+                       at91_set_gpio_output(data->vbus_pin[i],
+                                            data->vbus_pin_active_low[i]);
        }
 
        usbh_ehci_data = *data;
index 66f0ddf..2ffe50f 100644 (file)
@@ -74,6 +74,7 @@ static void __init ek_init_early(void)
 static struct at91_usbh_data __initdata ek_usbh_data = {
        .ports          = 2,
        .vbus_pin       = { AT91_PIN_PA24, AT91_PIN_PA21 },
+       .vbus_pin_active_low = {1, 1},
        .overcurrent_pin= {-EINVAL, -EINVAL},
 };
 
index e1bea73..c88e908 100644 (file)
@@ -71,6 +71,7 @@ static void __init ek_init_early(void)
 static struct at91_usbh_data __initdata ek_usbh_hs_data = {
        .ports          = 2,
        .vbus_pin       = {AT91_PIN_PD1, AT91_PIN_PD3},
+       .vbus_pin_active_low = {1, 1},
        .overcurrent_pin= {-EINVAL, -EINVAL},
 };