diff options
author | Jayachandran C <jchandra@broadcom.com> | 2014-04-29 10:37:49 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-30 10:49:02 -0400 |
commit | 5874743ea8479b780799927f25580ef134547f0f (patch) | |
tree | e3e0e661306fc728d06b7a5e8bb8265a91e4d9d3 /arch/mips/include | |
parent | 0d57eba02d6f0685e61763502962fcf00fd4e4cc (diff) |
MIPS: Netlogic: Use PRID_IMP_MASK macro
Use PRID_IMP_MASK macro instead of 0xff00 to extract the processor
type.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6868/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/netlogic/mips-extns.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/xlp.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h index de9aada6f4c1..38af905bf07e 100644 --- a/arch/mips/include/asm/netlogic/mips-extns.h +++ b/arch/mips/include/asm/netlogic/mips-extns.h | |||
@@ -146,9 +146,9 @@ static inline int hard_smp_processor_id(void) | |||
146 | 146 | ||
147 | static inline int nlm_nodeid(void) | 147 | static inline int nlm_nodeid(void) |
148 | { | 148 | { |
149 | uint32_t prid = read_c0_prid(); | 149 | uint32_t prid = read_c0_prid() & PRID_IMP_MASK; |
150 | 150 | ||
151 | if ((prid & 0xff00) == PRID_IMP_NETLOGIC_XLP9XX) | 151 | if (prid == PRID_IMP_NETLOGIC_XLP9XX) |
152 | return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; | 152 | return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; |
153 | else | 153 | else |
154 | return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; | 154 | return (__read_32bit_c0_register($15, 1) >> 5) & 0x3; |
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h index bd7dda096506..a11b289956e6 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h | |||
@@ -99,7 +99,7 @@ void *xlp_dt_init(void *fdtp); | |||
99 | 99 | ||
100 | static inline int cpu_is_xlpii(void) | 100 | static inline int cpu_is_xlpii(void) |
101 | { | 101 | { |
102 | int chip = read_c0_prid() & 0xff00; | 102 | int chip = read_c0_prid() & PRID_IMP_MASK; |
103 | 103 | ||
104 | return chip == PRID_IMP_NETLOGIC_XLP2XX || | 104 | return chip == PRID_IMP_NETLOGIC_XLP2XX || |
105 | chip == PRID_IMP_NETLOGIC_XLP9XX; | 105 | chip == PRID_IMP_NETLOGIC_XLP9XX; |
@@ -107,7 +107,7 @@ static inline int cpu_is_xlpii(void) | |||
107 | 107 | ||
108 | static inline int cpu_is_xlp9xx(void) | 108 | static inline int cpu_is_xlp9xx(void) |
109 | { | 109 | { |
110 | int chip = read_c0_prid() & 0xff00; | 110 | int chip = read_c0_prid() & PRID_IMP_MASK; |
111 | 111 | ||
112 | return chip == PRID_IMP_NETLOGIC_XLP9XX; | 112 | return chip == PRID_IMP_NETLOGIC_XLP9XX; |
113 | } | 113 | } |