aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2009-09-10 02:37:48 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-11-30 20:02:44 -0500
commitef559def40cd5861ba2da747747c42c2f7331057 (patch)
treebca5ac8396bc2a8ff7bb7f4516f7eb2e990f1a5f
parenta0f266c1fa040e1fe61b51e3de75b6a11e32ceb1 (diff)
[ARM] pxa: add nand support in aspensite board
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-mmp/aspenite.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index 4562452d4074..a2d307ec0420 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -13,6 +13,9 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/smc91x.h> 15#include <linux/smc91x.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/partitions.h>
18#include <linux/mtd/nand.h>
16 19
17#include <asm/mach-types.h> 20#include <asm/mach-types.h>
18#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
@@ -85,12 +88,48 @@ static struct platform_device smc91x_device = {
85 .resource = smc91x_resources, 88 .resource = smc91x_resources,
86}; 89};
87 90
91static struct mtd_partition aspenite_nand_partitions[] = {
92 {
93 .name = "bootloader",
94 .offset = 0,
95 .size = SZ_1M,
96 .mask_flags = MTD_WRITEABLE,
97 }, {
98 .name = "reserved",
99 .offset = MTDPART_OFS_APPEND,
100 .size = SZ_128K,
101 .mask_flags = MTD_WRITEABLE,
102 }, {
103 .name = "reserved",
104 .offset = MTDPART_OFS_APPEND,
105 .size = SZ_8M,
106 .mask_flags = MTD_WRITEABLE,
107 }, {
108 .name = "kernel",
109 .offset = MTDPART_OFS_APPEND,
110 .size = (SZ_2M + SZ_1M),
111 .mask_flags = 0,
112 }, {
113 .name = "filesystem",
114 .offset = MTDPART_OFS_APPEND,
115 .size = SZ_48M,
116 .mask_flags = 0,
117 }
118};
119
120static struct pxa3xx_nand_platform_data aspenite_nand_info = {
121 .enable_arbiter = 1,
122 .parts = aspenite_nand_partitions,
123 .nr_parts = ARRAY_SIZE(aspenite_nand_partitions),
124};
125
88static void __init common_init(void) 126static void __init common_init(void)
89{ 127{
90 mfp_config(ARRAY_AND_SIZE(common_pin_config)); 128 mfp_config(ARRAY_AND_SIZE(common_pin_config));
91 129
92 /* on-chip devices */ 130 /* on-chip devices */
93 pxa168_add_uart(1); 131 pxa168_add_uart(1);
132 pxa168_add_nand(&aspenite_nand_info);
94 133
95 /* off-chip devices */ 134 /* off-chip devices */
96 platform_device_register(&smc91x_device); 135 platform_device_register(&smc91x_device);