m25p80 and partitions on imx53

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

m25p80 and partitions on imx53

跳至解决方案
1,431 次查看
woutervh
Contributor IV

Hello all,

I want to use a m25p80 on my imx53. It gets detected correctly and I configure my kernel to use MTD_parts. So far so good. However,

I'm unable to pass the platformdata for some reason, so the partition information never makes it to the mxc_m25p80 driver...


How I define my spi parts:

static struct mtd_partition nor_flash_partitions[] = {

  {

  .name = "nor.bootloader",

  .offset = 0,

  .size = (3 * 128 * 1024)},

  {

  .name = "nor.bootloader_env",

  .offset = MTDPART_OFS_APPEND,

  .size = (3 * 128 * 1024)},

  {

  .name = "nor.kernel",

  .offset = MTDPART_OFS_APPEND,

  .size = (3 * 1024 * 1024)},

  {

  .name = "nor.storage",

  .offset = MTDPART_OFS_APPEND,

  .size = (1 * 512 * 1024)},

};

static struct spi_board_info tlv_imx53_spi_board_info[] = {

  {

  .modalias = "m25p32", /* spi flash */

  .max_speed_hz = 6000000,

  .bus_num = 1,

  .chip_select = 1,

  .platform_data  = &mxc_nor_data,

  },

  {

  .modalias = "spidev", /* to fpga */

  .max_speed_hz = 6000000,

  .bus_num = 2,

  .chip_select = 2,

  .mode = SPI_MODE_1,

  .bits_per_word = 16,

  },

};

And in my board_init:

spi_register_board_info(tlv_imx53_spi_board_info,ARRAY_SIZE(tlv_imx53_spi_board_info);

Am I missing something?

标签 (2)
0 项奖励
回复
1 解答
1,197 次查看
fabio_estevam
NXP Employee
NXP Employee

You don't show in your code where you pass 'nor_flash_partitions'.

Take a look at arch/arm/mach-imx/mach-armadillo5x0.c or other boards for reference.

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,198 次查看
fabio_estevam
NXP Employee
NXP Employee

You don't show in your code where you pass 'nor_flash_partitions'.

Take a look at arch/arm/mach-imx/mach-armadillo5x0.c or other boards for reference.

0 项奖励
回复