aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440/mach-anubis.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2007-07-11 06:10:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-12 05:56:25 -0400
commitad3613f4798e229c8885b924c88e17ab85fef96a (patch)
tree27c87cf58d6a8e705336e6997b1b06787a169d5c /arch/arm/mach-s3c2440/mach-anubis.c
parent8a9ccb7f182d15d6d6d0debb819790f25c87a30b (diff)
[ARM] 4469/1: ANUBIS: large page NAND support
Add support for the partition layour used on the revision B modules which ship with large page NAND flash as default. The differnce between the old and new layouts is that the large page devices use 128KiB blocks, so the initial loader partition now ends at 128KiB boundary pushing the begining of partition 1 up. The rest of the partitions are in the same place as the small page NAND devices. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-anubis.c')
-rw-r--r--arch/arm/mach-s3c2440/mach-anubis.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c
index 53675aa516f3..29c163d300d4 100644
--- a/arch/arm/mach-s3c2440/mach-anubis.c
+++ b/arch/arm/mach-s3c2440/mach-anubis.c
@@ -158,6 +158,29 @@ static struct mtd_partition anubis_default_nand_part[] = {
158 } 158 }
159}; 159};
160 160
161static struct mtd_partition anubis_default_nand_part_large[] = {
162 [0] = {
163 .name = "Boot Agent",
164 .size = SZ_128K,
165 .offset = 0,
166 },
167 [1] = {
168 .name = "/boot",
169 .size = SZ_4M - SZ_128K,
170 .offset = SZ_128K,
171 },
172 [2] = {
173 .name = "user1",
174 .offset = SZ_4M,
175 .size = SZ_32M - SZ_4M,
176 },
177 [3] = {
178 .name = "user2",
179 .offset = SZ_32M,
180 .size = MTDPART_SIZ_FULL,
181 }
182};
183
161/* the Anubis has 3 selectable slots for nand-flash, the two 184/* the Anubis has 3 selectable slots for nand-flash, the two
162 * on-board chip areas, as well as the external slot. 185 * on-board chip areas, as well as the external slot.
163 * 186 *
@@ -409,8 +432,17 @@ static void __init anubis_map_io(void)
409 s3c24xx_init_clocks(0); 432 s3c24xx_init_clocks(0);
410 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs)); 433 s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
411 434
412 /* ensure that the GPIO is setup */ 435 /* check for the newer revision boards with large page nand */
413 s3c2410_gpio_setpin(S3C2410_GPA0, 1); 436
437 if ((__raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK) >= 4) {
438 printk(KERN_INFO "ANUBIS-B detected (revision %d)\n",
439 __raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK);
440 anubis_nand_sets[0].partitions = anubis_default_nand_part_large;
441 anubis_nand_sets[0].nr_partitions = ARRAY_SIZE(anubis_default_nand_part_large);
442 } else {
443 /* ensure that the GPIO is setup */
444 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
445 }
414} 446}
415 447
416static void __init anubis_init(void) 448static void __init anubis_init(void)