summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/netlogic/xlp-hal/xlp.h')
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/xlp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
index d59cdd69496b..7a4a5142bbc5 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
@@ -64,5 +64,12 @@ int xlp_get_dram_map(int n, uint64_t *dram_map);
/* Device tree related */
void *xlp_dt_init(void *fdtp);
+static inline int cpu_is_xlpii(void)
+{
+ int chip = read_c0_prid() & 0xff00;
+
+ return chip == PRID_IMP_NETLOGIC_XLP2XX;
+}
+
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_NLM_XLP_H */