Commit 68efdb81c6c3b5c1df7169a4b460907198b19103

Authored by Thomas Bogendoerfer
Committed by Ralf Baechle
1 parent e9c33572a9

[MIPS] IP22/IP28: fix extracting board/chip rev

Taken from Peter Fuersts IP28 patches

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

include/asm-mips/sgi/ioc.h
... ... @@ -138,8 +138,8 @@
138 138 u8 _sysid[3];
139 139 volatile u8 sysid;
140 140 #define SGIOC_SYSID_FULLHOUSE 0x01
141   -#define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5)
142   -#define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1)
  141 +#define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1)
  142 +#define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5)
143 143 u32 _unused2;
144 144 u8 _read[3];
145 145 volatile u8 read;