]>
Commit | Line | Data |
---|---|---|
1a1cdab0 AF |
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 00:00:00.000000000 +0000 | |
3 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/dreamplug-setup.c 2011-09-15 19:23:01.000000000 +0000 | |
4 | @@ -0,0 +1,140 @@ | |
5 | +/* | |
6 | + * arch/arm/mach-kirkwood/dreamplug-setup.c | |
7 | + * | |
8 | + * Marvell DreamPlug Reference Board Setup | |
9 | + * | |
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. | |
13 | + */ | |
14 | + | |
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> | |
30 | +#include "common.h" | |
31 | +#include "mpp.h" | |
32 | + | |
33 | +static const struct flash_platform_data dreamplug_spi_slave_data = { | |
34 | + .type = "mx25l1606e", | |
35 | +}; | |
36 | + | |
37 | +static struct spi_board_info __initdata dreamplug_spi_slave_info[] = { | |
38 | + { | |
39 | + .modalias = "m25p80", | |
40 | + .platform_data = &dreamplug_spi_slave_data, | |
41 | + .irq = -1, | |
42 | + .max_speed_hz = 50000000, | |
43 | + .bus_num = 0, | |
44 | + .chip_select = 0, | |
45 | + }, | |
46 | +}; | |
47 | + | |
48 | +static struct mv643xx_eth_platform_data dreamplug_ge00_data = { | |
49 | + .phy_addr = MV643XX_ETH_PHY_ADDR(0), | |
50 | +}; | |
51 | + | |
52 | +static struct mv643xx_eth_platform_data dreamplug_ge01_data = { | |
53 | + .phy_addr = MV643XX_ETH_PHY_ADDR(1), | |
54 | +}; | |
55 | + | |
56 | +static struct mv_sata_platform_data dreamplug_sata_data = { | |
57 | + .n_ports = 1, | |
58 | +}; | |
59 | + | |
60 | +static struct mvsdio_platform_data dreamplug_mvsdio_data = { | |
61 | + /* unfortunately the CD signal has not been connected */ | |
62 | +}; | |
63 | + | |
64 | +static struct gpio_led dreamplug_led_pins[] = { | |
65 | + { | |
66 | + .name = "dreamplug:blue:bluetooth", | |
67 | + .gpio = 47, | |
68 | + .active_low = 1, | |
69 | + }, | |
70 | + { | |
71 | + .name = "dreamplug:green:wlan", | |
72 | + .gpio = 48, | |
73 | + .active_low = 1, | |
74 | + }, | |
75 | + { | |
76 | + .name = "dreamplug:blue:wlanap", | |
77 | + .gpio = 49, | |
78 | + .active_low = 1, | |
79 | + }, | |
80 | +}; | |
81 | + | |
82 | +static struct gpio_led_platform_data dreamplug_led_data = { | |
83 | + .leds = dreamplug_led_pins, | |
84 | + .num_leds = ARRAY_SIZE(dreamplug_led_pins), | |
85 | +}; | |
86 | + | |
87 | +static struct platform_device dreamplug_leds = { | |
88 | + .name = "leds-gpio", | |
89 | + .id = -1, | |
90 | + .dev = { | |
91 | + .platform_data = &dreamplug_led_data, | |
92 | + } | |
93 | +}; | |
94 | + | |
95 | +static unsigned int dreamplug_mpp_config[] __initdata = { | |
96 | + MPP0_SPI_SCn, | |
97 | + MPP1_SPI_MOSI, | |
98 | + MPP2_SPI_SCK, | |
99 | + MPP3_SPI_MISO, | |
100 | + MPP4_GPIO, | |
101 | + MPP5_GPO, | |
102 | + MPP7_GPO, | |
103 | + MPP18_GPO, | |
104 | + MPP19_GPO, | |
105 | + MPP47_GPIO, /* B_BLED */ | |
106 | + MPP48_GPIO, /* W_GLED */ | |
107 | + MPP49_GPIO, /* W_BLED */ | |
108 | + 0 | |
109 | +}; | |
110 | + | |
111 | +static void __init dreamplug_init(void) | |
112 | +{ | |
113 | + /* | |
114 | + * Basic setup. Needs to be called early. | |
115 | + */ | |
116 | + kirkwood_init(); | |
117 | + kirkwood_mpp_conf(dreamplug_mpp_config); | |
118 | + | |
119 | + kirkwood_uart0_init(); | |
120 | + | |
121 | + spi_register_board_info(dreamplug_spi_slave_info, | |
122 | + ARRAY_SIZE(dreamplug_spi_slave_info)); | |
123 | + | |
124 | + kirkwood_spi_init(); | |
125 | + kirkwood_ehci_init(); | |
126 | + | |
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); | |
131 | + | |
132 | + platform_device_register(&dreamplug_leds); | |
133 | +} | |
134 | + | |
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, | |
144 | +MACHINE_END | |
145 | diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/Kconfig linux-2.6.32.45/arch/arm/mach-kirkwood/Kconfig | |
146 | --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/Kconfig 2011-08-16 01:57:37.000000000 +0000 | |
147 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Kconfig 2011-09-15 18:34:19.000000000 +0000 | |
148 | @@ -32,6 +32,12 @@ | |
149 | Say 'Y' here if you want your kernel to support the | |
150 | Marvell SheevaPlug Reference Board. | |
151 | ||
152 | +config MACH_DREAMPLUG | |
153 | + bool "Marvell DreamPlug Reference Board" | |
154 | + help | |
155 | + Say 'Y' here if you want your kernel to support the | |
156 | + Marvell DreamPlug Reference Board. | |
157 | + | |
158 | config MACH_TS219 | |
159 | bool "QNAP TS-119 and TS-219 Turbo NAS" | |
160 | help | |
161 | diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile | |
162 | --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile 2011-08-16 01:57:37.000000000 +0000 | |
163 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile 2011-09-15 18:36:51.000000000 +0000 | |
164 | @@ -5,6 +5,7 @@ | |
165 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | |
166 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | |
167 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | |
168 | +obj-$(CONFIG_MACH_DREAMPLUG) += dreamplug-setup.o | |
169 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o | |
170 | obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o | |
171 | ||
172 | diff -Naur linux-2.6.32.45.org/arch/arm/tools/mach-types linux-2.6.32.45/arch/arm/tools/mach-types | |
173 | --- linux-2.6.32.45.org/arch/arm/tools/mach-types 2011-08-16 01:57:37.000000000 +0000 | |
174 | +++ linux-2.6.32.45/arch/arm/tools/mach-types 2011-09-15 19:12:48.000000000 +0000 | |
175 | @@ -2536,3 +2536,4 @@ | |
176 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 | |
177 | esyx MACH_ESYX ESYX 2551 | |
178 | bulldog MACH_BULLDOG BULLDOG 2553 | |
179 | +dreamplug MACH_DREAMPLUG DREAMPLUG 2659 |