projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9c3357
)
[MIPS] IP22/IP28: fix extracting board/chip rev
author
Thomas Bogendoerfer
<tsbogend@alpha.franken.de>
Sun, 25 Nov 2007 10:27:06 +0000
(11:27 +0100)
committer
Ralf Baechle
<ralf@linux-mips.org>
Tue, 29 Jan 2008 10:14:58 +0000
(10:14 +0000)
Taken from Peter Fuersts IP28 patches
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/sgi/ioc.h
patch
|
blob
|
history
diff --git
a/include/asm-mips/sgi/ioc.h
b/include/asm-mips/sgi/ioc.h
index f3e3dc9bb73239341d280f0f9eab70d20c2b756e..343ed15f8dc421c16fc429064abb1973046027e7 100644
(file)
--- 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;