]>
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 | |
c84d6e62 | 3 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/dreamplug-setup.c 2011-09-26 17:21:05.000000000 +0000 |
1a1cdab0 AF |
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 | |
c84d6e62 AF |
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 00:00:00.000000000 +0000 | |
147 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/guruplug-setup.c 2011-09-26 17:22:21.000000000 +0000 | |
148 | @@ -0,0 +1,131 @@ | |
149 | +/* | |
150 | + * arch/arm/mach-kirkwood/guruplug-setup.c | |
151 | + * | |
152 | + * Marvell GuruPlug Reference Board Setup | |
153 | + * | |
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. | |
157 | + */ | |
158 | + | |
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> | |
171 | +#include "common.h" | |
172 | +#include "mpp.h" | |
173 | + | |
174 | +static struct mtd_partition guruplug_nand_parts[] = { | |
175 | + { | |
176 | + .name = "u-boot", | |
177 | + .offset = 0, | |
178 | + .size = SZ_1M | |
179 | + }, { | |
180 | + .name = "uImage", | |
181 | + .offset = MTDPART_OFS_NXTBLK, | |
182 | + .size = SZ_4M | |
183 | + }, { | |
184 | + .name = "root", | |
185 | + .offset = MTDPART_OFS_NXTBLK, | |
186 | + .size = MTDPART_SIZ_FULL | |
187 | + }, | |
188 | +}; | |
189 | + | |
190 | +static struct mv643xx_eth_platform_data guruplug_ge00_data = { | |
191 | + .phy_addr = MV643XX_ETH_PHY_ADDR(0), | |
192 | +}; | |
193 | + | |
194 | +static struct mv643xx_eth_platform_data guruplug_ge01_data = { | |
195 | + .phy_addr = MV643XX_ETH_PHY_ADDR(1), | |
196 | +}; | |
197 | + | |
198 | +static struct mv_sata_platform_data guruplug_sata_data = { | |
199 | + .n_ports = 1, | |
200 | +}; | |
201 | + | |
202 | +static struct mvsdio_platform_data guruplug_mvsdio_data = { | |
203 | + /* unfortunately the CD signal has not been connected */ | |
204 | +}; | |
205 | + | |
206 | +static struct gpio_led guruplug_led_pins[] = { | |
207 | + { | |
208 | + .name = "guruplug:red:health", | |
209 | + .gpio = 46, | |
210 | + .active_low = 1, | |
211 | + }, | |
212 | + { | |
213 | + .name = "guruplug:green:health", | |
214 | + .gpio = 47, | |
215 | + .active_low = 1, | |
216 | + }, | |
217 | + { | |
218 | + .name = "guruplug:red:wmode", | |
219 | + .gpio = 48, | |
220 | + .active_low = 1, | |
221 | + }, | |
222 | + { | |
223 | + .name = "guruplug:green:wmode", | |
224 | + .gpio = 49, | |
225 | + .active_low = 1, | |
226 | + }, | |
227 | +}; | |
228 | + | |
229 | +static struct gpio_led_platform_data guruplug_led_data = { | |
230 | + .leds = guruplug_led_pins, | |
231 | + .num_leds = ARRAY_SIZE(guruplug_led_pins), | |
232 | +}; | |
233 | + | |
234 | +static struct platform_device guruplug_leds = { | |
235 | + .name = "leds-gpio", | |
236 | + .id = -1, | |
237 | + .dev = { | |
238 | + .platform_data = &guruplug_led_data, | |
239 | + } | |
240 | +}; | |
241 | + | |
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 */ | |
247 | + 0 | |
248 | +}; | |
249 | + | |
250 | +static void __init guruplug_init(void) | |
251 | +{ | |
252 | + /* | |
253 | + * Basic setup. Needs to be called early. | |
254 | + */ | |
255 | + kirkwood_init(); | |
256 | + kirkwood_mpp_conf(guruplug_mpp_config); | |
257 | + | |
258 | + kirkwood_uart0_init(); | |
259 | + kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25); | |
260 | + | |
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); | |
266 | + | |
267 | + platform_device_register(&guruplug_leds); | |
268 | +} | |
269 | + | |
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, | |
279 | +MACHINE_END | |
1a1cdab0 AF |
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 01:57:37.000000000 +0000 | |
c84d6e62 AF |
282 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Kconfig 2011-09-26 17:22:21.000000000 +0000 |
283 | @@ -32,6 +32,18 @@ | |
1a1cdab0 AF |
284 | Say 'Y' here if you want your kernel to support the |
285 | Marvell SheevaPlug Reference Board. | |
286 | ||
287 | +config MACH_DREAMPLUG | |
288 | + bool "Marvell DreamPlug Reference Board" | |
289 | + help | |
290 | + Say 'Y' here if you want your kernel to support the | |
291 | + Marvell DreamPlug Reference Board. | |
c84d6e62 AF |
292 | + |
293 | +config MACH_GURUPLUG | |
294 | + bool "Marvell GuruPlug Reference Board" | |
295 | + help | |
296 | + Say 'Y' here if you want your kernel to support the | |
297 | + Marvell GuruPlug Reference Board. | |
1a1cdab0 AF |
298 | + |
299 | config MACH_TS219 | |
300 | bool "QNAP TS-119 and TS-219 Turbo NAS" | |
301 | help | |
302 | diff -Naur linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile | |
303 | --- linux-2.6.32.45.org/arch/arm/mach-kirkwood/Makefile 2011-08-16 01:57:37.000000000 +0000 | |
c84d6e62 AF |
304 | +++ linux-2.6.32.45/arch/arm/mach-kirkwood/Makefile 2011-09-26 17:23:30.000000000 +0000 |
305 | @@ -5,6 +5,8 @@ | |
1a1cdab0 AF |
306 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o |
307 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | |
308 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | |
c84d6e62 | 309 | +obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o |
1a1cdab0 AF |
310 | +obj-$(CONFIG_MACH_DREAMPLUG) += dreamplug-setup.o |
311 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o | |
312 | obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o | |
313 | ||
314 | diff -Naur linux-2.6.32.45.org/arch/arm/tools/mach-types linux-2.6.32.45/arch/arm/tools/mach-types | |
315 | --- linux-2.6.32.45.org/arch/arm/tools/mach-types 2011-08-16 01:57:37.000000000 +0000 | |
c84d6e62 AF |
316 | +++ linux-2.6.32.45/arch/arm/tools/mach-types 2011-09-26 17:33:30.000000000 +0000 |
317 | @@ -2536,3 +2536,5 @@ | |
1a1cdab0 AF |
318 | mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 |
319 | esyx MACH_ESYX ESYX 2551 | |
320 | bulldog MACH_BULLDOG BULLDOG 2553 | |
c84d6e62 | 321 | +guruplug MACH_GURUPLUG GURUPLUG 2601 |
1a1cdab0 | 322 | +dreamplug MACH_DREAMPLUG DREAMPLUG 2659 |