aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-02 03:37:20 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-09 16:38:33 -0400
commit481b55262e396930e6e35b8a6d41e7c146e10241 (patch)
treea0d1eeff8359a639f084bbea7a127230fb4ec014 /arch
parent9ae819a819b4dfc60ac13dd1f1e1a7eaa3d4a6cb (diff)
[ARM] pxa: add pxa3xx NAND support for zylonite
Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Sergey Podstavin <spodstavin@ru.mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/zylonite.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 7465a9ce1686..13ab2985a026 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"
@@ -324,6 +325,57 @@ static void __init zylonite_init_keypad(void)
324static inline void zylonite_init_keypad(void) {} 325static inline void zylonite_init_keypad(void) {}
325#endif 326#endif
326 327
328#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
329static struct mtd_partition zylonite_nand_partitions[] = {
330 [0] = {
331 .name = "Bootloader",
332 .offset = 0,
333 .size = 0x060000,
334 .mask_flags = MTD_WRITEABLE, /* force read-only */
335 },
336 [1] = {
337 .name = "Kernel",
338 .offset = 0x060000,
339 .size = 0x200000,
340 .mask_flags = MTD_WRITEABLE, /* force read-only */
341 },
342 [2] = {
343 .name = "Filesystem",
344 .offset = 0x0260000,
345 .size = 0x3000000, /* 48M - rootfs */
346 },
347 [3] = {
348 .name = "MassStorage",
349 .offset = 0x3260000,
350 .size = 0x3d40000,
351 },
352 [4] = {
353 .name = "BBT",
354 .offset = 0x6FA0000,
355 .size = 0x80000,
356 .mask_flags = MTD_WRITEABLE, /* force read-only */
357 },
358 /* NOTE: we reserve some blocks at the end of the NAND flash for
359 * bad block management, and the max number of relocation blocks
360 * differs on different platforms. Please take care with it when
361 * defining the partition table.
362 */
363};
364
365static struct pxa3xx_nand_platform_data zylonite_nand_info = {
366 .enable_arbiter = 1,
367 .parts = zylonite_nand_partitions,
368 .nr_parts = ARRAY_SIZE(zylonite_nand_partitions),
369};
370
371static void __init zylonite_init_nand(void)
372{
373 pxa3xx_set_nand_info(&zylonite_nand_info);
374}
375#else
376static inline void zylonite_init_nand(void) {}
377#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
378
327static void __init zylonite_init(void) 379static void __init zylonite_init(void)
328{ 380{
329 /* board-processor specific initialization */ 381 /* board-processor specific initialization */
@@ -342,6 +394,7 @@ static void __init zylonite_init(void)
342 zylonite_init_lcd(); 394 zylonite_init_lcd();
343 zylonite_init_mmc(); 395 zylonite_init_mmc();
344 zylonite_init_keypad(); 396 zylonite_init_keypad();
397 zylonite_init_nand();
345} 398}
346 399
347MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 400MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")