Skip to content
Commit a97b61e7 authored by Attie Grande's avatar Attie Grande Committed by Alberto Escolar
Browse files

include: sd: revise the minimum alignment of card_buffer to 4-bytes



Since a85ffa81, `struct sd_card.card_buffer` has naturally fallen at an
offset that is unaligned. This meant that on systems without support for
unaligned access (e.g: Cortex-M0), a hard fault would present when
executing code that casts the buffer to `uint32_t` (such as
`sdmmc_spi_read_cxd()`, `card_query_written()`, etc...)

Historically, it appears that the alignment of the `card_buffer` member
was good and operational only by chance.

Altering the default value of `CONFIG_SDHC_BUFFER_ALIGNMENT` was
rejected, as this has wider implications.

Fixes #62619

Signed-off-by: default avatarAttie Grande <attie.grande@argentum-systems.co.uk>
parent 3b99fb1b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment