]>
Commit | Line | Data |
---|---|---|
1 | diff -Naur linux-3.2.25.org/arch/arm/Kconfig linux-3.2.25/arch/arm/Kconfig | |
2 | --- linux-3.2.25.org/arch/arm/Kconfig 2012-08-02 09:38:04.000000000 -0400 | |
3 | +++ linux-3.2.25/arch/arm/Kconfig 2012-08-11 04:42:20.985949735 -0400 | |
4 | @@ -197,7 +197,7 @@ | |
5 | ||
6 | config ARM_PATCH_PHYS_VIRT | |
7 | bool "Patch physical to virtual translations at runtime" if EMBEDDED | |
8 | - default y | |
9 | + default n | |
10 | depends on !XIP_KERNEL && MMU | |
11 | depends on !ARCH_REALVIEW || !SPARSEMEM | |
12 | help | |
13 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c linux-3.2.25/arch/arm/mach-kirkwood/dreamplug-setup.c | |
14 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/dreamplug-setup.c 1969-12-31 19:00:00.000000000 -0500 | |
15 | +++ linux-3.2.25/arch/arm/mach-kirkwood/dreamplug-setup.c 2012-08-11 10:22:53.242276474 -0400 | |
16 | @@ -0,0 +1,148 @@ | |
17 | +/* | |
18 | + * arch/arm/mach-kirkwood/dreamplug-setup.c | |
19 | + * | |
20 | + * Marvell DreamPlug Reference Board Setup | |
21 | + * | |
22 | + * This file is licensed under the terms of the GNU General Public | |
23 | + * License version 2. This program is licensed "as is" without any | |
24 | + * warranty of any kind, whether express or implied. | |
25 | + */ | |
26 | + | |
27 | +#include <linux/kernel.h> | |
28 | +#include <linux/init.h> | |
29 | +#include <linux/platform_device.h> | |
30 | +#include <linux/mtd/partitions.h> | |
31 | +#include <linux/ata_platform.h> | |
32 | +#include <linux/mv643xx_eth.h> | |
33 | +#include <linux/gpio.h> | |
34 | +#include <linux/leds.h> | |
35 | +#include <linux/spi/flash.h> | |
36 | +#include <linux/spi/spi.h> | |
37 | +#include <linux/spi/orion_spi.h> | |
38 | +#include <asm/mach-types.h> | |
39 | +#include <asm/mach/arch.h> | |
40 | +#include <mach/kirkwood.h> | |
41 | +#include <plat/mvsdio.h> | |
42 | +#include "common.h" | |
43 | +#include "mpp.h" | |
44 | + | |
45 | +static const struct flash_platform_data dreamplug_spi_slave_data = { | |
46 | + .type = "mx25l1606e", | |
47 | +}; | |
48 | + | |
49 | +static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { | |
50 | + { | |
51 | + .modalias = "m25p80", | |
52 | + .platform_data = &dreamplug_spi_slave_data, | |
53 | + .irq = -1, | |
54 | + .max_speed_hz = 50000000, | |
55 | + .bus_num = 0, | |
56 | + .chip_select = 0, | |
57 | + }, | |
58 | +}; | |
59 | + | |
60 | +static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | |
61 | + .phy_addr = MV643XX_ETH_PHY_ADDR(0), | |
62 | +}; | |
63 | + | |
64 | +static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | |
65 | + .phy_addr = MV643XX_ETH_PHY_ADDR(1), | |
66 | +}; | |
67 | + | |
68 | +static struct mv_sata_platform_data dreamplug_sata_data = { | |
69 | + .n_ports = 1, | |
70 | +}; | |
71 | + | |
72 | +static struct mvsdio_platform_data dreamplug_mvsdio_data = { | |
73 | + /* unfortunately the CD signal has not been connected */ | |
74 | +}; | |
75 | + | |
76 | +static struct gpio_led dreamplug_led_pins[] = { | |
77 | + { | |
78 | + .name = "dreamplug:blue:bluetooth", | |
79 | + .gpio = 47, | |
80 | + .active_low = 1, | |
81 | + }, | |
82 | + { | |
83 | + .name = "dreamplug:green:wlan", | |
84 | + .gpio = 48, | |
85 | + .active_low = 1, | |
86 | + }, | |
87 | + { | |
88 | + .name = "dreamplug:blue:wlanap", | |
89 | + .gpio = 49, | |
90 | + .active_low = 1, | |
91 | + }, | |
92 | +}; | |
93 | + | |
94 | +static struct gpio_led_platform_data dreamplug_led_data = { | |
95 | + .leds = dreamplug_led_pins, | |
96 | + .num_leds = ARRAY_SIZE(dreamplug_led_pins), | |
97 | +}; | |
98 | + | |
99 | +static struct platform_device dreamplug_leds = { | |
100 | + .name = "leds-gpio", | |
101 | + .id = -1, | |
102 | + .dev = { | |
103 | + .platform_data = &dreamplug_led_data, | |
104 | + } | |
105 | +}; | |
106 | + | |
107 | +static unsigned int dreamplug_mpp_config[] __initdata = { | |
108 | + MPP0_SPI_SCn, | |
109 | + MPP1_SPI_MOSI, | |
110 | + MPP2_SPI_SCK, | |
111 | + MPP3_SPI_MISO, | |
112 | + MPP4_GPIO, | |
113 | + MPP5_GPO, | |
114 | + MPP7_GPO, | |
115 | + MPP18_GPO, | |
116 | + MPP19_GPO, | |
117 | + MPP47_GPIO, /* B_BLED */ | |
118 | + MPP48_GPIO, /* W_GLED */ | |
119 | + MPP49_GPIO, /* W_BLED */ | |
120 | + 0 | |
121 | +}; | |
122 | + | |
123 | +static void __init dreamplug_init(void) | |
124 | +{ | |
125 | + /* | |
126 | + * Basic setup. Needs to be called early. | |
127 | + */ | |
128 | + kirkwood_init(); | |
129 | + kirkwood_mpp_conf(dreamplug_mpp_config); | |
130 | + | |
131 | + kirkwood_uart0_init(); | |
132 | + | |
133 | + spi_register_board_info(dreamplug_spi_slave_info, | |
134 | + ARRAY_SIZE(dreamplug_spi_slave_info)); | |
135 | + | |
136 | + kirkwood_spi_init(); | |
137 | + kirkwood_ehci_init(); | |
138 | + | |
139 | + kirkwood_ge00_init(&dreamplug_ge00_data); | |
140 | + kirkwood_ge01_init(&dreamplug_ge01_data); | |
141 | + kirkwood_sata_init(&dreamplug_sata_data); | |
142 | + kirkwood_sdio_init(&dreamplug_mvsdio_data); | |
143 | + | |
144 | + platform_device_register(&dreamplug_leds); | |
145 | +} | |
146 | + | |
147 | +MACHINE_START(DREAMPLUG, "Marvell DreamPlug Reference Board") | |
148 | + /* Maintainer: Siddarth Gore <gores <at> marvell.com> */ | |
149 | + .atag_offset = 0x100, | |
150 | + .init_machine = dreamplug_init, | |
151 | + .map_io = kirkwood_map_io, | |
152 | + .init_early = kirkwood_init_early, | |
153 | + .init_irq = kirkwood_init_irq, | |
154 | + .timer = &kirkwood_timer, | |
155 | +MACHINE_END | |
156 | + | |
157 | +MACHINE_START(DREAMPLUG1, "Marvell DreamPlug Reference Board") | |
158 | + .atag_offset = 0x100, | |
159 | + .init_machine = dreamplug_init, | |
160 | + .map_io = kirkwood_map_io, | |
161 | + .init_early = kirkwood_init_early, | |
162 | + .init_irq = kirkwood_init_irq, | |
163 | + .timer = &kirkwood_timer, | |
164 | +MACHINE_END | |
165 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c linux-3.2.25/arch/arm/mach-kirkwood/guruplug-setup.c | |
166 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-02 09:38:04.000000000 -0400 | |
167 | +++ linux-3.2.25/arch/arm/mach-kirkwood/guruplug-setup.c 2012-08-05 13:05:22.000000000 -0400 | |
168 | @@ -11,6 +11,7 @@ | |
169 | #include <linux/kernel.h> | |
170 | #include <linux/init.h> | |
171 | #include <linux/platform_device.h> | |
172 | +#include <linux/mtd/mtd.h> | |
173 | #include <linux/mtd/partitions.h> | |
174 | #include <linux/ata_platform.h> | |
175 | #include <linux/mv643xx_eth.h> | |
176 | @@ -27,15 +28,16 @@ | |
177 | { | |
178 | .name = "u-boot", | |
179 | .offset = 0, | |
180 | - .size = SZ_1M | |
181 | + .size = SZ_1M, | |
182 | + .mask_flags = MTD_WRITEABLE, /* read only */ | |
183 | }, { | |
184 | .name = "uImage", | |
185 | .offset = MTDPART_OFS_NXTBLK, | |
186 | - .size = SZ_4M | |
187 | + .size = SZ_4M, | |
188 | }, { | |
189 | .name = "root", | |
190 | .offset = MTDPART_OFS_NXTBLK, | |
191 | - .size = MTDPART_SIZ_FULL | |
192 | + .size = MTDPART_SIZ_FULL, | |
193 | }, | |
194 | }; | |
195 | ||
196 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c linux-3.2.25/arch/arm/mach-kirkwood/iconnect-setup.c | |
197 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/iconnect-setup.c 1969-12-31 19:00:00.000000000 -0500 | |
198 | +++ linux-3.2.25/arch/arm/mach-kirkwood/iconnect-setup.c 2012-08-11 04:58:00.565660184 -0400 | |
199 | @@ -0,0 +1,212 @@ | |
200 | +/* | |
201 | + * arch/arm/mach-kirkwood/iconnect-setup.c | |
202 | + * | |
203 | + * Iomega iConnect Wireless Data Station Board Setup | |
204 | + * | |
205 | + * This file is licensed under the terms of the GNU General Public | |
206 | + * License version 2. This program is licensed "as is" without any | |
207 | + * warranty of any kind, whether express or implied. | |
208 | + */ | |
209 | + | |
210 | +#include <linux/kernel.h> | |
211 | +#include <linux/init.h> | |
212 | +#include <linux/platform_device.h> | |
213 | +#include <linux/mtd/mtd.h> | |
214 | +#include <linux/mtd/partitions.h> | |
215 | +#include <linux/ata_platform.h> | |
216 | +#include <linux/mv643xx_eth.h> | |
217 | +#include <linux/gpio.h> | |
218 | +#include <linux/gpio_keys.h> | |
219 | +#include <linux/i2c.h> | |
220 | +#include <linux/input.h> | |
221 | +#include <linux/leds.h> | |
222 | +#include <asm/mach-types.h> | |
223 | +#include <asm/mach/arch.h> | |
224 | +#include <mach/kirkwood.h> | |
225 | +#include "common.h" | |
226 | +#include "mpp.h" | |
227 | + | |
228 | +static struct mtd_partition iconnect_nand_parts[] = { | |
229 | + { | |
230 | + .name = "u-boot", | |
231 | + .offset = 0, | |
232 | + .size = SZ_1M, | |
233 | + .mask_flags = MTD_WRITEABLE, /* read only */ | |
234 | + }, { | |
235 | + .name = "uImage", | |
236 | + .offset = MTDPART_OFS_NXTBLK, | |
237 | + .size = 0x440000, | |
238 | + }, { | |
239 | + .name = "uInit", | |
240 | + .offset = MTDPART_OFS_NXTBLK, | |
241 | + .size = 0x440000, | |
242 | + }, { | |
243 | + .name = "root", | |
244 | + .offset = MTDPART_OFS_NXTBLK, | |
245 | + .size = MTDPART_SIZ_FULL, | |
246 | + }, | |
247 | +}; | |
248 | + | |
249 | +static struct mv643xx_eth_platform_data iconnect_ge00_data = { | |
250 | + .phy_addr = MV643XX_ETH_PHY_ADDR(0xB), | |
251 | +}; | |
252 | + | |
253 | +static struct gpio_led iconnect_led_pins[] = { | |
254 | + { | |
255 | + .name = "iconnect:led_level", | |
256 | + .default_trigger = "default-on", | |
257 | + .gpio = 41, | |
258 | + .active_low = 0, | |
259 | + }, | |
260 | + | |
261 | + { | |
262 | + .name = "iconnect:blue:power", | |
263 | + .default_trigger = "default-on", | |
264 | + .gpio = 42, | |
265 | + .active_low = 0, | |
266 | + }, | |
267 | + { | |
268 | + .name = "iconnect:red:power", | |
269 | + .default_trigger = "none", | |
270 | + .gpio = 43, | |
271 | + .active_low = 0, | |
272 | + }, | |
273 | + { | |
274 | + .name = "iconnect:blue:usb_1", | |
275 | + .default_trigger = "none", | |
276 | + .gpio = 44, | |
277 | + .active_low = 0, | |
278 | + }, | |
279 | + { | |
280 | + .name = "iconnect:blue:usb_2", | |
281 | + .default_trigger = "none", | |
282 | + .gpio = 45, | |
283 | + .active_low = 0, | |
284 | + }, | |
285 | + { | |
286 | + .name = "iconnect:blue:usb_3", | |
287 | + .default_trigger = "none", | |
288 | + .gpio = 46, | |
289 | + .active_low = 0, | |
290 | + }, | |
291 | + { | |
292 | + .name = "iconnect:blue:usb_4", | |
293 | + .default_trigger = "none", | |
294 | + .gpio = 47, | |
295 | + .active_low = 0, | |
296 | + }, | |
297 | + { | |
298 | + .name = "iconnect:blue:otb", | |
299 | + .default_trigger = "none", | |
300 | + .gpio = 48, | |
301 | + .active_low = 0, | |
302 | + }, | |
303 | +}; | |
304 | + | |
305 | +static struct gpio_led_platform_data iconnect_led_data = { | |
306 | + .leds = iconnect_led_pins, | |
307 | + .num_leds = ARRAY_SIZE(iconnect_led_pins), | |
308 | +}; | |
309 | + | |
310 | +static struct platform_device iconnect_leds = { | |
311 | + .name = "leds-gpio", | |
312 | + .id = -1, | |
313 | + .dev = { | |
314 | + .platform_data = &iconnect_led_data, | |
315 | + } | |
316 | +}; | |
317 | + | |
318 | +static struct gpio_keys_button iconnect_buttons[] = { | |
319 | + { | |
320 | + .code = KEY_COPY, | |
321 | + .gpio = 35, | |
322 | + .desc = "OTB Button", | |
323 | + .active_low = 1, | |
324 | + }, | |
325 | + { | |
326 | + .code = KEY_RESTART, | |
327 | + .gpio = 12, | |
328 | + .desc = "Reset", | |
329 | + .active_low = 1, | |
330 | + }, | |
331 | +}; | |
332 | + | |
333 | +static struct gpio_keys_platform_data iconnect_button_data = { | |
334 | + .buttons = iconnect_buttons, | |
335 | + .nbuttons = ARRAY_SIZE(iconnect_buttons), | |
336 | +}; | |
337 | + | |
338 | +static struct platform_device iconnect_button_device = { | |
339 | + .name = "gpio-keys", | |
340 | + .id = -1, | |
341 | + .num_resources = 0, | |
342 | + .dev = { | |
343 | + .platform_data = &iconnect_button_data, | |
344 | + } | |
345 | +}; | |
346 | + | |
347 | +static unsigned int iconnect_mpp_config[] __initdata = { | |
348 | + MPP0_NF_IO2, | |
349 | + MPP1_NF_IO3, | |
350 | + MPP2_NF_IO4, | |
351 | + MPP3_NF_IO5, | |
352 | + MPP4_NF_IO6, | |
353 | + MPP5_NF_IO7, | |
354 | + MPP18_NF_IO0, | |
355 | + MPP19_NF_IO1, | |
356 | + MPP12_GPIO, /* Reset Button */ | |
357 | + MPP35_GPIO, /* OTB Button */ | |
358 | + | |
359 | + MPP41_GPIO, /* LED Level */ | |
360 | + MPP42_GPIO, /* Power LED blue */ | |
361 | + MPP43_GPIO, /* Power LED red */ | |
362 | + MPP44_GPIO, /* USB LED 1 */ | |
363 | + MPP45_GPIO, /* USB LED 2 */ | |
364 | + MPP46_GPIO, /* USB LED 3 */ | |
365 | + MPP47_GPIO, /* USB LED 4 */ | |
366 | + MPP48_GPIO, /* OTB LED */ | |
367 | + 0 | |
368 | +}; | |
369 | + | |
370 | +static struct i2c_board_info __initdata iconnect_i2c = { | |
371 | + I2C_BOARD_INFO("lm63", 0x4c), | |
372 | +}; | |
373 | + | |
374 | +static void __init iconnect_init(void) | |
375 | +{ | |
376 | + /* | |
377 | + * Basic setup. Needs to be called early. | |
378 | + */ | |
379 | + kirkwood_init(); | |
380 | + kirkwood_mpp_conf(iconnect_mpp_config); | |
381 | + | |
382 | + kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25); | |
383 | + kirkwood_ehci_init(); | |
384 | + kirkwood_ge00_init(&iconnect_ge00_data); | |
385 | + | |
386 | + kirkwood_uart0_init(); | |
387 | + platform_device_register(&iconnect_leds); | |
388 | + platform_device_register(&iconnect_button_device); | |
389 | + | |
390 | + kirkwood_i2c_init(); | |
391 | + i2c_register_board_info(0, &iconnect_i2c,1); | |
392 | +} | |
393 | + | |
394 | +static int __init iconnect_pci_init(void) | |
395 | +{ | |
396 | + if (machine_is_iconnect()) { | |
397 | + kirkwood_pcie_init(KW_PCIE0); | |
398 | + } | |
399 | + return 0; | |
400 | +} | |
401 | +subsys_initcall(iconnect_pci_init); | |
402 | + | |
403 | +MACHINE_START(ICONNECT, "Iomega iConnect Wireless Data Station") | |
404 | + /* Maintainer: Arne Fitzenreiter <arne_f@ipfire.org> */ | |
405 | + .atag_offset = 0x100, | |
406 | + .init_machine = iconnect_init, | |
407 | + .map_io = kirkwood_map_io, | |
408 | + .init_early = kirkwood_init_early, | |
409 | + .init_irq = kirkwood_init_irq, | |
410 | + .timer = &kirkwood_timer, | |
411 | +MACHINE_END | |
412 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig linux-3.2.25/arch/arm/mach-kirkwood/Kconfig | |
413 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/Kconfig 2012-08-02 09:38:04.000000000 -0400 | |
414 | +++ linux-3.2.25/arch/arm/mach-kirkwood/Kconfig 2012-08-05 12:45:22.015253501 -0400 | |
415 | @@ -44,6 +44,12 @@ | |
416 | Say 'Y' here if you want your kernel to support the | |
417 | Marvell GuruPlug Reference Board. | |
418 | ||
419 | +config MACH_DREAMPLUG | |
420 | + bool "Marvell DreamPlug Reference Board" | |
421 | + help | |
422 | + Say 'Y' here if you want your kernel to support the | |
423 | + Marvell DreamPlug Reference Board. | |
424 | + | |
425 | config MACH_TS219 | |
426 | bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" | |
427 | help | |
428 | @@ -130,6 +136,18 @@ | |
429 | Say 'Y' here if you want your kernel to support the | |
430 | HP t5325 Thin Client. | |
431 | ||
432 | +config MACH_ICONNECT | |
433 | + bool "Iomega iConnect Wireless Data Station" | |
434 | + help | |
435 | + Say 'Y' here if you want your kernel to support the | |
436 | + Iomega iConnect Wireless Data Station. | |
437 | + | |
438 | +config MACH_NAS6210 | |
439 | + bool "Raidsonic ICY BOX IB-62x0" | |
440 | + help | |
441 | + Say 'Y' here if you want your kernel to support the | |
442 | + Raidsonic ICY BOX IB-62x0. | |
443 | + | |
444 | endmenu | |
445 | ||
446 | endif | |
447 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile linux-3.2.25/arch/arm/mach-kirkwood/Makefile | |
448 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/Makefile 2012-08-02 09:38:04.000000000 -0400 | |
449 | +++ linux-3.2.25/arch/arm/mach-kirkwood/Makefile 2012-08-05 12:46:49.015253501 -0400 | |
450 | @@ -7,6 +7,7 @@ | |
451 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | |
452 | obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o | |
453 | obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o | |
454 | +obj-$(CONFIG_MACH_DREAMPLUG) += dreamplug-setup.o | |
455 | obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o | |
456 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o | |
457 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o | |
458 | @@ -18,5 +19,7 @@ | |
459 | obj-$(CONFIG_MACH_NET2BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | |
460 | obj-$(CONFIG_MACH_NET5BIG_V2) += netxbig_v2-setup.o lacie_v2-common.o | |
461 | obj-$(CONFIG_MACH_T5325) += t5325-setup.o | |
462 | +obj-$(CONFIG_MACH_ICONNECT) += iconnect-setup.o | |
463 | +obj-$(CONFIG_MACH_NAS6210) += nas6210-setup.o | |
464 | ||
465 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | |
466 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h linux-3.2.25/arch/arm/mach-kirkwood/mpp.h | |
467 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/mpp.h 2012-08-02 09:38:04.000000000 -0400 | |
468 | +++ linux-3.2.25/arch/arm/mach-kirkwood/mpp.h 2012-08-05 13:08:23.835566001 -0400 | |
469 | @@ -102,6 +102,7 @@ | |
470 | #define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 0, 0, 1, 1, 1, 1 ) | |
471 | ||
472 | #define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 ) | |
473 | +#define MPP12_GPIO MPP( 12, 0x0, 1, 1, 1, 1, 1, 1, 1 ) | |
474 | #define MPP12_SD_CLK MPP( 12, 0x1, 0, 0, 1, 1, 1, 1, 1 ) | |
475 | #define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 0, 0, 0, 0, 0, 1 ) | |
476 | #define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 0, 0, 0, 0, 0, 1 ) | |
477 | diff -Naur linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c linux-3.2.25/arch/arm/mach-kirkwood/nas6210-setup.c | |
478 | --- linux-3.2.25.org/arch/arm/mach-kirkwood/nas6210-setup.c 1969-12-31 19:00:00.000000000 -0500 | |
479 | +++ linux-3.2.25/arch/arm/mach-kirkwood/nas6210-setup.c 2012-08-11 04:58:35.223186956 -0400 | |
480 | @@ -0,0 +1,184 @@ | |
481 | +/* | |
482 | + * arch/arm/mach-kirkwood/nas6210-setup.c | |
483 | + * | |
484 | + * Raidsonic ICYBOX NAS6210 and 6220 Board Setup | |
485 | + * | |
486 | + * This file is licensed under the terms of the GNU General Public | |
487 | + * License version 2. This program is licensed "as is" without any | |
488 | + * warranty of any kind, whether express or implied. | |
489 | + */ | |
490 | + | |
491 | +#include <linux/kernel.h> | |
492 | +#include <linux/init.h> | |
493 | +#include <linux/platform_device.h> | |
494 | +#include <linux/mtd/mtd.h> | |
495 | +#include <linux/mtd/partitions.h> | |
496 | +#include <linux/ata_platform.h> | |
497 | +#include <linux/mv643xx_eth.h> | |
498 | +#include <linux/gpio.h> | |
499 | +#include <linux/gpio_keys.h> | |
500 | +#include <linux/i2c.h> | |
501 | +#include <linux/input.h> | |
502 | +#include <linux/leds.h> | |
503 | +#include <asm/mach-types.h> | |
504 | +#include <asm/mach/arch.h> | |
505 | +#include <mach/kirkwood.h> | |
506 | +#include "common.h" | |
507 | +#include "mpp.h" | |
508 | + | |
509 | +#define NAS6210_GPIO_POWER_OFF 24 | |
510 | + | |
511 | +static struct mtd_partition nas6210_nand_parts[] = { | |
512 | + { | |
513 | + .name = "u-boot", | |
514 | + .offset = 0, | |
515 | + .size = SZ_1M, | |
516 | + .mask_flags = MTD_WRITEABLE, /* read only */ | |
517 | + }, { | |
518 | + .name = "uImage", | |
519 | + .offset = MTDPART_OFS_NXTBLK, | |
520 | + .size = (SZ_1M*6), | |
521 | + }, { | |
522 | + .name = "root", | |
523 | + .offset = MTDPART_OFS_NXTBLK, | |
524 | + .size = MTDPART_SIZ_FULL, | |
525 | + }, | |
526 | +}; | |
527 | + | |
528 | +static struct mv643xx_eth_platform_data nas6210_ge00_data = { | |
529 | + .phy_addr = MV643XX_ETH_PHY_ADDR(8), | |
530 | +}; | |
531 | + | |
532 | +static struct mv_sata_platform_data nas6210_sata_data = { | |
533 | + .n_ports = 2, | |
534 | +}; | |
535 | + | |
536 | +static struct gpio_led nas6210_led_pins[] = { | |
537 | + { | |
538 | + .name = "nas6210:green:power", | |
539 | + .default_trigger = "default-on", | |
540 | + .gpio = 25, | |
541 | + .active_low = 0, | |
542 | + }, | |
543 | + { | |
544 | + .name = "nas6210:red:power", | |
545 | + .default_trigger = "none", | |
546 | + .gpio = 22, | |
547 | + .active_low = 0, | |
548 | + }, | |
549 | + { | |
550 | + .name = "nas6210:red:usb_copy", | |
551 | + .default_trigger = "none", | |
552 | + .gpio = 27, | |
553 | + .active_low = 0, | |
554 | + }, | |
555 | +}; | |
556 | + | |
557 | +static struct gpio_led_platform_data nas6210_led_data = { | |
558 | + .leds = nas6210_led_pins, | |
559 | + .num_leds = ARRAY_SIZE(nas6210_led_pins), | |
560 | +}; | |
561 | + | |
562 | +static struct platform_device nas6210_leds = { | |
563 | + .name = "leds-gpio", | |
564 | + .id = -1, | |
565 | + .dev = { | |
566 | + .platform_data = &nas6210_led_data, | |
567 | + } | |
568 | +}; | |
569 | + | |
570 | +static struct gpio_keys_button nas6210_buttons[] = { | |
571 | + { | |
572 | + .code = KEY_COPY, | |
573 | + .gpio = 29, | |
574 | + .desc = "USB Copy", | |
575 | + .active_low = 1, | |
576 | + }, | |
577 | + { | |
578 | + .code = KEY_RESTART, | |
579 | + .gpio = 28, | |
580 | + .desc = "Reset", | |
581 | + .active_low = 1, | |
582 | + }, | |
583 | +}; | |
584 | + | |
585 | +static struct gpio_keys_platform_data nas6210_button_data = { | |
586 | + .buttons = nas6210_buttons, | |
587 | + .nbuttons = ARRAY_SIZE(nas6210_buttons), | |
588 | +}; | |
589 | + | |
590 | +static struct platform_device nas6210_button_device = { | |
591 | + .name = "gpio-keys", | |
592 | + .id = -1, | |
593 | + .num_resources = 0, | |
594 | + .dev = { | |
595 | + .platform_data = &nas6210_button_data, | |
596 | + } | |
597 | +}; | |
598 | + | |
599 | +static unsigned int nas6210_mpp_config[] __initdata = { | |
600 | + MPP0_NF_IO2, | |
601 | + MPP1_NF_IO3, | |
602 | + MPP2_NF_IO4, | |
603 | + MPP3_NF_IO5, | |
604 | + MPP4_NF_IO6, | |
605 | + MPP5_NF_IO7, | |
606 | + MPP18_NF_IO0, | |
607 | + MPP19_NF_IO1, | |
608 | + MPP22_GPIO, /* Power LED red */ | |
609 | + MPP24_GPIO, /* Power off */ | |
610 | + MPP25_GPIO, /* Power LED green */ | |
611 | + MPP27_GPIO, /* USB transfer LED */ | |
612 | + MPP28_GPIO, /* Reset button */ | |
613 | + MPP29_GPIO, /* USB Copy button */ | |
614 | + 0 | |
615 | +}; | |
616 | + | |
617 | +void nas6210_power_off(void) | |
618 | +{ | |
619 | + gpio_set_value(NAS6210_GPIO_POWER_OFF, 1); | |
620 | + while(1); | |
621 | +} | |
622 | + | |
623 | +static void __init nas6210_init(void) | |
624 | +{ | |
625 | + /* | |
626 | + * Basic setup. Needs to be called early. | |
627 | + */ | |
628 | + kirkwood_init(); | |
629 | + kirkwood_mpp_conf(nas6210_mpp_config); | |
630 | + | |
631 | + kirkwood_nand_init(ARRAY_AND_SIZE(nas6210_nand_parts), 25); | |
632 | + kirkwood_ehci_init(); | |
633 | + kirkwood_ge00_init(&nas6210_ge00_data); | |
634 | + kirkwood_sata_init(&nas6210_sata_data); | |
635 | + kirkwood_uart0_init(); | |
636 | + platform_device_register(&nas6210_leds); | |
637 | + platform_device_register(&nas6210_button_device); | |
638 | + | |
639 | + if (gpio_request(NAS6210_GPIO_POWER_OFF, "power-off") == 0 && | |
640 | + gpio_direction_output(NAS6210_GPIO_POWER_OFF, 0) == 0) | |
641 | + pm_power_off = nas6210_power_off; | |
642 | + | |
643 | + else | |
644 | + pr_err("nas6210: failed to configure power-off gpio pin"); | |
645 | +} | |
646 | + | |
647 | +static int __init nas6210_pci_init(void) | |
648 | +{ | |
649 | + if (machine_is_nas6210()) { | |
650 | + kirkwood_pcie_init(KW_PCIE0); | |
651 | + } | |
652 | + return 0; | |
653 | +} | |
654 | +subsys_initcall(nas6210_pci_init); | |
655 | + | |
656 | +MACHINE_START(NAS6210, "RaidSonic ICY BOX IB-NAS62x0") | |
657 | + /* Maintainer: Arne Fitzenreiter <arne_f@ipfire.org> */ | |
658 | + .atag_offset = 0x00000100, | |
659 | + .init_machine = nas6210_init, | |
660 | + .map_io = kirkwood_map_io, | |
661 | + .init_early = kirkwood_init_early, | |
662 | + .init_irq = kirkwood_init_irq, | |
663 | + .timer = &kirkwood_timer, | |
664 | +MACHINE_END | |
665 | diff -Naur linux-3.2.25.org/arch/arm/tools/mach-types linux-3.2.25/arch/arm/tools/mach-types | |
666 | --- linux-3.2.25.org/arch/arm/tools/mach-types 2012-08-02 09:38:04.000000000 -0400 | |
667 | +++ linux-3.2.25/arch/arm/tools/mach-types 2012-08-11 10:18:52.849620229 -0400 | |
668 | @@ -448,6 +448,7 @@ | |
669 | riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576 | |
670 | riot_x37 MACH_RIOT_X37 RIOT_X37 2578 | |
671 | pca101 MACH_PCA101 PCA101 2595 | |
672 | +guruplug MACH_GURUPLUG GURUPLUG 2601 | |
673 | capc7117 MACH_CAPC7117 CAPC7117 2612 | |
674 | icontrol MACH_ICONTROL ICONTROL 2624 | |
675 | gplugd MACH_GPLUGD GPLUGD 2625 | |
676 | @@ -455,7 +456,7 @@ | |
677 | mx23evk MACH_MX23EVK MX23EVK 2629 | |
678 | ap4evb MACH_AP4EVB AP4EVB 2630 | |
679 | mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650 | |
680 | -guruplug MACH_GURUPLUG GURUPLUG 2659 | |
681 | +dreamplug1 MACH_DREAMPLUG1 DREAMPLUG1 2659 | |
682 | spear310 MACH_SPEAR310 SPEAR310 2660 | |
683 | spear320 MACH_SPEAR320 SPEAR320 2661 | |
684 | aquila MACH_AQUILA AQUILA 2676 | |
685 | @@ -1123,6 +1124,7 @@ | |
686 | thales_adc MACH_THALES_ADC THALES_ADC 3492 | |
687 | ubisys_p9d_evp MACH_UBISYS_P9D_EVP UBISYS_P9D_EVP 3493 | |
688 | atdgp318 MACH_ATDGP318 ATDGP318 3494 | |
689 | +dreamplug MACH_DREAMPLUG DREAMPLUG 3550 | |
690 | m28evk MACH_M28EVK M28EVK 3613 | |
691 | smdk4212 MACH_SMDK4212 SMDK4212 3638 | |
692 | smdk4412 MACH_SMDK4412 SMDK4412 3765 |