diff options
author | Jayachandran C. <jchandra@FreeBSD.org> | 2012-07-09 10:24:45 +0000 |
---|---|---|
committer | Jayachandran C. <jchandra@FreeBSD.org> | 2012-07-09 10:24:45 +0000 |
commit | fe60722c96df9b265d37274804c16abac1042d42 (patch) | |
tree | ab9915fe9a2f30289771c39232862250de335a19 /sys/mips | |
parent | 21221d1f6b8de2c7793dea1c5f44c5fb10ae3641 (diff) | |
download | src-fe60722c96df9b265d37274804c16abac1042d42.tar.gz src-fe60722c96df9b265d37274804c16abac1042d42.zip |
Identify Netlogic XLP 8xx B1 chip revisions
Add functions to check for 8xx B0 and 3xx Ax revisions which will
be used in network block initialization.
Notes
Notes:
svn path=/head/; revision=238290
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/nlm/board.c | 2 | ||||
-rw-r--r-- | sys/mips/nlm/xlp.h | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sys/mips/nlm/board.c b/sys/mips/nlm/board.c index b4b0439dd372..c6fd59d49216 100644 --- a/sys/mips/nlm/board.c +++ b/sys/mips/nlm/board.c @@ -362,6 +362,8 @@ nlm_print_processor_info(void) revstr = "A2"; break; case 3: revstr = "B0"; break; + case 4: + revstr = "B1"; break; default: revstr = "??"; break; } diff --git a/sys/mips/nlm/xlp.h b/sys/mips/nlm/xlp.h index 3414aed3b439..832c9519a332 100644 --- a/sys/mips/nlm/xlp.h +++ b/sys/mips/nlm/xlp.h @@ -57,6 +57,7 @@ #define XLP_REVISION_A1 0x01 #define XLP_REVISION_A2 0x02 #define XLP_REVISION_B0 0x03 +#define XLP_REVISION_B1 0x04 #ifndef LOCORE /* @@ -87,6 +88,16 @@ static __inline int nlm_is_xlp3xx(void) return (nlm_processor_id() == CHIP_PROCESSOR_ID_XLP_3XX); } +static __inline int nlm_is_xlp3xx_ax(void) +{ + uint32_t procid = mips_rd_prid(); + int prid = (procid >> 8) & 0xff; + int rev = procid & 0xff; + + return (prid == CHIP_PROCESSOR_ID_XLP_3XX && + rev < XLP_REVISION_B0); +} + static __inline int nlm_is_xlp4xx(void) { int prid = nlm_processor_id(); @@ -116,5 +127,17 @@ static __inline int nlm_is_xlp8xx_ax(void) (rev < XLP_REVISION_B0)); } +static __inline int nlm_is_xlp8xx_b0(void) +{ + uint32_t procid = mips_rd_prid(); + int prid = (procid >> 8) & 0xff; + int rev = procid & 0xff; + + return ((prid == CHIP_PROCESSOR_ID_XLP_8XX || + prid == CHIP_PROCESSOR_ID_XLP_432 || + prid == CHIP_PROCESSOR_ID_XLP_416) && + rev == XLP_REVISION_B0); +} + #endif /* LOCORE */ #endif /* __NLM_XLP_H__ */ |