diff options
Diffstat (limited to 'arch/arm/mach-pxa/zylonite.c')
-rw-r--r-- | arch/arm/mach-pxa/zylonite.c | 94 |
1 files changed, 93 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 66b446ca273d..4a4711d36e73 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/arch/zylonite.h> | 29 | #include <asm/arch/zylonite.h> |
30 | #include <asm/arch/mmc.h> | 30 | #include <asm/arch/mmc.h> |
31 | #include <asm/arch/pxa27x_keypad.h> | 31 | #include <asm/arch/pxa27x_keypad.h> |
32 | #include <asm/arch/pxa3xx_nand.h> | ||
32 | 33 | ||
33 | #include "devices.h" | 34 | #include "devices.h" |
34 | #include "generic.h" | 35 | #include "generic.h" |
@@ -37,6 +38,8 @@ | |||
37 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; | 38 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; |
38 | 39 | ||
39 | int gpio_eth_irq; | 40 | int gpio_eth_irq; |
41 | int gpio_debug_led1; | ||
42 | int gpio_debug_led2; | ||
40 | 43 | ||
41 | int wm9713_irq; | 44 | int wm9713_irq; |
42 | 45 | ||
@@ -63,6 +66,42 @@ static struct platform_device smc91x_device = { | |||
63 | .resource = smc91x_resources, | 66 | .resource = smc91x_resources, |
64 | }; | 67 | }; |
65 | 68 | ||
69 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
70 | static struct gpio_led zylonite_debug_leds[] = { | ||
71 | [0] = { | ||
72 | .name = "zylonite:yellow:1", | ||
73 | .default_trigger = "heartbeat", | ||
74 | }, | ||
75 | [1] = { | ||
76 | .name = "zylonite:yellow:2", | ||
77 | .default_trigger = "default-on", | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | static struct gpio_led_platform_data zylonite_debug_leds_info = { | ||
82 | .leds = zylonite_debug_leds, | ||
83 | .num_leds = ARRAY_SIZE(zylonite_debug_leds), | ||
84 | }; | ||
85 | |||
86 | static struct platform_device zylonite_device_leds = { | ||
87 | .name = "leds-gpio", | ||
88 | .id = -1, | ||
89 | .dev = { | ||
90 | .platform_data = &zylonite_debug_leds_info, | ||
91 | } | ||
92 | }; | ||
93 | |||
94 | static void __init zylonite_init_leds(void) | ||
95 | { | ||
96 | zylonite_debug_leds[0].gpio = gpio_debug_led1; | ||
97 | zylonite_debug_leds[1].gpio = gpio_debug_led2; | ||
98 | |||
99 | platform_device_register(&zylonite_device_leds); | ||
100 | } | ||
101 | #else | ||
102 | static inline void zylonite_init_leds(void) {} | ||
103 | #endif | ||
104 | |||
66 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 105 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
67 | static struct platform_pwm_backlight_data zylonite_backlight_data = { | 106 | static struct platform_pwm_backlight_data zylonite_backlight_data = { |
68 | .pwm_id = 3, | 107 | .pwm_id = 3, |
@@ -259,7 +298,7 @@ static void __init zylonite_init_mmc(void) | |||
259 | static inline void zylonite_init_mmc(void) {} | 298 | static inline void zylonite_init_mmc(void) {} |
260 | #endif | 299 | #endif |
261 | 300 | ||
262 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 301 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
263 | static unsigned int zylonite_matrix_key_map[] = { | 302 | static unsigned int zylonite_matrix_key_map[] = { |
264 | /* KEY(row, col, key_code) */ | 303 | /* KEY(row, col, key_code) */ |
265 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), | 304 | KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), |
@@ -324,6 +363,57 @@ static void __init zylonite_init_keypad(void) | |||
324 | static inline void zylonite_init_keypad(void) {} | 363 | static inline void zylonite_init_keypad(void) {} |
325 | #endif | 364 | #endif |
326 | 365 | ||
366 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
367 | static struct mtd_partition zylonite_nand_partitions[] = { | ||
368 | [0] = { | ||
369 | .name = "Bootloader", | ||
370 | .offset = 0, | ||
371 | .size = 0x060000, | ||
372 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
373 | }, | ||
374 | [1] = { | ||
375 | .name = "Kernel", | ||
376 | .offset = 0x060000, | ||
377 | .size = 0x200000, | ||
378 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
379 | }, | ||
380 | [2] = { | ||
381 | .name = "Filesystem", | ||
382 | .offset = 0x0260000, | ||
383 | .size = 0x3000000, /* 48M - rootfs */ | ||
384 | }, | ||
385 | [3] = { | ||
386 | .name = "MassStorage", | ||
387 | .offset = 0x3260000, | ||
388 | .size = 0x3d40000, | ||
389 | }, | ||
390 | [4] = { | ||
391 | .name = "BBT", | ||
392 | .offset = 0x6FA0000, | ||
393 | .size = 0x80000, | ||
394 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
395 | }, | ||
396 | /* NOTE: we reserve some blocks at the end of the NAND flash for | ||
397 | * bad block management, and the max number of relocation blocks | ||
398 | * differs on different platforms. Please take care with it when | ||
399 | * defining the partition table. | ||
400 | */ | ||
401 | }; | ||
402 | |||
403 | static struct pxa3xx_nand_platform_data zylonite_nand_info = { | ||
404 | .enable_arbiter = 1, | ||
405 | .parts = zylonite_nand_partitions, | ||
406 | .nr_parts = ARRAY_SIZE(zylonite_nand_partitions), | ||
407 | }; | ||
408 | |||
409 | static void __init zylonite_init_nand(void) | ||
410 | { | ||
411 | pxa3xx_set_nand_info(&zylonite_nand_info); | ||
412 | } | ||
413 | #else | ||
414 | static inline void zylonite_init_nand(void) {} | ||
415 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | ||
416 | |||
327 | static void __init zylonite_init(void) | 417 | static void __init zylonite_init(void) |
328 | { | 418 | { |
329 | /* board-processor specific initialization */ | 419 | /* board-processor specific initialization */ |
@@ -342,6 +432,8 @@ static void __init zylonite_init(void) | |||
342 | zylonite_init_lcd(); | 432 | zylonite_init_lcd(); |
343 | zylonite_init_mmc(); | 433 | zylonite_init_mmc(); |
344 | zylonite_init_keypad(); | 434 | zylonite_init_keypad(); |
435 | zylonite_init_nand(); | ||
436 | zylonite_init_leds(); | ||
345 | } | 437 | } |
346 | 438 | ||
347 | MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") | 439 | MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") |