summaryrefslogtreecommitdiff
path: root/include/linux/scx200.h
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2005-03-07 17:39:00 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-07 17:39:00 -0800
commitdccafd6e87b700ca429461c62466de2e1e9183d3 (patch)
treec94487e8ece5bef18fe1a9f85d6513528f2b2c9d /include/linux/scx200.h
parent54fe2b5bfa8887f57cfff32c81d124b56d9de3ac (diff)
[PATCH] Determine SCx200 CB address at run-time
The current SCx200 drivers use a fixed base address of 0x9000 for the Configuration Block, but some systems (at least the Soekris net4801) uses a base address of 0x6000. This patch first tries the fixed address then - if no configuration block could be found - tries the address written to the Configuration Block Address Scratchpad register by the BIOS. Signed-off-by: Henrik Brix Andersen <brix@gentoo.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/scx200.h')
-rw-r--r--include/linux/scx200.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/scx200.h b/include/linux/scx200.h
index af7d53acad99..a22f9e173ad2 100644
--- a/include/linux/scx200.h
+++ b/include/linux/scx200.h
@@ -7,6 +7,10 @@
/* Interesting stuff for the National Semiconductor SCx200 CPU */
+extern unsigned scx200_cb_base;
+
+#define scx200_cb_present() (scx200_cb_base!=0)
+
/* F0 PCI Header/Bridge Configuration Registers */
#define SCx200_DOCCS_BASE 0x78 /* DOCCS Base Address Register */
#define SCx200_DOCCS_CTRL 0x7c /* DOCCS Control Register */
@@ -15,7 +19,7 @@
#define SCx200_GPIO_SIZE 0x2c /* Size of GPIO register block */
/* General Configuration Block */
-#define SCx200_CB_BASE 0x9000 /* Base fixed at 0x9000 according to errata */
+#define SCx200_CB_BASE_FIXED 0x9000 /* Base fixed at 0x9000 according to errata? */
/* Watchdog Timer */
#define SCx200_WDT_OFFSET 0x00 /* offset within configuration block */
@@ -44,9 +48,7 @@
#define SCx200_IID 0x3c /* IA On a Chip Identification Number Reg */
#define SCx200_REV 0x3d /* Revision Register */
#define SCx200_CBA 0x3e /* Configuration Base Address Register */
-
-/* Verify that the configuration block really is there */
-#define scx200_cb_probe(base) (inw((base) + SCx200_CBA) == (base))
+#define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */
/*
Local variables: