From: Thomas Bogendoerfer Date: Sun, 25 Nov 2007 10:27:06 +0000 (+0100) Subject: [MIPS] IP22/IP28: fix extracting board/chip rev X-Git-Tag: firefly_0821_release~23656^2~43 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=68efdb81c6c3b5c1df7169a4b460907198b19103;p=firefly-linux-kernel-4.4.55.git [MIPS] IP22/IP28: fix extracting board/chip rev Taken from Peter Fuersts IP28 patches Signed-off-by: Thomas Bogendoerfer Signed-off-by: Ralf Baechle --- diff --git a/include/asm-mips/sgi/ioc.h b/include/asm-mips/sgi/ioc.h index f3e3dc9bb732..343ed15f8dc4 100644 --- a/include/asm-mips/sgi/ioc.h +++ b/include/asm-mips/sgi/ioc.h @@ -138,8 +138,8 @@ struct sgioc_regs { u8 _sysid[3]; volatile u8 sysid; #define SGIOC_SYSID_FULLHOUSE 0x01 -#define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5) -#define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1) +#define SGIOC_SYSID_BOARDREV(x) (((x) & 0x1e) >> 1) +#define SGIOC_SYSID_CHIPREV(x) (((x) & 0xe0) >> 5) u32 _unused2; u8 _read[3]; volatile u8 read;