Skip to content
Commit 513073b5 authored by Thomas Altenbach's avatar Thomas Altenbach Committed by Benjamin Cabé
Browse files

drivers: flash: stm32_qspi: Fix erase size for dual-flash



When dual-flash mode is enabled, any erase operation is executed on both
flash memories in parallel. This means from the flash driver's point of
view, the size of a given sector/block is twice the size of a
sector/block on a single flash memory.

For example, assuming 4-KiB sectors for each flash memory, if the flash
driver is asked to erase at address 0x0000, the erase size must be a
multiple of 8 KiB since each sector erase operation will cause a 4-KiB
sector to erased in each flash memory.

Before this commit, the doubled erase size was only considered in
'setup_pages_layout'. Now, the actual sizes of the erase operations are
properly set in the flash driver's data and are used everywhere in the
driver.

Signed-off-by: default avatarThomas Altenbach <altenbach.thomas@gmail.com>
parent 8c638f29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment