Skip to contentSkip to conversation

mips: Fix CPC_BASE_ADDR mask to match datasheet

PATCH In review Nikolay Martynov 2 participants 3 messages Dec 8, 2015 – Dec 15, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: Fix CPC_BASE_ADDR mask to match datasheet

According to 'MIPS32® interAptivTM Multiprocessing System Programmer’s Guide' CPC_BASE_ADDR takes bits [31:15].

This change is tested ith mt7621 which wasn't working without it.

---
 arch/mips/include/asm/mips-cm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mips-cm.h +2 -2
index 6516e9d..f942ec2 100644
@@ -286,8 +286,8 @@ BUILD_CM_Cx_R_(tcid_8_priority,	0x80)
 #define CM_GCR_GIC_BASE_GICEN_MSK		(_ULCAST_(0x1) << 0)
 
 /* GCR_CPC_BASE register fields */
-#define CM_GCR_CPC_BASE_CPCBASE_SHF		17
-#define CM_GCR_CPC_BASE_CPCBASE_MSK		(_ULCAST_(0x7fff) << 17)
+#define CM_GCR_CPC_BASE_CPCBASE_SHF		15
+#define CM_GCR_CPC_BASE_CPCBASE_MSK		(_ULCAST_(0x1ffff) << 15)
 #define CM_GCR_CPC_BASE_CPCEN_SHF		0
 #define CM_GCR_CPC_BASE_CPCEN_MSK		(_ULCAST_(0x1) << 0)
 
Signature · 1 line
2.6.3
#1 lore raw

Hi.

I just wanted to confirm that this is the right list for this kind
of patches. Please let me know if I should submit it to some other place.

Thanks!

2015-12-08 13:27 GMT-05:00 Nikolay Martynov <[email protected]>:

Quoted 28 lines

According to 'MIPS32® interAptivTM Multiprocessing System Programmer’s Guide' CPC_BASE_ADDR takes bits [31:15].

This change is tested ith mt7621 which wasn't working without it.

---
 arch/mips/include/asm/mips-cm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mips-cm.h +2 -3
index 6516e9d..f942ec2 100644
@@ -286,8 +286,8 @@ BUILD_CM_Cx_R_(tcid_8_priority,     0x80)
 #define CM_GCR_GIC_BASE_GICEN_MSK              (_ULCAST_(0x1) << 0)
 
 /* GCR_CPC_BASE register fields */
-#define CM_GCR_CPC_BASE_CPCBASE_SHF            17
-#define CM_GCR_CPC_BASE_CPCBASE_MSK            (_ULCAST_(0x7fff) << 17)
+#define CM_GCR_CPC_BASE_CPCBASE_SHF            15
+#define CM_GCR_CPC_BASE_CPCBASE_MSK            (_ULCAST_(0x1ffff) << 15)
 #define CM_GCR_CPC_BASE_CPCEN_SHF              0
 #define CM_GCR_CPC_BASE_CPCEN_MSK              (_ULCAST_(0x1) << 0)
 
--

2.6.3

Signature · 2 lines
Martynov Nikolay.
Email: [email protected]
Reviewed-by
#2 lore raw

Hi Nikolay,

Quoted 5 lines · Nikolay Martynov

Hi.

I just wanted to confirm that this is the right list for this kind
of patches. Please let me know if I should submit it to some other place.

You have the right list. All patches to this list go into patchwork[1], so they shouldn't get forgotten.

The patch looks correct to me based on interAptiv and P5600 manuals, and the current uses of these definitions.

Thanks!
James

[1] http://patchwork.linux-mips.org

Quoted 39 lines

Thanks!

2015-12-08 13:27 GMT-05:00 Nikolay Martynov <[email protected]>:

Quoted 28 lines

According to 'MIPS32® interAptivTM Multiprocessing System Programmer’s Guide' CPC_BASE_ADDR takes bits [31:15].

This change is tested ith mt7621 which wasn't working without it.

---
 arch/mips/include/asm/mips-cm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mips-cm.h +2 -3
index 6516e9d..f942ec2 100644
@@ -286,8 +286,8 @@ BUILD_CM_Cx_R_(tcid_8_priority,     0x80)
 #define CM_GCR_GIC_BASE_GICEN_MSK              (_ULCAST_(0x1) << 0)
 
 /* GCR_CPC_BASE register fields */
-#define CM_GCR_CPC_BASE_CPCBASE_SHF            17
-#define CM_GCR_CPC_BASE_CPCBASE_MSK            (_ULCAST_(0x7fff) << 17)
+#define CM_GCR_CPC_BASE_CPCBASE_SHF            15
+#define CM_GCR_CPC_BASE_CPCBASE_MSK            (_ULCAST_(0x1ffff) << 15)
 #define CM_GCR_CPC_BASE_CPCEN_SHF              0
 #define CM_GCR_CPC_BASE_CPCEN_MSK              (_ULCAST_(0x1) << 0)
 
--

2.6.3

Signature · 2 lines
Martynov Nikolay.
Email: [email protected]