map mtd partitions address for TWO NOR flash

H. Johnny johnny.hung543 at gmail.com
Wed May 13 06:25:07 EDT 2009


Hi guys!
    I have a mpc8313erbd (powerpc arch) demo board. There are one NOR
flash and one NAND flash on board.
The drivers/mtd/map/mpc8313erbd.c do address map for NOR flash. I want
to add another NOR flash and take off the NAND flash.
So there are two NOR flash on board.
    I am trying to do address map for two NOR flash but I don't know
how to. Some part of drivers/mtd/map/mpc8313erbd.c code is as
following:
    Do I need to add another mtd_partition structure ? How to assign
the partition_info to specific NOR flash (coz the two NOR flash are
the same)
BTW, I know u-boot can pass the mtdparts parameters to linux kernel.
Which mtd partition info linux kernel will use, u-boot mtdparts info
or static address map code ?
    thanks, regards.

static struct mtd_partition partition_info[]={
    {
        .name        = "U-Boot",
        .offset     = 0,
        .size        = 0x100000,
        .mask_flags = MTD_WRITEABLE
    },
    {
        .name        = "Kernel",
        .offset        = MTDPART_OFS_APPEND,
        .size        = 0x200000
    },
    {
        .name        = "JFFS2",
        .offset        = MTDPART_OFS_APPEND,
        .size        = 0x400000,
        },
    {
        .name        = "dtb",
        .offset        = MTDPART_OFS_APPEND,
        .size        = 0x100000,
    },
};

-- 
H. Johnny



More information about the linux-mtd mailing list