Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad3613f4798e229c8885b924c88e17ab85fef96a
Commit:     ad3613f4798e229c8885b924c88e17ab85fef96a
Parent:     8a9ccb7f182d15d6d6d0debb819790f25c87a30b
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 11 11:10:42 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 10:56:25 2007 +0100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-s3c2440/mach-anubis.c |   36 +++++++++++++++++++++++++++++++++-
 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 53675aa..29c163d 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[] = {
        }
 };
 
+static struct mtd_partition anubis_default_nand_part_large[] = {
+       [0] = {
+               .name   = "Boot Agent",
+               .size   = SZ_128K,
+               .offset = 0,
+       },
+       [1] = {
+               .name   = "/boot",
+               .size   = SZ_4M - SZ_128K,
+               .offset = SZ_128K,
+       },
+       [2] = {
+               .name   = "user1",
+               .offset = SZ_4M,
+               .size   = SZ_32M - SZ_4M,
+       },
+       [3] = {
+               .name   = "user2",
+               .offset = SZ_32M,
+               .size   = MTDPART_SIZ_FULL,
+       }
+};
+
 /* the Anubis has 3 selectable slots for nand-flash, the two
  * on-board chip areas, as well as the external slot.
  *
@@ -409,8 +432,17 @@ static void __init anubis_map_io(void)
        s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(anubis_uartcfgs, ARRAY_SIZE(anubis_uartcfgs));
 
-       /* ensure that the GPIO is setup */
-       s3c2410_gpio_setpin(S3C2410_GPA0, 1);
+       /* check for the newer revision boards with large page nand */
+
+       if ((__raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK) >= 4) {
+               printk(KERN_INFO "ANUBIS-B detected (revision %d)\n",
+                      __raw_readb(ANUBIS_VA_IDREG) & ANUBIS_IDREG_REVMASK);
+               anubis_nand_sets[0].partitions = anubis_default_nand_part_large;
+               anubis_nand_sets[0].nr_partitions = 
ARRAY_SIZE(anubis_default_nand_part_large);
+       } else {
+               /* ensure that the GPIO is setup */
+               s3c2410_gpio_setpin(S3C2410_GPA0, 1);
+       }
 }
 
 static void __init anubis_init(void)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to