[ns8390] Use stub files instead of src/Config
authorH. Peter Anvin <hpa@zytor.com>
Mon, 30 Jun 2008 19:09:21 +0000 (12:09 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 30 Jun 2008 19:26:12 +0000 (12:26 -0700)
ns8390.c can produce four different drivers (one PCI, three ISA.)  The
ISA driver requires setting a few macros; do that by setting defines
in stub files instead of using src/Config.

Currently, all the ISA drivers are broken (they were not enabled by
default), so #if 0 them out.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
src/Config
src/drivers/net/3c503.c [new file with mode: 0644]
src/drivers/net/ne.c [new file with mode: 0644]
src/drivers/net/ns8390.c
src/drivers/net/wd.c [new file with mode: 0644]

index 1c0cb1e..ccbf040 100644 (file)
 #                        address by one (0x300 -> 0x301) will force a
 #                        more aggressive probing algorithm. This might
 #                        be neccessary after a soft-reset of the NIC.
-
-
-CFLAGS_3c503   = -DINCLUDE_3C503 # -DT503_SHMEM
-CFLAGS_ne      = -DINCLUDE_NE -DNE_SCAN=0x300,0x280,0x320,0x340,0x380
-CFLAGS_ns8390  = -DINCLUDE_NS8390      # NE2000/PCI!
-CFLAGS_wd      = -DINCLUDE_WD -DWD_DEFAULT_MEM=0xCC000
diff --git a/src/drivers/net/3c503.c b/src/drivers/net/3c503.c
new file mode 100644 (file)
index 0000000..1704dcd
--- /dev/null
@@ -0,0 +1,5 @@
+/* 3Com 3c503, a memory-mapped NS8390-based card */
+#if 0 /* Currently broken! */
+#define INCLUDE_3C503
+#include "ns8390.c"
+#endif
diff --git a/src/drivers/net/ne.c b/src/drivers/net/ne.c
new file mode 100644 (file)
index 0000000..50347de
--- /dev/null
@@ -0,0 +1,6 @@
+/* ISA I/O mapped NS8390-based cards, including NE2000 */
+#if 0 /* Currently broken! */
+#define INCLUDE_NE 1
+#define NE_SCAN 0x300,0x280,0x320,0x340,0x380
+#include "ns8390.c"
+#endif
index c57ed7a..3461c21 100644 (file)
@@ -29,6 +29,12 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
 
 #if 1
 
+#if !defined(INCLUDE_NS8390) && !defined(INCLUDE_WD) && \
+    !defined(INCLUDE_NE) && !defined(INCLUDE_3C503)
+  /* The driver named ns8390 is the PCI driver, often called
+     "PCI ne2000 clones". */
+# define INCLUDE_NS8390 1
+#endif
 
 #include "etherboot.h"
 #include "nic.h"
diff --git a/src/drivers/net/wd.c b/src/drivers/net/wd.c
new file mode 100644 (file)
index 0000000..9939aa0
--- /dev/null
@@ -0,0 +1,6 @@
+/* ISA memory-mapped NS8390-based cards, including WD80x3 */
+#if 0 /* Currently broken! */
+#define INCLUDE_WD
+#define WD_DEFAULT_MEM 0xCC000
+#include "ns8390.c"
+#endif