disk: disk_access_flash: align buffer

Flash drivers may impose alignment requirements on the destination
buffers due to use of DMA transfers.  In particular Nordic QSPI flash
API requires that addresses, sizes, and buffers all be 4-byte aligned.
Align the ready/copy buffer to satisfy this requirement.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
Peter A. Bigot 2020-04-18 22:23:01 -05:00 committed by Carles Cufí
commit 2b33467a61

View file

@ -19,7 +19,7 @@
static struct device *flash_dev;
/* flash read-copy-erase-write operation */
static u8_t read_copy_buf[CONFIG_DISK_ERASE_BLOCK_SIZE];
static u8_t __aligned(4) read_copy_buf[CONFIG_DISK_ERASE_BLOCK_SIZE];
static u8_t *fs_buff = read_copy_buf;
/* calculate number of blocks required for a given size */