summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2005-04-18 13:00:42 +0200
committerMichael Brown2005-04-18 13:00:42 +0200
commit85b00c4b72a03d10bf8b57636446a1c053934c8a (patch)
treeefb235e38175219bf5fddc811a6c9c369ebc1367 /src/drivers
parentMoved console options to config.h (diff)
downloadipxe-85b00c4b72a03d10bf8b57636446a1c053934c8a.tar.gz
ipxe-85b00c4b72a03d10bf8b57636446a1c053934c8a.tar.xz
ipxe-85b00c4b72a03d10bf8b57636446a1c053934c8a.zip
Move RELOCATE into config.h
Move ISA probe address logic from config.c into isa.c, create header file config/isa.h.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/isa.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/drivers/bus/isa.c b/src/drivers/bus/isa.c
index 4fb06be9..99784cc0 100644
--- a/src/drivers/bus/isa.c
+++ b/src/drivers/bus/isa.c
@@ -1,4 +1,5 @@
#include "string.h"
+#include "config/isa.h"
#include "isa.h"
/*
@@ -28,6 +29,19 @@ DEV_BUS( struct isa_device, isa_dev );
static char isa_magic[0]; /* guaranteed unique symbol */
/*
+ * User-supplied probe address list
+ *
+ */
+static isa_probe_addr_t isa_extra_probe_addrs[] = {
+ ISA_PROBE_ADDRS
+#if ISA_PROBE_ONLY
+ , 0
+#endif
+};
+#define isa_extra_probe_addr_count \
+ ( sizeof ( isa_extra_probe_addrs ) / sizeof ( isa_extra_probe_addrs[0] ) )
+
+/*
* Find an ISA device matching the specified driver
*
*/
@@ -41,8 +55,8 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
isa->magic = isa_magic;
}
- /* Iterate through any ISA probe addresses specified by
- * config.c, starting where we left off.
+ /* Iterate through any ISA probe addresses specified by the
+ * user, starting where we left off.
*/
DBG ( "ISA searching for device matching driver %s\n", driver->name );
for ( i = isa->probe_idx ; i < isa_extra_probe_addr_count ; i++ ) {
@@ -51,7 +65,7 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
isa->already_tried = 0;
continue;
}
-
+
/* Set I/O address */
ioaddr = isa_extra_probe_addrs[i];