Partitioning SPI NOR flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Partitioning SPI NOR flash

跳至解决方案
3,245 次查看
pt
Senior Contributor I

Hi

I want to partition N25Q128 SPI nor flash. I don't know how to do that.

If anyone aware of it,then please help me to partition the spi flash as mtd0,mtd1,and mtd2.

Board : MCIMX28EVK

Linux Kernel version :2.6.35

Linux BSP : L2.6.35_1.1.0_130130_source

SPI flash : N25Q128

I need to store bootloader,uImage and rootfs in spi.

Regards

Pt A R

标签 (2)
0 项奖励
回复
1 解答
1,791 次查看
victorien
Contributor IV

Hi,

With bootloader do you use ? u-boot or barebox ?

On linux, to add partition on this memory you have to do something like that on mx28evk.c :

#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)

static struct mtd_partition mx28evk_flash_part[] = {

    {

    .name = "bootloader",

    .offset = 0,

    .size = 2 * 1024 * 1024},

    //.mask_flags = MTD_WRITEABLE}, /* read only partition */

    {

    .name = "env",

    .offset = MTDPART_OFS_NXTBLK,

    .size = MTDPART_SIZ_FULL},

    //.mask_flags = MTD_WRITEABLE}, /* read only partition */

};

static struct flash_platform_data mx28_spi_flash_data = {

    .name = "m25p80",

    .parts = mx28evk_flash_part,

    .nr_parts = ARRAY_SIZE(mx28evk_flash_part),

    .type = "m25p32",

};

#endif

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,792 次查看
victorien
Contributor IV

Hi,

With bootloader do you use ? u-boot or barebox ?

On linux, to add partition on this memory you have to do something like that on mx28evk.c :

#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)

static struct mtd_partition mx28evk_flash_part[] = {

    {

    .name = "bootloader",

    .offset = 0,

    .size = 2 * 1024 * 1024},

    //.mask_flags = MTD_WRITEABLE}, /* read only partition */

    {

    .name = "env",

    .offset = MTDPART_OFS_NXTBLK,

    .size = MTDPART_SIZ_FULL},

    //.mask_flags = MTD_WRITEABLE}, /* read only partition */

};

static struct flash_platform_data mx28_spi_flash_data = {

    .name = "m25p80",

    .parts = mx28evk_flash_part,

    .nr_parts = ARRAY_SIZE(mx28evk_flash_part),

    .type = "m25p32",

};

#endif

0 项奖励
回复