Skip to content

Commit

Permalink
[MIPS] Add macros to encode processor revisions.
Browse files Browse the repository at this point in the history
Older processors used to encode processor version and revision in two
4-bit bitfields, the 4K seems to simply count up and even newer MTI cores
have switched to use the 8-bits as 3:3:2 bitfield with the last field as
the patch number.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Jul 6, 2007
1 parent 075c733 commit fde9782
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/asm-mips/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@
#define PRID_REV_VR4181A 0x0070 /* Same as VR4122 */
#define PRID_REV_VR4130 0x0080

/*
* Older processors used to encode processor version and revision in two
* 4-bit bitfields, the 4K seems to simply count up and even newer MTI cores
* have switched to use the 8-bits as 3:3:2 bitfield with the last field as
* the patch number. *ARGH*
*/
#define PRID_REV_ENCODE_44(ver, rev) \
((ver) << 4 | (rev))
#define PRID_REV_ENCODE_332(ver, rev, patch) \
((ver) << 5 | (rev) << 2 | (patch))

/*
* FPU implementation/revision register (CP1 control register 0).
*
Expand Down

0 comments on commit fde9782

Please sign in to comment.