Zephyr: drivers: flash: Recent change in spi_nor.c does not let have multiple flash devs on a board.

Created on 25 Jan 2019  路  2Comments  路  Source: zephyrproject-rtos/zephyr

Describe the bug
I have a board that has the usual ST's internal flash, and an external SPI NOR one. I want to utilize both flashes in the context of an application. The https://github.com/zephyrproject-rtos/zephyr/commit/7d428bb0a8d35e1198068dff14e47853240f3ee5 introduced the CONFIG_FLASH_SIZE which is also produced for the internal flashes in generated header.

On my local copy, I've overcome this by renaming it to CONFIG_SPI_NOR_SIZE and resolved my issues.

To Reproduce
I've observed it when my memcheck program could not access all the sectors of the external (significantly bigger) SPI NOR flash.

Expected behavior
I expect to have the ability to include an external SPI NOR flash along with the internal.

Additional context
If the used workaround is OK, then ping me to make a fix of it.

bug medium

Most helpful comment

IMO The right fix is to complete moving the SPI drivers to device tree, and specify flash size and other properties in the DTS node. I know @galak has been moving that direction; so had I specifically for spi-nor but now I'm waiting for the dust to settle. We also need to get the jedec,spi-nor compatible yaml in place, and figure out whether we need so many spi nor driver implementations.

All 2 comments

IMO The right fix is to complete moving the SPI drivers to device tree, and specify flash size and other properties in the DTS node. I know @galak has been moving that direction; so had I specifically for spi-nor but now I'm waiting for the dust to settle. We also need to get the jedec,spi-nor compatible yaml in place, and figure out whether we need so many spi nor driver implementations.

@pabigot and @findlayfeng have done some changes around this which has already been committed to the main tree. @gon1332 Can you please check if your requirements are addressed now?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qianfan-Zhao picture qianfan-Zhao  路  3Comments

akansal1 picture akansal1  路  4Comments

carlescufi picture carlescufi  路  5Comments

dhavalpanchalispl picture dhavalpanchalispl  路  3Comments

pabigot picture pabigot  路  4Comments