diff options
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 15811601f03d..89f4c9c5777b 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -166,6 +166,29 @@ static struct mtd_partition osiris_default_nand_part[] = { | |||
166 | } | 166 | } |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static struct mtd_partition osiris_default_nand_part_large[] = { | ||
170 | [0] = { | ||
171 | .name = "Boot Agent", | ||
172 | .size = SZ_128K, | ||
173 | .offset = 0, | ||
174 | }, | ||
175 | [1] = { | ||
176 | .name = "/boot", | ||
177 | .size = SZ_4M - SZ_128K, | ||
178 | .offset = SZ_128K, | ||
179 | }, | ||
180 | [2] = { | ||
181 | .name = "user1", | ||
182 | .offset = SZ_4M, | ||
183 | .size = SZ_32M - SZ_4M, | ||
184 | }, | ||
185 | [3] = { | ||
186 | .name = "user2", | ||
187 | .offset = SZ_32M, | ||
188 | .size = MTDPART_SIZ_FULL, | ||
189 | } | ||
190 | }; | ||
191 | |||
169 | /* the Osiris has 3 selectable slots for nand-flash, the two | 192 | /* the Osiris has 3 selectable slots for nand-flash, the two |
170 | * on-board chip areas, as well as the external slot. | 193 | * on-board chip areas, as well as the external slot. |
171 | * | 194 | * |
@@ -322,14 +345,23 @@ static void __init osiris_map_io(void) | |||
322 | s3c24xx_init_clocks(0); | 345 | s3c24xx_init_clocks(0); |
323 | s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); | 346 | s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs)); |
324 | 347 | ||
348 | /* check for the newer revision boards with large page nand */ | ||
349 | |||
350 | if ((__raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK) >= 4) { | ||
351 | printk(KERN_INFO "OSIRIS-B detected (revision %d)\n", | ||
352 | __raw_readb(OSIRIS_VA_IDREG) & OSIRIS_ID_REVMASK); | ||
353 | osiris_nand_sets[0].partitions = osiris_default_nand_part_large; | ||
354 | osiris_nand_sets[0].nr_partitions = ARRAY_SIZE(osiris_default_nand_part_large); | ||
355 | } else { | ||
356 | /* write-protect line to the NAND */ | ||
357 | s3c2410_gpio_setpin(S3C2410_GPA0, 1); | ||
358 | } | ||
359 | |||
325 | /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ | 360 | /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */ |
326 | 361 | ||
327 | local_irq_save(flags); | 362 | local_irq_save(flags); |
328 | __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON); | 363 | __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON); |
329 | local_irq_restore(flags); | 364 | local_irq_restore(flags); |
330 | |||
331 | /* write-protect line to the NAND */ | ||
332 | s3c2410_gpio_setpin(S3C2410_GPA0, 1); | ||
333 | } | 365 | } |
334 | 366 | ||
335 | static void __init osiris_init(void) | 367 | static void __init osiris_init(void) |