You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/06/30 23:20:00 UTC
[nuttx] branch master updated: risc-v/mpfs: cache: Fix cache and scratchpad init
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 78a2c91a04 risc-v/mpfs: cache: Fix cache and scratchpad init
78a2c91a04 is described below
commit 78a2c91a0446fbe1756ce309e823486e2dc3712e
Author: Jani Paalijarvi <ja...@unikie.com>
AuthorDate: Tue May 23 15:34:03 2023 +0300
risc-v/mpfs: cache: Fix cache and scratchpad init
Initialize ICACHE way with correct mask.
Initialize scratchpad with constant g_init_marker as it has been done in HSS
Signed-off-by: Jani Paalijarvi <ja...@unikie.com>
---
arch/risc-v/src/mpfs/mpfs_cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/risc-v/src/mpfs/mpfs_cache.c b/arch/risc-v/src/mpfs/mpfs_cache.c
index 4fba86c58a..b149a2416d 100644
--- a/arch/risc-v/src/mpfs/mpfs_cache.c
+++ b/arch/risc-v/src/mpfs/mpfs_cache.c
@@ -125,7 +125,7 @@ void mpfs_enable_cache(void)
MPFS_CACHE_WAY_MASK_AXI4_SLAVE_PORT_3);
putreg32(LIBERO_SETTING_WAY_MASK_E51_ICACHE,
- MPFS_CACHE_WAY_MASK_E51_DCACHE);
+ MPFS_CACHE_WAY_MASK_E51_ICACHE);
putreg32(LIBERO_SETTING_WAY_MASK_U54_1_DCACHE,
MPFS_CACHE_WAY_MASK_U54_1_DCACHE);
@@ -159,7 +159,7 @@ void mpfs_enable_cache(void)
for (inc = 0; inc < (MPFS_WAY_BYTE_LENGTH /
MPFS_CACHE_BLOCK_BYTE_LENGTH); ++inc)
{
- *p_scratchpad = g_init_marker + inc;
+ *p_scratchpad = g_init_marker;
p_scratchpad += MPFS_CACHE_BLOCK_BYTE_LENGTH / sizeof(uint64_t);
}