aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-10-28 19:52:02 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-10-28 19:52:02 +0000
commita8ec452c60ed3281e29de6fa012f4940b4c3fbc3 (patch)
tree81e47efe735c4cde24370d77b47e0ab60a84c197 /target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch
parentb783fb21a53535cf043189b0c4c30f315f494bb5 (diff)
downloadmaster-187ad058-a8ec452c60ed3281e29de6fa012f4940b4c3fbc3.tar.gz
master-187ad058-a8ec452c60ed3281e29de6fa012f4940b4c3fbc3.tar.bz2
master-187ad058-a8ec452c60ed3281e29de6fa012f4940b4c3fbc3.zip
ar71xx: add initial support for 3.6
The nand subtarget is not working yet. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33983 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch')
-rw-r--r--target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch b/target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch
new file mode 100644
index 0000000000..91a793d5e1
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.6/511-MIPS-ath79-add-ath79_set_usb_power_gpio.patch
@@ -0,0 +1,47 @@
+--- a/arch/mips/ath79/dev-usb.c
++++ b/arch/mips/ath79/dev-usb.c
+@@ -15,6 +15,7 @@
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/irq.h>
++#include <linux/gpio.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/platform_device.h>
+ #include <linux/usb/ehci_pdriver.h>
+@@ -282,3 +283,26 @@ void __init ath79_register_usb(void)
+ else
+ BUG();
+ }
++
++void __init ath79_set_usb_power_gpio(unsigned int gpio, unsigned long flags,
++ const char *label)
++{
++ int err;
++
++ err = gpio_request_one(gpio, flags, label);
++ if (err) {
++ pr_err("ath79: can't setup GPIO%u (%s), err=%d\n",
++ gpio, label, err);
++ return;
++ }
++
++ err = gpio_export(gpio, false);
++ if (err) {
++ pr_err("ath79: can't export GPIO%u (%s), err=%d\n",
++ gpio, label, err);
++ }
++
++ return;
++}
++
++
+--- a/arch/mips/ath79/dev-usb.h
++++ b/arch/mips/ath79/dev-usb.h
+@@ -13,5 +13,7 @@
+ #define _ATH79_DEV_USB_H
+
+ void ath79_register_usb(void);
++void ath79_set_usb_power_gpio(unsigned int gpio, unsigned long flags,
++ const char *label);
+
+ #endif /* _ATH79_DEV_USB_H */