zephyr/drivers/flash
Erwan Gouriou 0381e8cbe9 drivers/flash: stm32l4: Handle pages_per_bank for all variants
Variable pages_per_bank has been introduced to ease page erase
in dual bank configurations. This has been implemented using
FLASH_OPTR_DUALBANK definition.
It happen that this was not taking into account L4+ series that
use FLASH_OPTR_DBANK instead of FLASH_OPTR_DUALBANK. This lead
to compilation issue for this driver in case of L4+ series.
So, this patch is adding the support of FLASH_OPTR_DBANK definition.

Besides, FLASH_OPTR_DUALBANK (as FLASH_OPTR_DBANK) are actually
defining availability of an option byte to configure use of Dual
Bank. So besides of its definition, its value in flash OPTR register
should be checked to ensure Dual Bank configuration is used.
This patch is taking this into account by adding the check of this
byte. Error -ENOTSUP is returned in case Single Bank is configured
since it has not be validated yet (in case Dual Bank is possible but
not configured).

Fixes #18246 for nucleo_l4r5zi

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-08-17 20:05:21 +02:00
..
CMakeLists.txt drivers: flash: Add STM32G0XX flash support 2019-07-05 10:35:55 -05:00
Kconfig driver: flash: add flash driver for the RV32M1 SOC 2019-06-03 10:43:47 -05:00
Kconfig.gecko flash_gecko: add support for page layout 2019-04-26 03:25:08 -07:00
Kconfig.mcux license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig.native_posix drivers: flash: Remove redundant FLASH dep. from FLASH_NATIVE_POSIX 2019-08-07 04:26:48 -04:00
Kconfig.nios2_qspi license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig.nor drivers/spi_nor: allow application control of flash layout page size 2019-07-24 09:20:56 -04:00
Kconfig.nrf drives/flash: use nrfx for nrf 2019-04-19 11:50:46 +02:00
Kconfig.qmsi kconfig: drivers: flash: Remove redundant FLASH dependencies 2019-03-09 09:56:40 -05:00
Kconfig.rv32m1 driver: flash: add flash driver for the RV32M1 SOC 2019-06-03 10:43:47 -05:00
Kconfig.sam soc: sam0: Enable generic peripheral selection 2019-04-19 14:37:17 -05:00
Kconfig.sam0 soc: sam0: Enable generic peripheral selection 2019-04-19 14:37:17 -05:00
Kconfig.simulator drivers: flash: Remove redundant FLASH dep. from FLASH_SIMULATOR 2019-08-07 04:26:27 -04:00
Kconfig.stm32 drivers: flash: Add STM32G0XX flash support 2019-07-05 10:35:55 -05:00
Kconfig.w25qxxdv
flash_gecko.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
flash_handlers.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_native_posix.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_page_layout.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_priv.h
flash_sam.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
flash_sam0.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
flash_shell.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_simulator.c drivers/flash/flash_simulator: fix flash size calculation 2019-07-17 13:49:26 -07:00
flash_stm32.c drivers: flash: Add STM32G0XX flash support 2019-07-05 10:35:55 -05:00
flash_stm32.h drivers: flash: Add STM32G0XX flash support 2019-07-05 10:35:55 -05:00
flash_stm32f0x.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_stm32f3x.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_stm32f4x.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_stm32f7x.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
flash_stm32g0x.c drivers: flash: Add STM32G0XX flash support 2019-07-05 10:35:55 -05:00
flash_stm32l4x.c drivers/flash: stm32l4: Handle pages_per_bank for all variants 2019-08-17 20:05:21 +02:00
flash_stm32wbx.c cleanup: include/: move misc/__assert.h to sys/__assert.h 2019-06-27 22:55:49 -04:00
soc_flash_mcux.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
soc_flash_nios2_qspi.c drivers: fix printf formatting in flash drivers 2019-08-01 11:33:17 -07:00
soc_flash_nrf.c cleanup: include/: move misc/__assert.h to sys/__assert.h 2019-06-27 22:55:49 -04:00
soc_flash_rv32m1.c cleanup: include/: move flash.h to drivers/flash.h 2019-06-27 22:55:49 -04:00
spi_flash_w25qxxdv.c cleanup: include/: move spi.h to drivers/spi.h 2019-06-27 22:55:49 -04:00
spi_flash_w25qxxdv.h
spi_flash_w25qxxdv_defs.h docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
spi_nor.c drivers/spi_nor: de-pessimize reads 2019-08-05 13:27:49 +02:00
spi_nor.h drivers/spi_nor: remove configurability of page/sector/block sizes 2019-07-24 09:20:56 -04:00