Skip to content

Commit 296909e

Browse files
jaustinRussell King
authored andcommitted
ARM: 8603/1: V7M: Add addresses for mem-mapped V7M cache operations
V7M implements cache operations similarly to V7A/R, however all operations are performed via memory-mapped IO instead of co-processor operations. This patch adds register definitions relevant to the V7M ARM architecture's cache architecture. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Tested-by: Andras Szemzo <sza@esh.hu> Tested-by: Joachim Eastwood <manabian@gmail.com> Tested-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 26150aa commit 296909e

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • arch/arm/include/asm

‎arch/arm/include/asm/v7m.h‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
#define V7M_SCB_CCR 0x14
2626
#define V7M_SCB_CCR_STKALIGN (1 << 9)
27+
#define V7M_SCB_CCR_DC (1 << 16)
28+
#define V7M_SCB_CCR_IC (1 << 17)
29+
#define V7M_SCB_CCR_BP (1 << 18)
2730

2831
#define V7M_SCB_SHPR2 0x1c
2932
#define V7M_SCB_SHPR3 0x20
@@ -47,6 +50,25 @@
4750
#define EXC_RET_STACK_MASK 0x00000004
4851
#define EXC_RET_THREADMODE_PROCESSSTACK 0xfffffffd
4952

53+
/* Cache related definitions */
54+
55+
#define V7M_SCB_CLIDR 0x78 /* Cache Level ID register */
56+
#define V7M_SCB_CTR 0x7c /* Cache Type register */
57+
#define V7M_SCB_CCSIDR 0x80 /* Cache size ID register */
58+
#define V7M_SCB_CSSELR 0x84 /* Cache size selection register */
59+
60+
/* Cache opeartions */
61+
#define V7M_SCB_ICIALLU 0x250 /* I-cache invalidate all to PoU */
62+
#define V7M_SCB_ICIMVAU 0x258 /* I-cache invalidate by MVA to PoU */
63+
#define V7M_SCB_DCIMVAC 0x25c /* D-cache invalidate by MVA to PoC */
64+
#define V7M_SCB_DCISW 0x260 /* D-cache invalidate by set-way */
65+
#define V7M_SCB_DCCMVAU 0x264 /* D-cache clean by MVA to PoU */
66+
#define V7M_SCB_DCCMVAC 0x268 /* D-cache clean by MVA to PoC */
67+
#define V7M_SCB_DCCSW 0x26c /* D-cache clean by set-way */
68+
#define V7M_SCB_DCCIMVAC 0x270 /* D-cache clean and invalidate by MVA to PoC */
69+
#define V7M_SCB_DCCISW 0x274 /* D-cache clean and invalidate by set-way */
70+
#define V7M_SCB_BPIALL 0x278 /* D-cache clean and invalidate by set-way */
71+
5072
#ifndef __ASSEMBLY__
5173

5274
enum reboot_mode;

0 commit comments

Comments
 (0)