diff options
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r-- | arch/arm/mach-pxa/littleton.c | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 530654474bb2..9a4f51d48758 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/arch/pxafb.h> | 38 | #include <asm/arch/pxafb.h> |
39 | #include <asm/arch/ssp.h> | 39 | #include <asm/arch/ssp.h> |
40 | #include <asm/arch/pxa27x_keypad.h> | 40 | #include <asm/arch/pxa27x_keypad.h> |
41 | #include <asm/arch/pxa3xx_nand.h> | ||
41 | #include <asm/arch/littleton.h> | 42 | #include <asm/arch/littleton.h> |
42 | 43 | ||
43 | #include "generic.h" | 44 | #include "generic.h" |
@@ -101,7 +102,7 @@ static struct resource smc91x_resources[] = { | |||
101 | [1] = { | 102 | [1] = { |
102 | .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), | 103 | .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), |
103 | .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), | 104 | .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), |
104 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, | 105 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE, |
105 | } | 106 | } |
106 | }; | 107 | }; |
107 | 108 | ||
@@ -112,7 +113,7 @@ static struct platform_device smc91x_device = { | |||
112 | .resource = smc91x_resources, | 113 | .resource = smc91x_resources, |
113 | }; | 114 | }; |
114 | 115 | ||
115 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULES) | 116 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
116 | /* use bit 30, 31 as the indicator of command parameter number */ | 117 | /* use bit 30, 31 as the indicator of command parameter number */ |
117 | #define CMD0(x) ((0x00000000) | ((x) << 9)) | 118 | #define CMD0(x) ((0x00000000) | ((x) << 9)) |
118 | #define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) | 119 | #define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) |
@@ -311,9 +312,9 @@ static void littleton_init_lcd(void) | |||
311 | } | 312 | } |
312 | #else | 313 | #else |
313 | static inline void littleton_init_lcd(void) {}; | 314 | static inline void littleton_init_lcd(void) {}; |
314 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */ | 315 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ |
315 | 316 | ||
316 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 317 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
317 | static unsigned int littleton_matrix_key_map[] = { | 318 | static unsigned int littleton_matrix_key_map[] = { |
318 | /* KEY(row, col, key_code) */ | 319 | /* KEY(row, col, key_code) */ |
319 | KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), | 320 | KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), |
@@ -361,6 +362,57 @@ static void __init littleton_init_keypad(void) | |||
361 | static inline void littleton_init_keypad(void) {} | 362 | static inline void littleton_init_keypad(void) {} |
362 | #endif | 363 | #endif |
363 | 364 | ||
365 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
366 | static struct mtd_partition littleton_nand_partitions[] = { | ||
367 | [0] = { | ||
368 | .name = "Bootloader", | ||
369 | .offset = 0, | ||
370 | .size = 0x060000, | ||
371 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
372 | }, | ||
373 | [1] = { | ||
374 | .name = "Kernel", | ||
375 | .offset = 0x060000, | ||
376 | .size = 0x200000, | ||
377 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
378 | }, | ||
379 | [2] = { | ||
380 | .name = "Filesystem", | ||
381 | .offset = 0x0260000, | ||
382 | .size = 0x3000000, /* 48M - rootfs */ | ||
383 | }, | ||
384 | [3] = { | ||
385 | .name = "MassStorage", | ||
386 | .offset = 0x3260000, | ||
387 | .size = 0x3d40000, | ||
388 | }, | ||
389 | [4] = { | ||
390 | .name = "BBT", | ||
391 | .offset = 0x6FA0000, | ||
392 | .size = 0x80000, | ||
393 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
394 | }, | ||
395 | /* NOTE: we reserve some blocks at the end of the NAND flash for | ||
396 | * bad block management, and the max number of relocation blocks | ||
397 | * differs on different platforms. Please take care with it when | ||
398 | * defining the partition table. | ||
399 | */ | ||
400 | }; | ||
401 | |||
402 | static struct pxa3xx_nand_platform_data littleton_nand_info = { | ||
403 | .enable_arbiter = 1, | ||
404 | .parts = littleton_nand_partitions, | ||
405 | .nr_parts = ARRAY_SIZE(littleton_nand_partitions), | ||
406 | }; | ||
407 | |||
408 | static void __init littleton_init_nand(void) | ||
409 | { | ||
410 | pxa3xx_set_nand_info(&littleton_nand_info); | ||
411 | } | ||
412 | #else | ||
413 | static inline void littleton_init_nand(void) {} | ||
414 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | ||
415 | |||
364 | static void __init littleton_init(void) | 416 | static void __init littleton_init(void) |
365 | { | 417 | { |
366 | /* initialize MFP configurations */ | 418 | /* initialize MFP configurations */ |
@@ -374,6 +426,7 @@ static void __init littleton_init(void) | |||
374 | 426 | ||
375 | littleton_init_lcd(); | 427 | littleton_init_lcd(); |
376 | littleton_init_keypad(); | 428 | littleton_init_keypad(); |
429 | littleton_init_nand(); | ||
377 | } | 430 | } |
378 | 431 | ||
379 | MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") | 432 | MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") |