diff options
author | Jason Cooper <jason@lakedaemon.net> | 2013-01-26 15:50:14 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-02-28 12:57:16 -0500 |
commit | 4ded65751c262e4897dbaf8c11d11d85332eecf3 (patch) | |
tree | 8c87d571903d89143f7a7862c9837b1f3d143e70 /arch/arm | |
parent | 44d032e7940131fd991a01a948630747d91fe983 (diff) |
ARM: kirkwood: nsa310: convert to pinctrl
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/kirkwood-nsa310.dts | 99 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-dt.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-nsa310.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/common.h | 6 |
4 files changed, 99 insertions, 35 deletions
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts index dbb3551017fe..3a178cf708d7 100644 --- a/arch/arm/boot/dts/kirkwood-nsa310.dts +++ b/arch/arm/boot/dts/kirkwood-nsa310.dts | |||
@@ -16,6 +16,105 @@ | |||
16 | }; | 16 | }; |
17 | 17 | ||
18 | ocp@f1000000 { | 18 | ocp@f1000000 { |
19 | pinctrl: pinctrl@10000 { | ||
20 | pinctrl-0 = < &pmx_led_esata_green | ||
21 | &pmx_led_esata_red | ||
22 | &pmx_led_usb_green | ||
23 | &pmx_led_usb_red | ||
24 | &pmx_usb_power_off | ||
25 | &pmx_led_sys_green | ||
26 | &pmx_led_sys_red | ||
27 | &pmx_btn_reset | ||
28 | &pmx_btn_copy | ||
29 | &pmx_led_copy_green | ||
30 | &pmx_led_copy_red | ||
31 | &pmx_led_hdd_green | ||
32 | &pmx_led_hdd_red | ||
33 | &pmx_unknown | ||
34 | &pmx_btn_power | ||
35 | &pmx_pwr_off >; | ||
36 | pinctrl-names = "default"; | ||
37 | |||
38 | pmx_led_esata_green: pmx-led-esata-green { | ||
39 | marvell,pins = "mpp12"; | ||
40 | marvell,function = "gpio"; | ||
41 | }; | ||
42 | |||
43 | pmx_led_esata_red: pmx-led-esata-red { | ||
44 | marvell,pins = "mpp13"; | ||
45 | marvell,function = "gpio"; | ||
46 | }; | ||
47 | |||
48 | pmx_led_usb_green: pmx-led-usb-green { | ||
49 | marvell,pins = "mpp15"; | ||
50 | marvell,function = "gpio"; | ||
51 | }; | ||
52 | |||
53 | pmx_led_usb_red: pmx-led-usb-red { | ||
54 | marvell,pins = "mpp16"; | ||
55 | marvell,function = "gpio"; | ||
56 | }; | ||
57 | |||
58 | pmx_usb_power_off: pmx-usb-power-off { | ||
59 | marvell,pins = "mpp21"; | ||
60 | marvell,function = "gpio"; | ||
61 | }; | ||
62 | |||
63 | pmx_led_sys_green: pmx-led-sys-green { | ||
64 | marvell,pins = "mpp28"; | ||
65 | marvell,function = "gpio"; | ||
66 | }; | ||
67 | |||
68 | pmx_led_sys_red: pmx-led-sys-red { | ||
69 | marvell,pins = "mpp29"; | ||
70 | marvell,function = "gpio"; | ||
71 | }; | ||
72 | |||
73 | pmx_btn_reset: pmx-btn-reset { | ||
74 | marvell,pins = "mpp36"; | ||
75 | marvell,function = "gpio"; | ||
76 | }; | ||
77 | |||
78 | pmx_btn_copy: pmx-btn-copy { | ||
79 | marvell,pins = "mpp37"; | ||
80 | marvell,function = "gpio"; | ||
81 | }; | ||
82 | |||
83 | pmx_led_copy_green: pmx-led-copy-green { | ||
84 | marvell,pins = "mpp39"; | ||
85 | marvell,function = "gpio"; | ||
86 | }; | ||
87 | |||
88 | pmx_led_copy_red: pmx-led-copy-red { | ||
89 | marvell,pins = "mpp40"; | ||
90 | marvell,function = "gpio"; | ||
91 | }; | ||
92 | |||
93 | pmx_led_hdd_green: pmx-led-hdd-green { | ||
94 | marvell,pins = "mpp41"; | ||
95 | marvell,function = "gpio"; | ||
96 | }; | ||
97 | |||
98 | pmx_led_hdd_red: pmx-led-hdd-red { | ||
99 | marvell,pins = "mpp42"; | ||
100 | marvell,function = "gpio"; | ||
101 | }; | ||
102 | |||
103 | pmx_unknown: pmx-unknown { | ||
104 | marvell,pins = "mpp44"; | ||
105 | marvell,function = "gpio"; | ||
106 | }; | ||
107 | |||
108 | pmx_btn_power: pmx-btn-power { | ||
109 | marvell,pins = "mpp46"; | ||
110 | marvell,function = "gpio"; | ||
111 | }; | ||
112 | |||
113 | pmx_pwr_off: pmx-pwr-off { | ||
114 | marvell,pins = "mpp48"; | ||
115 | marvell,function = "gpio"; | ||
116 | }; | ||
117 | }; | ||
19 | 118 | ||
20 | serial@12000 { | 119 | serial@12000 { |
21 | clock-frequency = <200000000>; | 120 | clock-frequency = <200000000>; |
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c index 05b3b7ea41f7..2e73e9d53f70 100644 --- a/arch/arm/mach-kirkwood/board-dt.c +++ b/arch/arm/mach-kirkwood/board-dt.c | |||
@@ -144,9 +144,6 @@ static void __init kirkwood_dt_init(void) | |||
144 | if (of_machine_is_compatible("usi,topkick")) | 144 | if (of_machine_is_compatible("usi,topkick")) |
145 | usi_topkick_init(); | 145 | usi_topkick_init(); |
146 | 146 | ||
147 | if (of_machine_is_compatible("zyxel,nsa310")) | ||
148 | nsa310_init(); | ||
149 | |||
150 | of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); | 147 | of_platform_populate(NULL, kirkwood_dt_match_table, NULL, NULL); |
151 | } | 148 | } |
152 | 149 | ||
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c index 6966c86e0c34..544f83a46679 100644 --- a/arch/arm/mach-kirkwood/board-nsa310.c +++ b/arch/arm/mach-kirkwood/board-nsa310.c | |||
@@ -14,32 +14,6 @@ | |||
14 | #include <mach/kirkwood.h> | 14 | #include <mach/kirkwood.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include "common.h" | 16 | #include "common.h" |
17 | #include "mpp.h" | ||
18 | |||
19 | static unsigned int nsa310_mpp_config[] __initdata = { | ||
20 | MPP12_GPIO, /* led esata green */ | ||
21 | MPP13_GPIO, /* led esata red */ | ||
22 | MPP15_GPIO, /* led usb green */ | ||
23 | MPP16_GPIO, /* led usb red */ | ||
24 | MPP21_GPIO, /* control usb power off */ | ||
25 | MPP28_GPIO, /* led sys green */ | ||
26 | MPP29_GPIO, /* led sys red */ | ||
27 | MPP36_GPIO, /* key reset */ | ||
28 | MPP37_GPIO, /* key copy */ | ||
29 | MPP39_GPIO, /* led copy green */ | ||
30 | MPP40_GPIO, /* led copy red */ | ||
31 | MPP41_GPIO, /* led hdd green */ | ||
32 | MPP42_GPIO, /* led hdd red */ | ||
33 | MPP44_GPIO, /* ?? */ | ||
34 | MPP46_GPIO, /* key power */ | ||
35 | MPP48_GPIO, /* control power off */ | ||
36 | 0 | ||
37 | }; | ||
38 | |||
39 | void __init nsa310_init(void) | ||
40 | { | ||
41 | kirkwood_mpp_conf(nsa310_mpp_config); | ||
42 | } | ||
43 | 17 | ||
44 | static int __init nsa310_pci_init(void) | 18 | static int __init nsa310_pci_init(void) |
45 | { | 19 | { |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 537bdf816af7..5ed70565c843 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -135,12 +135,6 @@ void ns2_init(void); | |||
135 | static inline void ns2_init(void) {}; | 135 | static inline void ns2_init(void) {}; |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | #ifdef CONFIG_MACH_NSA310_DT | ||
139 | void nsa310_init(void); | ||
140 | #else | ||
141 | static inline void nsa310_init(void) {}; | ||
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT | 138 | #ifdef CONFIG_MACH_OPENBLOCKS_A6_DT |
145 | void openblocks_a6_init(void); | 139 | void openblocks_a6_init(void); |
146 | #else | 140 | #else |