aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/board-dnskw.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-kirkwood/board-dnskw.c')
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c143
1 files changed, 0 insertions, 143 deletions
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 58c2d68f9443..4ab35065a144 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -14,13 +14,11 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/i2c.h>
18#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
19#include <linux/mv643xx_eth.h> 18#include <linux/mv643xx_eth.h>
20#include <linux/of.h> 19#include <linux/of.h>
21#include <linux/gpio.h> 20#include <linux/gpio.h>
22#include <linux/input.h> 21#include <linux/input.h>
23#include <linux/gpio_keys.h>
24#include <linux/gpio-fan.h> 22#include <linux/gpio-fan.h>
25#include <linux/leds.h> 23#include <linux/leds.h>
26#include <asm/mach-types.h> 24#include <asm/mach-types.h>
@@ -35,10 +33,6 @@ static struct mv643xx_eth_platform_data dnskw_ge00_data = {
35 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 33 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
36}; 34};
37 35
38static struct mv_sata_platform_data dnskw_sata_data = {
39 .n_ports = 2,
40};
41
42static unsigned int dnskw_mpp_config[] __initdata = { 36static unsigned int dnskw_mpp_config[] __initdata = {
43 MPP13_UART1_TXD, /* Custom ... */ 37 MPP13_UART1_TXD, /* Custom ... */
44 MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */ 38 MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */
@@ -73,132 +67,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
73 0 67 0
74}; 68};
75 69
76static struct gpio_led dns325_led_pins[] = {
77 {
78 .name = "dns325:white:power",
79 .gpio = 26,
80 .active_low = 1,
81 .default_trigger = "default-on",
82 },
83 {
84 .name = "dns325:white:usb",
85 .gpio = 43,
86 .active_low = 1,
87 },
88 {
89 .name = "dns325:red:l_hdd",
90 .gpio = 28,
91 .active_low = 1,
92 },
93 {
94 .name = "dns325:red:r_hdd",
95 .gpio = 27,
96 .active_low = 1,
97 },
98 {
99 .name = "dns325:red:usb",
100 .gpio = 29,
101 .active_low = 1,
102 },
103};
104
105static struct gpio_led_platform_data dns325_led_data = {
106 .num_leds = ARRAY_SIZE(dns325_led_pins),
107 .leds = dns325_led_pins,
108};
109
110static struct platform_device dns325_led_device = {
111 .name = "leds-gpio",
112 .id = -1,
113 .dev = {
114 .platform_data = &dns325_led_data,
115 },
116};
117
118static struct gpio_led dns320_led_pins[] = {
119 {
120 .name = "dns320:blue:power",
121 .gpio = 26,
122 .active_low = 1,
123 .default_trigger = "default-on",
124 },
125 {
126 .name = "dns320:blue:usb",
127 .gpio = 43,
128 .active_low = 1,
129 },
130 {
131 .name = "dns320:orange:l_hdd",
132 .gpio = 28,
133 .active_low = 1,
134 },
135 {
136 .name = "dns320:orange:r_hdd",
137 .gpio = 27,
138 .active_low = 1,
139 },
140 {
141 .name = "dns320:orange:usb",
142 .gpio = 35,
143 .active_low = 1,
144 },
145};
146
147static struct gpio_led_platform_data dns320_led_data = {
148 .num_leds = ARRAY_SIZE(dns320_led_pins),
149 .leds = dns320_led_pins,
150};
151
152static struct platform_device dns320_led_device = {
153 .name = "leds-gpio",
154 .id = -1,
155 .dev = {
156 .platform_data = &dns320_led_data,
157 },
158};
159
160static struct i2c_board_info dns325_i2c_board_info[] __initdata = {
161 {
162 I2C_BOARD_INFO("lm75", 0x48),
163 },
164 /* Something at 0x0c also */
165};
166
167static struct gpio_keys_button dnskw_button_pins[] = {
168 {
169 .code = KEY_POWER,
170 .gpio = 34,
171 .desc = "Power button",
172 .active_low = 1,
173 },
174 {
175 .code = KEY_EJECTCD,
176 .gpio = 47,
177 .desc = "USB unmount button",
178 .active_low = 1,
179 },
180 {
181 .code = KEY_RESTART,
182 .gpio = 48,
183 .desc = "Reset button",
184 .active_low = 1,
185 },
186};
187
188static struct gpio_keys_platform_data dnskw_button_data = {
189 .buttons = dnskw_button_pins,
190 .nbuttons = ARRAY_SIZE(dnskw_button_pins),
191};
192
193static struct platform_device dnskw_button_device = {
194 .name = "gpio-keys",
195 .id = -1,
196 .num_resources = 0,
197 .dev = {
198 .platform_data = &dnskw_button_data,
199 }
200};
201
202/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ 70/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
203static struct gpio_fan_speed dnskw_fan_speed[] = { 71static struct gpio_fan_speed dnskw_fan_speed[] = {
204 { 0, 0 }, 72 { 0, 0 },
@@ -245,20 +113,9 @@ void __init dnskw_init(void)
245 113
246 kirkwood_ehci_init(); 114 kirkwood_ehci_init();
247 kirkwood_ge00_init(&dnskw_ge00_data); 115 kirkwood_ge00_init(&dnskw_ge00_data);
248 kirkwood_sata_init(&dnskw_sata_data);
249 kirkwood_i2c_init();
250 116
251 platform_device_register(&dnskw_button_device);
252 platform_device_register(&dnskw_fan_device); 117 platform_device_register(&dnskw_fan_device);
253 118
254 if (of_machine_is_compatible("dlink,dns-325")) {
255 i2c_register_board_info(0, dns325_i2c_board_info,
256 ARRAY_SIZE(dns325_i2c_board_info));
257 platform_device_register(&dns325_led_device);
258
259 } else if (of_machine_is_compatible("dlink,dns-320"))
260 platform_device_register(&dns320_led_device);
261
262 /* Register power-off GPIO. */ 119 /* Register power-off GPIO. */
263 if (gpio_request(36, "dnskw:power:off") == 0 120 if (gpio_request(36, "dnskw:power:off") == 0
264 && gpio_direction_output(36, 0) == 0) 121 && gpio_direction_output(36, 0) == 0)