diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2010-10-19 00:52:32 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-19 00:52:32 -0400 |
commit | 88fbadea18bd58a5a5ae2051e6bbbec7dcbacbb4 (patch) | |
tree | f0994240e60733f5f87fc9c57f436fbdf816519d /arch/arm/mach-s3c64xx/mach-real6410.c | |
parent | c115f67c03e468f18431840a97279cd3bfee8ad7 (diff) |
ARM: S3C64XX: add nand support for mach-real6410
Add nand device support and mtd partition table
for mach-real6410
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx/mach-real6410.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/mach-real6410.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index bed75d221329..9fd943d76aad 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/list.h> | 20 | #include <linux/list.h> |
21 | #include <linux/dm9000.h> | 21 | #include <linux/dm9000.h> |
22 | #include <linux/mtd/mtd.h> | ||
23 | #include <linux/mtd/partitions.h> | ||
22 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
23 | #include <linux/serial_core.h> | 25 | #include <linux/serial_core.h> |
24 | #include <linux/types.h> | 26 | #include <linux/types.h> |
@@ -37,6 +39,7 @@ | |||
37 | #include <plat/cpu.h> | 39 | #include <plat/cpu.h> |
38 | #include <plat/devs.h> | 40 | #include <plat/devs.h> |
39 | #include <plat/fb.h> | 41 | #include <plat/fb.h> |
42 | #include <plat/nand.h> | ||
40 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
41 | 44 | ||
42 | #include <video/platform_lcd.h> | 45 | #include <video/platform_lcd.h> |
@@ -147,11 +150,47 @@ static struct s3c_fb_platdata real6410_lcd_pdata __initdata = { | |||
147 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | 150 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, |
148 | }; | 151 | }; |
149 | 152 | ||
153 | static struct mtd_partition real6410_nand_part[] = { | ||
154 | [0] = { | ||
155 | .name = "uboot", | ||
156 | .size = SZ_1M, | ||
157 | .offset = 0, | ||
158 | }, | ||
159 | [1] = { | ||
160 | .name = "kernel", | ||
161 | .size = SZ_2M, | ||
162 | .offset = SZ_1M, | ||
163 | }, | ||
164 | [2] = { | ||
165 | .name = "rootfs", | ||
166 | .size = MTDPART_SIZ_FULL, | ||
167 | .offset = SZ_1M + SZ_2M, | ||
168 | }, | ||
169 | }; | ||
170 | |||
171 | static struct s3c2410_nand_set real6410_nand_sets[] = { | ||
172 | [0] = { | ||
173 | .name = "nand", | ||
174 | .nr_chips = 1, | ||
175 | .nr_partitions = ARRAY_SIZE(real6410_nand_part), | ||
176 | .partitions = real6410_nand_part, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | static struct s3c2410_platform_nand real6410_nand_info = { | ||
181 | .tacls = 25, | ||
182 | .twrph0 = 55, | ||
183 | .twrph1 = 40, | ||
184 | .nr_sets = ARRAY_SIZE(real6410_nand_sets), | ||
185 | .sets = real6410_nand_sets, | ||
186 | }; | ||
187 | |||
150 | static struct platform_device *real6410_devices[] __initdata = { | 188 | static struct platform_device *real6410_devices[] __initdata = { |
151 | &real6410_device_eth, | 189 | &real6410_device_eth, |
152 | &s3c_device_hsmmc0, | 190 | &s3c_device_hsmmc0, |
153 | &s3c_device_hsmmc1, | 191 | &s3c_device_hsmmc1, |
154 | &s3c_device_fb, | 192 | &s3c_device_fb, |
193 | &s3c_device_nand, | ||
155 | }; | 194 | }; |
156 | 195 | ||
157 | static void __init real6410_map_io(void) | 196 | static void __init real6410_map_io(void) |
@@ -249,6 +288,7 @@ static void __init real6410_machine_init(void) | |||
249 | real6410_lcd_pdata.win[0]->win_mode.yres); | 288 | real6410_lcd_pdata.win[0]->win_mode.yres); |
250 | 289 | ||
251 | s3c_fb_set_platdata(&real6410_lcd_pdata); | 290 | s3c_fb_set_platdata(&real6410_lcd_pdata); |
291 | s3c_nand_set_platdata(&real6410_nand_info); | ||
252 | 292 | ||
253 | /* configure nCS1 width to 16 bits */ | 293 | /* configure nCS1 width to 16 bits */ |
254 | 294 | ||