Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include/drivers/flash: correction on the unrestricted alignment of writes #28192

Merged

Conversation

nvlsianpu
Copy link
Collaborator

@nvlsianpu nvlsianpu commented Sep 8, 2020

Telling that all the driver supports unaligned writes was and
is not true. Drivers only have to support any source buffer.

This fixes message introduced by #23628

fixes #28193

Signed-off-by: Andrzej Puzdrowski andrzej.puzdrowski@nordicsemi.no

@nvlsianpu nvlsianpu requested review from pabigot and carlescufi and removed request for carlescufi September 8, 2020 15:42
@nvlsianpu nvlsianpu added area: API Changes to public APIs area: Flash bug The issue is a bug, or the PR is fixing a bug labels Sep 8, 2020
@@ -133,8 +133,7 @@ static inline int z_impl_flash_read(const struct device *dev, off_t offset,
* @brief Write buffer into flash memory.
*
* All flash drivers support a source buffer located either in RAM or
* SoC flash, without alignment restrictions on the source address, or
* write size or offset.
* SoC flash, without alignment restrictions on the source address.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you expand on this, e.g.

Write size and offset must be multiples of flash_get_write_block_size(dev).

(if that's true)

…ites

Telling that all the driver supports unaligned writes was and
is not true. Drivers only have to support any source buffer.

This fix message introduced by zephyrproject-rtos#23628

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
@nvlsianpu nvlsianpu force-pushed the fix-flash-write-api-dsc branch from 2aca1bb to c9c688e Compare September 8, 2020 15:54
@carlescufi carlescufi merged commit 6fe1fde into zephyrproject-rtos:master Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Flash bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include/drivers/flash: API stands mistakenly unrestricted alignment of writes.
3 participants