From 698d0580770afbaaca97d4f045d3c5506bed89b2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 6 Apr 2012 12:43:47 -0700 Subject: [PATCH] 3.3-stable patches added patches: arm-at91-dts-usb-host-vbus-is-active-low.patch arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch usb-ohci-at91-fix-vbus_pin_active_low-handling.patch --- ...at91-dts-usb-host-vbus-is-active-low.patch | 44 +++++++++++ ...-handle-properly-vbus_pin_active_low.patch | 77 +++++++++++++++++++ queue-3.3/series | 3 + ...t91-fix-vbus_pin_active_low-handling.patch | 41 ++++++++++ 4 files changed, 165 insertions(+) create mode 100644 queue-3.3/arm-at91-dts-usb-host-vbus-is-active-low.patch create mode 100644 queue-3.3/arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch create mode 100644 queue-3.3/usb-ohci-at91-fix-vbus_pin_active_low-handling.patch diff --git a/queue-3.3/arm-at91-dts-usb-host-vbus-is-active-low.patch b/queue-3.3/arm-at91-dts-usb-host-vbus-is-active-low.patch new file mode 100644 index 00000000000..6bf73129011 --- /dev/null +++ b/queue-3.3/arm-at91-dts-usb-host-vbus-is-active-low.patch @@ -0,0 +1,44 @@ +From 74adcb210685e7191425b6203e67c08d759412fa Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Wed, 21 Mar 2012 14:48:23 +0100 +Subject: ARM: at91/dts: USB host vbus is active low + +From: Nicolas Ferre + +commit 74adcb210685e7191425b6203e67c08d759412fa upstream. + +Change vbus gpio configuration in .dts files to switch to +active low configuration. + +Signed-off-by: Nicolas Ferre +Acked-by: Jean-Christophe PLAGNIOL-VILLARD +Signed-off-by: Greg Kroah-Hartman + +--- a/arch/arm/boot/dts/at91sam9g25ek.dts ++++ b/arch/arm/boot/dts/at91sam9g25ek.dts +@@ -37,8 +37,8 @@ + usb0: ohci@00600000 { + status = "okay"; + num-ports = <2>; +- atmel,vbus-gpio = <&pioD 19 0 +- &pioD 20 0 ++ atmel,vbus-gpio = <&pioD 19 1 ++ &pioD 20 1 + >; + }; + +diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts +index c4c8ae4..6abb571 100644 +--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts ++++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts +@@ -73,8 +73,8 @@ + usb0: ohci@00700000 { + status = "okay"; + num-ports = <2>; +- atmel,vbus-gpio = <&pioD 1 0 +- &pioD 3 0>; ++ atmel,vbus-gpio = <&pioD 1 1 ++ &pioD 3 1>; + }; + + usb1: ehci@00800000 { diff --git a/queue-3.3/arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch b/queue-3.3/arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch new file mode 100644 index 00000000000..c521f4cd00c --- /dev/null +++ b/queue-3.3/arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch @@ -0,0 +1,77 @@ +From cca0355a09b1bfe9f8985285199a346e13cacf39 Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Wed, 28 Mar 2012 11:56:28 +0200 +Subject: ARM: at91/USB host: specify and handle properly vbus_pin_active_low + +From: Nicolas Ferre + +commit cca0355a09b1bfe9f8985285199a346e13cacf39 upstream. + +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 +Acked-by: Jean-Christophe PLAGNIOL-VILLARD +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-at91/at91sam9263_devices.c | 3 ++- + arch/arm/mach-at91/at91sam9g45_devices.c | 6 ++++-- + arch/arm/mach-at91/board-sam9263ek.c | 1 + + arch/arm/mach-at91/board-sam9m10g45ek.c | 1 + + 4 files changed, 8 insertions(+), 3 deletions(-) + +--- a/arch/arm/mach-at91/at91sam9263_devices.c ++++ b/arch/arm/mach-at91/at91sam9263_devices.c +@@ -71,7 +71,8 @@ void __init at91_add_device_usbh(struct + /* 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 */ +--- a/arch/arm/mach-at91/at91sam9g45_devices.c ++++ b/arch/arm/mach-at91/at91sam9g45_devices.c +@@ -122,7 +122,8 @@ void __init at91_add_device_usbh_ohci(st + /* 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 */ +@@ -183,7 +184,8 @@ void __init at91_add_device_usbh_ehci(st + /* 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; +--- a/arch/arm/mach-at91/board-sam9263ek.c ++++ b/arch/arm/mach-at91/board-sam9263ek.c +@@ -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}, + }; + +--- a/arch/arm/mach-at91/board-sam9m10g45ek.c ++++ b/arch/arm/mach-at91/board-sam9m10g45ek.c +@@ -69,6 +69,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}, + }; + diff --git a/queue-3.3/series b/queue-3.3/series index 0028f27075c..09ac8062b7b 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -49,3 +49,6 @@ kgdbts-1-of-2-fix-single-step-awareness-to-work-correctly-with-smp.patch kgdbts-2-of-2-fix-single-step-awareness-to-work-correctly-with-smp.patch x86-kgdb-fix-debug_rodata-limitation-using-text_poke.patch cifs-fix-vfs-lock-usage-for-oplocked-files.patch +usb-ohci-at91-fix-vbus_pin_active_low-handling.patch +arm-at91-usb-host-specify-and-handle-properly-vbus_pin_active_low.patch +arm-at91-dts-usb-host-vbus-is-active-low.patch diff --git a/queue-3.3/usb-ohci-at91-fix-vbus_pin_active_low-handling.patch b/queue-3.3/usb-ohci-at91-fix-vbus_pin_active_low-handling.patch new file mode 100644 index 00000000000..8fcfa255e3f --- /dev/null +++ b/queue-3.3/usb-ohci-at91-fix-vbus_pin_active_low-handling.patch @@ -0,0 +1,41 @@ +From 1e7caf8bcf1b49eae152ad7cf442775472dd587c Mon Sep 17 00:00:00 2001 +From: Nicolas Ferre +Date: Wed, 21 Mar 2012 14:38:55 +0100 +Subject: USB: ohci-at91: fix vbus_pin_active_low handling + +From: Nicolas Ferre + +commit 1e7caf8bcf1b49eae152ad7cf442775472dd587c upstream. + +The information is not properly taken into account +for {get|set}_power() functions. + +Signed-off-by: Nicolas Ferre +Acked-by: Jean-Christophe PLAGNIOL-VILLARD +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-at91.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/ohci-at91.c ++++ b/drivers/usb/host/ohci-at91.c +@@ -245,7 +245,7 @@ static void ohci_at91_usb_set_power(stru + return; + + gpio_set_value(pdata->vbus_pin[port], +- !pdata->vbus_pin_active_low[port] ^ enable); ++ pdata->vbus_pin_active_low[port] ^ enable); + } + + static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) +@@ -257,7 +257,7 @@ static int ohci_at91_usb_get_power(struc + return -EINVAL; + + return gpio_get_value(pdata->vbus_pin[port]) ^ +- !pdata->vbus_pin_active_low[port]; ++ pdata->vbus_pin_active_low[port]; + } + + /* -- 2.47.3