1 diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/dreamplug-setup.c linux-2.6.32.45/arch/arm/mach-kirkwood/dreamplug-setup.c
2 --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/dreamplug-setup.c 1970-01-01 01:00:00.000000000 +0100
3 +++ linux-2.6.32.45/arch/arm/mach-kirkwood/dreamplug-setup.c 2011-10-11 15:35:37.000000000 +0200
6 + * arch/arm/mach-kirkwood/dreamplug-setup.c
8 + * Marvell DreamPlug Reference Board Setup
10 + * This file is licensed under the terms of the GNU General Public
11 + * License version 2. This program is licensed "as is" without any
12 + * warranty of any kind, whether express or implied.
15 +#include <linux/kernel.h>
16 +#include <linux/init.h>
17 +#include <linux/platform_device.h>
18 +#include <linux/mtd/partitions.h>
19 +#include <linux/ata_platform.h>
20 +#include <linux/mv643xx_eth.h>
21 +#include <linux/gpio.h>
22 +#include <linux/leds.h>
23 +#include <linux/spi/flash.h>
24 +#include <linux/spi/spi.h>
25 +#include <linux/spi/orion_spi.h>
26 +#include <asm/mach-types.h>
27 +#include <asm/mach/arch.h>
28 +#include <mach/kirkwood.h>
29 +#include <plat/mvsdio.h>
33 +static const struct flash_platform_data dreamplug_spi_slave_data = {
34 + .type = "mx25l1606e",
37 +static struct spi_board_info __initdata dreamplug_spi_slave_info[] = {
39 + .modalias = "m25p80",
40 + .platform_data = &dreamplug_spi_slave_data,
42 + .max_speed_hz = 50000000,
48 +static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
49 + .phy_addr = MV643XX_ETH_PHY_ADDR(0),
52 +static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
53 + .phy_addr = MV643XX_ETH_PHY_ADDR(1),
56 +static struct mv_sata_platform_data dreamplug_sata_data = {
60 +static struct mvsdio_platform_data dreamplug_mvsdio_data = {
61 + /* unfortunately the CD signal has not been connected */
64 +static struct gpio_led dreamplug_led_pins[] = {
66 + .name = "dreamplug:blue:bluetooth",
71 + .name = "dreamplug:green:wlan",
76 + .name = "dreamplug:blue:wlanap",
82 +static struct gpio_led_platform_data dreamplug_led_data = {
83 + .leds = dreamplug_led_pins,
84 + .num_leds = ARRAY_SIZE(dreamplug_led_pins),
87 +static struct platform_device dreamplug_leds = {
88 + .name = "leds-gpio",
91 + .platform_data = &dreamplug_led_data,
95 +static unsigned int dreamplug_mpp_config[] __initdata = {
105 + MPP47_GPIO, /* B_BLED */
106 + MPP48_GPIO, /* W_GLED */
107 + MPP49_GPIO, /* W_BLED */
111 +static void __init dreamplug_init(void)
114 + * Basic setup. Needs to be called early.
117 + kirkwood_mpp_conf(dreamplug_mpp_config);
119 + kirkwood_uart0_init();
121 + spi_register_board_info(dreamplug_spi_slave_info,
122 + ARRAY_SIZE(dreamplug_spi_slave_info));
124 + kirkwood_spi_init();
125 + kirkwood_ehci_init();
127 + kirkwood_ge00_init(&dreamplug_ge00_data);
128 + kirkwood_ge01_init(&dreamplug_ge01_data);
129 + kirkwood_sata_init(&dreamplug_sata_data);
130 + kirkwood_sdio_init(&dreamplug_mvsdio_data);
132 + platform_device_register(&dreamplug_leds);
135 +MACHINE_START(DREAMPLUG, "Marvell DreamPlug Reference Board")
136 + /* Maintainer: Siddarth Gore <gores <at> marvell.com> */
137 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
138 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
139 + .boot_params = 0x00000100,
140 + .init_machine = dreamplug_init,
141 + .map_io = kirkwood_map_io,
142 + .init_irq = kirkwood_init_irq,
143 + .timer = &kirkwood_timer,
145 diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/guruplug-setup.c linux-2.6.32.45/arch/arm/mach-kirkwood/guruplug-setup.c
146 --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/guruplug-setup.c 1970-01-01 01:00:00.000000000 +0100
147 +++ linux-2.6.32.45/arch/arm/mach-kirkwood/guruplug-setup.c 2011-10-11 15:35:37.000000000 +0200
150 + * arch/arm/mach-kirkwood/guruplug-setup.c
152 + * Marvell GuruPlug Reference Board Setup
154 + * This file is licensed under the terms of the GNU General Public
155 + * License version 2. This program is licensed "as is" without any
156 + * warranty of any kind, whether express or implied.
159 +#include <linux/kernel.h>
160 +#include <linux/init.h>
161 +#include <linux/platform_device.h>
162 +#include <linux/mtd/partitions.h>
163 +#include <linux/ata_platform.h>
164 +#include <linux/mv643xx_eth.h>
165 +#include <linux/gpio.h>
166 +#include <linux/leds.h>
167 +#include <asm/mach-types.h>
168 +#include <asm/mach/arch.h>
169 +#include <mach/kirkwood.h>
170 +#include <plat/mvsdio.h>
174 +static struct mtd_partition guruplug_nand_parts[] = {
181 + .offset = MTDPART_OFS_NXTBLK,
185 + .offset = MTDPART_OFS_NXTBLK,
186 + .size = MTDPART_SIZ_FULL
190 +static struct mv643xx_eth_platform_data guruplug_ge00_data = {
191 + .phy_addr = MV643XX_ETH_PHY_ADDR(0),
194 +static struct mv643xx_eth_platform_data guruplug_ge01_data = {
195 + .phy_addr = MV643XX_ETH_PHY_ADDR(1),
198 +static struct mv_sata_platform_data guruplug_sata_data = {
202 +static struct mvsdio_platform_data guruplug_mvsdio_data = {
203 + /* unfortunately the CD signal has not been connected */
206 +static struct gpio_led guruplug_led_pins[] = {
208 + .name = "guruplug:red:health",
213 + .name = "guruplug:green:health",
218 + .name = "guruplug:red:wmode",
223 + .name = "guruplug:green:wmode",
229 +static struct gpio_led_platform_data guruplug_led_data = {
230 + .leds = guruplug_led_pins,
231 + .num_leds = ARRAY_SIZE(guruplug_led_pins),
234 +static struct platform_device guruplug_leds = {
235 + .name = "leds-gpio",
238 + .platform_data = &guruplug_led_data,
242 +static unsigned int guruplug_mpp_config[] __initdata = {
243 + MPP46_GPIO, /* M_RLED */
244 + MPP47_GPIO, /* M_GLED */
245 + MPP48_GPIO, /* B_RLED */
246 + MPP49_GPIO, /* B_GLED */
250 +static void __init guruplug_init(void)
253 + * Basic setup. Needs to be called early.
256 + kirkwood_mpp_conf(guruplug_mpp_config);
258 + kirkwood_uart0_init();
259 + kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25);
261 + kirkwood_ehci_init();
262 + kirkwood_ge00_init(&guruplug_ge00_data);
263 + kirkwood_ge01_init(&guruplug_ge01_data);
264 + kirkwood_sata_init(&guruplug_sata_data);
265 + kirkwood_sdio_init(&guruplug_mvsdio_data);
267 + platform_device_register(&guruplug_leds);
270 +MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
271 + /* Maintainer: Siddarth Gore <gores@marvell.com> */
272 + .phys_io = KIRKWOOD_REGS_PHYS_BASE,
273 + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
274 + .boot_params = 0x00000100,
275 + .init_machine = guruplug_init,
276 + .map_io = kirkwood_map_io,
277 + .init_irq = kirkwood_init_irq,
278 + .timer = &kirkwood_timer,
280 diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/Kconfig linux-2.6.32.45/arch/arm/mach-kirkwood/Kconfig
281 --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/Kconfig 2011-08-16 03:57:37.000000000 +0200
282 +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Kconfig 2011-10-15 17:06:55.816070291 +0200
284 Say 'Y' here if you want your kernel to support the
285 Marvell SheevaPlug Reference Board.
287 +config MACH_DREAMPLUG
288 + bool "Marvell DreamPlug Reference Board"
290 + Say 'Y' here if you want your kernel to support the
291 + Marvell DreamPlug Reference Board.
293 +config MACH_GURUPLUG
294 + bool "Marvell GuruPlug Reference Board"
296 + Say 'Y' here if you want your kernel to support the
297 + Marvell GuruPlug Reference Board.
300 bool "QNAP TS-119 and TS-219 Turbo NAS"
303 Say 'Y' here if you want your kernel to support the
304 Marvell OpenRD Base Board.
307 + bool "RaidSonic ICY BOX IB-NAS62x0"
309 + Say 'Y' here if you want your kernel to support the
310 + RaidSonic ICY BOX IB-NAS62x0 device.
315 diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile
316 --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile 2011-08-16 03:57:37.000000000 +0200
317 +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile 2011-10-15 17:07:16.346068829 +0200
319 obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
320 obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
321 obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
322 +obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
323 +obj-$(CONFIG_MACH_DREAMPLUG) += dreamplug-setup.o
324 obj-$(CONFIG_MACH_TS219) += ts219-setup.o
325 obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o
326 +obj-$(CONFIG_MACH_NAS6210) += nas6210-setup.o
328 obj-$(CONFIG_CPU_IDLE) += cpuidle.o
329 diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/nas6210-setup.c linux-2.6.32.45/arch/arm/mach-kirkwood/nas6210-setup.c
330 --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/nas6210-setup.c 1970-01-01 01:00:00.000000000 +0100
331 +++ linux-2.6.32.45/arch/arm/mach-kirkwood/nas6210-setup.c 2011-10-16 09:57:35.268409525 +0200
334 + * arch/arm/mach-kirkwood/nas6210-setup.c
336 + * Raidsonic ICYBOX NAS6210 and 6220 Board Setup
338 + * This file is licensed under the terms of the GNU General Public
339 + * License version 2. This program is licensed "as is" without any
340 + * warranty of any kind, whether express or implied.
343 +#include <linux/kernel.h>
344 +#include <linux/init.h>
345 +#include <linux/platform_device.h>
346 +#include <linux/mtd/partitions.h>
347 +#include <linux/ata_platform.h>
348 +#include <linux/mv643xx_eth.h>
349 +#include <linux/gpio.h>
350 +#include <linux/gpio_keys.h>
351 +#include <linux/input.h>
352 +#include <linux/leds.h>
353 +#include <asm/mach-types.h>
354 +#include <asm/mach/arch.h>
355 +#include <mach/kirkwood.h>
359 +#define NAS6210_GPIO_POWER_OFF 24
361 +static struct mtd_partition nas6210_nand_parts[] = {
368 + .offset = MTDPART_OFS_NXTBLK,
372 + .offset = MTDPART_OFS_NXTBLK,
373 + .size = MTDPART_SIZ_FULL
377 +static struct mv643xx_eth_platform_data nas6210_ge00_data = {
378 + .phy_addr = MV643XX_ETH_PHY_ADDR(8),
381 +static struct mv_sata_platform_data nas6210_sata_data = {
385 +static struct gpio_led nas6210_led_pins[] = {
387 + .name = "nas6210:green:power",
388 + .default_trigger = "default-on",
393 + .name = "nas6210:red:power",
394 + .default_trigger = "none",
399 + .name = "nas6210:red:usb_copy",
400 + .default_trigger = "none",
406 +static struct gpio_led_platform_data nas6210_led_data = {
407 + .leds = nas6210_led_pins,
408 + .num_leds = ARRAY_SIZE(nas6210_led_pins),
411 +static struct platform_device nas6210_leds = {
412 + .name = "leds-gpio",
415 + .platform_data = &nas6210_led_data,
419 +static struct gpio_keys_button nas6210_buttons[] = {
423 + .desc = "USB Copy",
427 + .code = KEY_RESTART,
434 +static struct gpio_keys_platform_data nas6210_button_data = {
435 + .buttons = nas6210_buttons,
436 + .nbuttons = ARRAY_SIZE(nas6210_buttons),
439 +static struct platform_device nas6210_button_device = {
440 + .name = "gpio-keys",
442 + .num_resources = 0,
444 + .platform_data = &nas6210_button_data,
448 +static unsigned int nas6210_mpp_config[] __initdata = {
457 + MPP22_GPIO, /* Power LED red */
458 + MPP24_GPIO, /* Power off */
459 + MPP25_GPIO, /* Power LED green */
460 + MPP27_GPIO, /* USB transfer LED */
461 + MPP28_GPIO, /* Reset button */
462 + MPP29_GPIO, /* USB Copy button */
466 +void nas6210_power_off(void)
468 + gpio_set_value(NAS6210_GPIO_POWER_OFF, 1);
472 +static void __init nas6210_init(void)
475 + * Basic setup. Needs to be called early.
478 + kirkwood_mpp_conf(nas6210_mpp_config);
480 + kirkwood_nand_init(ARRAY_AND_SIZE(nas6210_nand_parts), 25);
481 + kirkwood_ehci_init();
482 + kirkwood_ge00_init(&nas6210_ge00_data);
483 + kirkwood_sata_init(&nas6210_sata_data);
484 + kirkwood_uart0_init();
485 + platform_device_register(&nas6210_leds);
486 + platform_device_register(&nas6210_button_device);
488 + if (gpio_request(NAS6210_GPIO_POWER_OFF, "power-off") == 0 &&
489 + gpio_direction_output(NAS6210_GPIO_POWER_OFF, 0) == 0)
490 + pm_power_off = nas6210_power_off;
493 + pr_err("nas6210: failed to configure power-off gpio pin");
496 +static int __init nas6210_pci_init(void)
498 + if (machine_is_nas6210()) {
499 + kirkwood_pcie_init();
503 +subsys_initcall(nas6210_pci_init);
505 +MACHINE_START(NAS6210, "RaidSonic ICY BOX IB-NAS62x0")
506 + /* Maintainer: Arne Fitzenreiter <arne_f@ipfire.org> */
507 + .boot_params = 0x00000100,
508 + .init_machine = nas6210_init,
509 + .map_io = kirkwood_map_io,
510 + .init_irq = kirkwood_init_irq,
511 + .timer = &kirkwood_timer,
513 diff -Naur linux-2.6.32.45.org/arch/arm/tools/mach-types linux-2.6.32.45/arch/arm/tools/mach-types
514 --- linux-2.6.32.45.org/arch/arm/tools/mach-types 2011-08-16 03:57:37.000000000 +0200
515 +++ linux-2.6.32.45/arch/arm/tools/mach-types 2011-10-15 17:05:46.486069811 +0200
516 @@ -2536,3 +2536,6 @@
517 mxt_td60 MACH_MXT_TD60 MXT_TD60 2550
518 esyx MACH_ESYX ESYX 2551
519 bulldog MACH_BULLDOG BULLDOG 2553
520 +guruplug MACH_GURUPLUG GURUPLUG 2601
521 +dreamplug MACH_DREAMPLUG DREAMPLUG 2659
522 +nas6210 MACH_NAS6210 NAS6210 3104