ramips: pinmux fixes
[openwrt/svn-archive/archive.git] / target / linux / ramips / patches-3.8 / 0126-MIPS-ralink-add-PCI-pinmux-group-for-RT3883.patch
1 From 2c868d77c161ce7dea8facf203c155924d776c33 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Wed, 27 Mar 2013 20:50:40 +0100
4 Subject: [PATCH 4/5] MIPS: ralink: add PCI pinmux group for RT3883
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 ---
8 arch/mips/ralink/rt3883.c | 32 ++++++++++++++++++++++++++++++++
9 1 file changed, 32 insertions(+)
10
11 --- a/arch/mips/ralink/rt3883.c
12 +++ b/arch/mips/ralink/rt3883.c
13 @@ -113,6 +113,35 @@ struct ralink_pinmux_grp uart_mux[] = {
14 }, {0}
15 };
16
17 +struct ralink_pinmux_grp pci_mux[] = {
18 + {
19 + .name = "pci-dev",
20 + .mask = 0,
21 + .gpio_first = RT3883_GPIO_PCI_AD0,
22 + .gpio_last = RT3883_GPIO_PCI_AD31,
23 + }, {
24 + .name = "pci-host2",
25 + .mask = 1,
26 + .gpio_first = RT3883_GPIO_PCI_AD0,
27 + .gpio_last = RT3883_GPIO_PCI_AD31,
28 + }, {
29 + .name = "pci-host1",
30 + .mask = 2,
31 + .gpio_first = RT3883_GPIO_PCI_AD0,
32 + .gpio_last = RT3883_GPIO_PCI_AD31,
33 + }, {
34 + .name = "pci-fnc",
35 + .mask = 3,
36 + .gpio_first = RT3883_GPIO_PCI_AD0,
37 + .gpio_last = RT3883_GPIO_PCI_AD31,
38 + }, {
39 + .name = "pci-gpio",
40 + .mask = 7,
41 + .gpio_first = RT3883_GPIO_PCI_AD0,
42 + .gpio_last = RT3883_GPIO_PCI_AD31,
43 + }, {0}
44 +};
45 +
46 static void rt3883_wdt_reset(void)
47 {
48 u32 t;
49 @@ -129,6 +158,9 @@ struct ralink_pinmux rt_pinmux = {
50 .uart_shift = RT3883_GPIO_MODE_UART0_SHIFT,
51 .uart_mask = RT3883_GPIO_MODE_GPIO,
52 .wdt_reset = rt3883_wdt_reset,
53 + .pci = pci_mux,
54 + .pci_shift = RT3883_GPIO_MODE_PCI_SHIFT,
55 + .pci_mask = RT3883_GPIO_MODE_PCI_MASK,
56 };
57
58 void __init ralink_clk_init(void)