summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-07 14:46:09 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-04-07 14:46:09 +0000
commit65d5e5579ca500487231eb8f2b28bd4ef121556f (patch)
treea43ac10ec26c22b9238c6c8ae614913c8aa7197a /target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
parent2417786e2c6d8ff63dbc1c8ea7aba11df74b2c7f (diff)
ramips: pinmux fixes
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36247 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch')
-rw-r--r--target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch b/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
new file mode 100644
index 000000000..08cd2428f
--- /dev/null
+++ b/target/linux/ramips/patches-3.8/0125-MIPS-ralink-process-PCI-pinmux-group.patch
@@ -0,0 +1,39 @@
+From fe26f3e7d1329fc2a5ac14808dbecb7d324d0a41 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <juhosg@openwrt.org>
+Date: Wed, 27 Mar 2013 20:56:22 +0100
+Subject: [PATCH 3/5] MIPS: ralink: process PCI pinmux group
+
+Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+---
+ arch/mips/ralink/pinmux.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+--- a/arch/mips/ralink/pinmux.c
++++ b/arch/mips/ralink/pinmux.c
+@@ -29,7 +29,7 @@ void ralink_pinmux(void)
+ const __be32 *wdt;
+ struct device_node *np;
+ struct property *prop;
+- const char *uart, *pin;
++ const char *uart, *pci, *pin;
+ u32 mode = 0;
+
+ np = of_find_compatible_node(NULL, NULL, "ralink,rt3050-sysc");
+@@ -76,5 +76,17 @@ void ralink_pinmux(void)
+ if (wdt && *wdt && rt_pinmux.wdt_reset)
+ rt_pinmux.wdt_reset();
+
++ of_property_read_string(np, "ralink,pcimux", &pci);
++ if (pci) {
++ int m = ralink_mux_mask(pci, rt_pinmux.pci);
++ mode &= ~(rt_pinmux.pci_mask << rt_pinmux.pci_shift);
++ if (m) {
++ mode |= (m << rt_pinmux.pci_shift);
++ pr_debug("pinmux: registered pcimux \"%s\"\n", pci);
++ } else {
++ pr_debug("pinmux: registered pcimux \"gpio\"\n");
++ }
++ }
++
+ rt_sysc_w32(mode, SYSC_REG_GPIO_MODE);
+ }