Skip to content

Commit 0ba3c12

Browse files
paulburtonralfbaechle
authored andcommitted
MIPS: CM: Add GCR_L2_CONFIG register accessors
Provide accessor functions for the GCR_L2_CONFIG register introduced with CM3, and define the bits included in the register. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10639/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 197e89e commit 0ba3c12

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

arch/mips/include/asm/mips-cm.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ BUILD_CM_RW(reg3_base, MIPS_CM_GCB_OFS + 0xc0)
144144
BUILD_CM_RW(reg3_mask, MIPS_CM_GCB_OFS + 0xc8)
145145
BUILD_CM_R_(gic_status, MIPS_CM_GCB_OFS + 0xd0)
146146
BUILD_CM_R_(cpc_status, MIPS_CM_GCB_OFS + 0xf0)
147+
BUILD_CM_RW(l2_config, MIPS_CM_GCB_OFS + 0x130)
147148

148149
/* Core Local & Core Other register accessor functions */
149150
BUILD_CM_Cx_RW(reset_release, 0x00)
@@ -256,6 +257,16 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80)
256257
#define CM_GCR_CPC_STATUS_EX_SHF 0
257258
#define CM_GCR_CPC_STATUS_EX_MSK (_ULCAST_(0x1) << 0)
258259

260+
/* GCR_L2_CONFIG register fields */
261+
#define CM_GCR_L2_CONFIG_BYPASS_SHF 20
262+
#define CM_GCR_L2_CONFIG_BYPASS_MSK (_ULCAST_(0x1) << 20)
263+
#define CM_GCR_L2_CONFIG_SET_SIZE_SHF 12
264+
#define CM_GCR_L2_CONFIG_SET_SIZE_MSK (_ULCAST_(0xf) << 12)
265+
#define CM_GCR_L2_CONFIG_LINE_SIZE_SHF 8
266+
#define CM_GCR_L2_CONFIG_LINE_SIZE_MSK (_ULCAST_(0xf) << 8)
267+
#define CM_GCR_L2_CONFIG_ASSOC_SHF 0
268+
#define CM_GCR_L2_CONFIG_ASSOC_MSK (_ULCAST_(0xff) << 0)
269+
259270
/* GCR_Cx_COHERENCE register fields */
260271
#define CM_GCR_Cx_COHERENCE_COHDOMAINEN_SHF 0
261272
#define CM_GCR_Cx_COHERENCE_COHDOMAINEN_MSK (_ULCAST_(0xff) << 0)

0 commit comments

Comments
 (0)