zephyr/drivers/flash
Luca Burelli 8151dd9c6c drivers: flash_stm32h7: fix flash size detection
Commit 0e41b07309 ("drivers : flash:
update way to get flash size") changed the way to get flash size from
the LL_FLASH_GetSize() HAL function to the current DT_REG_SIZE() macro.

However, they are not equivalent:

- With LL_FLASH_GetSize(), REAL_FLASH_SIZE_KB returned the *total* size
  of the Flash memory, reading it from a ROM register of the CPU. For
  example, it was 2048 (2MB) for a STM32H747xI.

- The current DT_REG_SIZE() applies to a flash *bank*, therefore it only
  returns half of the total Flash size on dual bank devices.

This mismatch causes issues with the DISCONTINUOUS_BANKS logic below,
incorrectly matching partitions close to the end of the first bank as
appearing to span both and triggering the "range overlaps discontinuity"
check later.

Fix it by doubling the size when appropriate, in the same way it is
already done for the M4 core.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-05-23 11:04:15 +02:00
..
CMakeLists.txt arch: nios2: remove arch 2025-05-15 20:01:05 -04:00
flash_ambiq.c drivers: flash: Add support for Apollo510 flash controller 2025-05-14 09:11:17 +02:00
flash_andes_qspi.c drivers: flash: Wrap driver instances in device API macro 2025-02-12 16:06:25 +01:00
flash_andes_qspi.h
flash_cadence_nand_ll.c
flash_cadence_nand_ll.h
flash_cadence_nand.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_cadence_qspi_nor_ll.c
flash_cadence_qspi_nor_ll.h
flash_cadence_qspi_nor.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_esp32.c driver: flash: esp32: fix unaligned read 2025-02-24 20:19:47 +00:00
flash_gd32_v1.c
flash_gd32_v2.c
flash_gd32_v3.c
flash_gd32.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_gd32.h
flash_gecko.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_handlers.c drivers/flash: Correct flash_erase userspace handler 2024-12-19 19:55:53 +01:00
flash_ifx_cat1_qspi.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_ifx_cat1.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_ite_it8xxx2.c drivers/flash: Enable flash controller for it51xxx series 2025-04-08 10:48:26 +02:00
flash_max32.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_mcux_flexspi_hyperflash.c drivers: flash: flexspi: Fix XIP during flash write 2025-04-25 18:58:57 +02:00
flash_mcux_flexspi_mx25um51345g.c drivers: flash: flexspi: Fix XIP during flash write 2025-04-25 18:58:57 +02:00
flash_mcux_flexspi_nor.c driver: flash: mcux_flexspi_nor: Fix for is25lpxxxd chips 2025-04-02 13:04:38 +02:00
flash_mspi_atxp032.c drivers: mspi: shroud controller specifics and fix potential issue 2025-05-07 10:33:38 +02:00
flash_mspi_emul_device.c drivers: mspi: standarlized transfer priority 2025-05-07 10:33:38 +02:00
flash_mspi_nor_quirks.h drivers: flash: Optimize mspi_nor driver memory 2025-04-22 04:33:05 +02:00
flash_mspi_nor.c drivers: flash: Optimize mspi_nor driver memory 2025-04-22 04:33:05 +02:00
flash_mspi_nor.h drivers: flash: Optimize mspi_nor driver memory 2025-04-22 04:33:05 +02:00
flash_npcx_fiu_nor.c drivers: flash: npcx: avoid obstruction by eSPI TAF when EC access flash 2025-03-14 05:46:23 +01:00
flash_npcx_fiu_qspi.c drivers: flash: npcx: add setting of low flash device 2025-01-14 17:57:50 +01:00
flash_npcx_fiu_qspi.h drivers: flash: npcx: Fix compile error 2025-01-15 23:05:23 +01:00
flash_nxp_s32_qspi_hyperflash.c drivers: flash: add NXP S32 QSPI HyperFlash driver 2025-01-21 19:26:45 +01:00
flash_nxp_s32_qspi_nor.c drivers: flash_nxp_s32: create common source code 2025-01-21 19:26:45 +01:00
flash_nxp_s32_qspi.c drivers: flash-nxp-s32-qspi: ignore flash operations with zero size 2025-04-30 11:57:05 +02:00
flash_nxp_s32_qspi.h drivers: flash_nxp_s32: create common source code 2025-01-21 19:26:45 +01:00
flash_page_layout.c
flash_priv.h
flash_realtek_rts5912.c driver: flash: add flash driver for rts5912 2025-05-15 11:18:22 +02:00
flash_rpi_pico.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_sam0.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_sam.c drivers: flash: sam: fix flash erase last page 2025-03-10 15:02:16 +01:00
flash_shell.c flash_shell: add shell device filtering 2025-01-29 04:17:47 +01:00
flash_si32.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_simulator_native.c
flash_simulator_native.h
flash_simulator.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_smartbond.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
flash_stm32_ex_op.c drivers: flash: stm32 flash driver common functions 2025-05-06 18:23:14 +02:00
flash_stm32_ospi.c drivers: flash: stm32 octospi supports the 4Bytes address mode 2025-05-13 12:08:51 +02:00
flash_stm32_ospi.h
flash_stm32_qspi.c drivers: flash_stm32_qspi: add st,read-id-dummy-cycles 2025-05-21 14:04:09 +02:00
flash_stm32_xspi.c drivers: flash: stm32 xspi flash driver set the DelayBlock if exists 2025-05-21 17:35:06 +02:00
flash_stm32_xspi.h drivers: flash: stm32 xspi driver supports clock domain config 2025-05-21 17:35:06 +02:00
flash_stm32.c drivers: flash: stm32H5 flash driver gives the flash size 2025-05-06 18:23:36 +02:00
flash_stm32.h drivers: flash: stm32: fix FLASH_ constants renamed in hal_stm32 2025-05-12 13:31:23 +02:00
flash_stm32f1x.c
flash_stm32f2x.c
flash_stm32f4x.c drivers: flash: stm32: update ex_op API 2024-12-24 13:54:04 +01:00
flash_stm32f7x.c drivers: flash: stm32: add STM32 option bytes extended ops 2024-12-17 11:35:13 +00:00
flash_stm32g0x.c
flash_stm32g4x.c drivers: flash: flash_stm32g4x: Fix STM32G4 unaligned read access 2025-05-16 16:12:10 +02:00
flash_stm32h7x.c drivers: flash_stm32h7: fix flash size detection 2025-05-23 11:04:15 +02:00
flash_stm32l4x.c flash: stm32l4/g4: force load option bytes after write 2025-01-08 01:29:53 +01:00
flash_stm32l5x.c drivers: stm32: use cache peripheral driver 2025-04-25 11:04:37 +02:00
flash_stm32wb0x.c drivers: flash: stm32 flash drivers supports the get_size API function 2025-05-06 18:23:36 +02:00
flash_stm32wba_fm.c drivers: flash: stm32 flash drivers supports the get_size API function 2025-05-06 18:23:36 +02:00
flash_stm32wbax.c drivers: stm32: use cache peripheral driver 2025-04-25 11:04:37 +02:00
flash_stm32wbx.c
flash_util.c
jesd216.c
jesd216.h drivers: flash: spi_nor: use defines for 4byte identifiers 2024-12-03 13:06:41 +01:00
Kconfig arch: nios2: remove arch 2025-05-15 20:01:05 -04:00
Kconfig.ambiq
Kconfig.andes
Kconfig.at45
Kconfig.b91
Kconfig.cadence_nand
Kconfig.cadence_qspi_nor
Kconfig.cc13xx_cc26xx
Kconfig.cc23x0 drivers: flash: Add support for cc23x0 flash 2025-02-04 11:56:05 +01:00
Kconfig.esp32
Kconfig.gd32
Kconfig.gecko
Kconfig.ifx_cat1
Kconfig.it8xxx2 drivers/flash: Enable flash controller for it51xxx series 2025-04-08 10:48:26 +02:00
Kconfig.lpc
Kconfig.max32
Kconfig.mcux
Kconfig.mspi drivers: mspi: add apollo5x MSPI controller 2025-05-07 10:33:38 +02:00
Kconfig.nor drivers: flash: spi_nor: swap depends on and help in Kconfig.nor 2025-02-10 15:57:08 +00:00
Kconfig.nordic_qspi_nor
Kconfig.npcx_fiu drivers: flash: npcx: add setting of low flash device 2025-01-14 17:57:50 +01:00
Kconfig.nrf drivers: flash: nrf: Add possibility to add custom context 2025-03-31 14:33:56 +02:00
Kconfig.nrf_mram
Kconfig.nrf_rram Bluetooth: Rename BLE to Bluetooth (LE) where applicable 2025-02-12 12:24:18 +01:00
Kconfig.numaker
Kconfig.numaker_rmc
Kconfig.nxp_s32 drivers: flash: add NXP S32 QSPI HyperFlash driver 2025-01-21 19:26:45 +01:00
Kconfig.renesas_ra drivers: flash: flash_hp_ra: perform blank check before reading 2025-05-13 07:24:39 +01:00
Kconfig.rpi_pico
Kconfig.rts5912 driver: flash: add flash driver for rts5912 2025-05-15 11:18:22 +02:00
Kconfig.rv32m1
Kconfig.sam
Kconfig.sam0
Kconfig.si32
Kconfig.silabs drivers: flash: silabs: Add DMA read support 2025-03-07 20:02:26 +01:00
Kconfig.simulator
Kconfig.siwx91x drivers: flash: Introduce SiWx91x Flash driver 2025-02-11 22:07:11 +01:00
Kconfig.smartbond
Kconfig.stm32 drivers: flash: stm32: remove dependeny on XIP for memory map 2025-04-30 16:26:28 +02:00
Kconfig.stm32_ospi drivers : flash: replace dt_nodelabel_has_prop() 2025-02-04 15:01:13 +01:00
Kconfig.stm32_qspi drivers : flash: replace dt_nodelabel_has_prop()in qspi 2025-02-04 15:01:13 +01:00
Kconfig.stm32_xspi drivers : flash: replace dt_nodelabel_has_prop()in xspi 2025-02-04 15:01:13 +01:00
Kconfig.xmc4xxx
nrf_qspi_nor.c drivers: flash: nrf_qspi_nor: Prevent CPU hang when XIP is re-enabled 2025-04-25 15:57:35 +02:00
soc_flash_b91.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_cc13xx_cc26xx.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_cc23x0.c drivers: flash: Remove VIMS calls for cc23x0 2025-05-21 19:57:28 +02:00
soc_flash_lpc.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_mcux.c boards: frdm_mcxa166, frdm_mcxa276: add flash support 2025-04-14 20:03:54 +02:00
soc_flash_nrf_mram.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_nrf_rram.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_nrf.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_nrf.h drivers: flash: nrf: Add possibility to add custom context 2025-03-31 14:33:56 +02:00
soc_flash_numaker_rmc.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_numaker.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_renesas_ra_hp_ex_op.c drivers: flash: Correct naming of Flash HP Renesas RA Kconfig 2025-05-02 07:19:46 +02:00
soc_flash_renesas_ra_hp.c drivers: flash: flash_hp_ra: perform blank check before reading 2025-05-13 07:24:39 +01:00
soc_flash_renesas_ra_hp.h drivers: flash: flash_hp_ra: perform blank check before reading 2025-05-13 07:24:39 +01:00
soc_flash_rv32m1.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
soc_flash_silabs_series2.c drivers: flash: silabs: Add DMA read support 2025-03-07 20:02:26 +01:00
soc_flash_silabs_siwx91x.c drivers: flash: Introduce SiWx91x Flash driver 2025-02-11 22:07:11 +01:00
soc_flash_xmc4xxx.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
spi_flash_at45.c drivers: flash: Place API into iterable section 2024-12-02 22:08:48 +00:00
spi_nor.c drivers: flash: spi_nor: Add fast read support 2025-05-13 12:09:06 +02:00
spi_nor.h drivers: flash: spi_nor: Added flag status register support 2025-05-13 12:09:06 +02:00