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

arm: stm32: Data cache (dcache) management update #44692

Merged
merged 5 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,12 @@ endmenu

menu "Cache Options"

config DCACHE
bool "Data cache support"
default y
help
This option enables data cache (d-cache).

config CACHE_MANAGEMENT
bool "Cache management features"
help
Expand Down
4 changes: 4 additions & 0 deletions doc/releases/release-notes-3.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ Changes in this release
* The previous ``CAN_SILENT_LOOPBACK_MODE`` can be set using the bitmask ``(CAN_MODE_LISTENONLY |
CAN_MODE_LOOPBACK)``.

* STM32H7 The `CONFIG_NOCACHE_MEMORY` no longer is responsible for disabling
data cache when defined. Now the newly introduced `CONFIG_DCACHE=n` explicitly
does that.

Removed APIs in this release
============================

Expand Down
2 changes: 2 additions & 0 deletions samples/subsys/fs/littlefs/boards/nucleo_h743zi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ CONFIG_FS_LITTLEFS_PROG_SIZE=32
CONFIG_FS_LITTLEFS_READ_SIZE=32
CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE=64
CONFIG_FS_LITTLEFS_FC_HEAP_SIZE=8192

CONFIG_NOCACHE_MEMORY=y
erwango marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 4 additions & 4 deletions soc/arm/st_stm32/stm32h7/soc_m7.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ static int stm32h7_init(const struct device *arg)

SCB_EnableICache();

#ifndef CONFIG_NOCACHE_MEMORY
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
SCB_EnableDCache();
if (IS_ENABLED(CONFIG_DCACHE)) {
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
SCB_EnableDCache();
}
}

#endif /* CONFIG_NOCACHE_MEMORY */
/* Install default handler that simply resets the CPU
* if configured in the kernel, NOP otherwise
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CONFIG_NOCACHE_MEMORY=y
CONFIG_DCACHE=n
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CONFIG_NOCACHE_MEMORY=y
CONFIG_DCACHE=n
lmajewski marked this conversation as resolved.
Show resolved Hide resolved