Browse Source

[ns8390] Use stub files instead of src/Config

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>
tags/v0.9.4
H. Peter Anvin 16 years ago
parent
commit
1152b78ec1
5 changed files with 23 additions and 6 deletions
  1. 0
    6
      src/Config
  2. 5
    0
      src/drivers/net/3c503.c
  3. 6
    0
      src/drivers/net/ne.c
  4. 6
    0
      src/drivers/net/ns8390.c
  5. 6
    0
      src/drivers/net/wd.c

+ 0
- 6
src/Config View File

@@ -373,9 +373,3 @@
373 373
 #			  address by one (0x300 -> 0x301) will force a
374 374
 #			  more aggressive probing algorithm. This might
375 375
 #			  be neccessary after a soft-reset of the NIC.
376
-
377
-
378
-CFLAGS_3c503	= -DINCLUDE_3C503 # -DT503_SHMEM
379
-CFLAGS_ne	= -DINCLUDE_NE -DNE_SCAN=0x300,0x280,0x320,0x340,0x380
380
-CFLAGS_ns8390	= -DINCLUDE_NS8390	# NE2000/PCI!
381
-CFLAGS_wd	= -DINCLUDE_WD -DWD_DEFAULT_MEM=0xCC000

+ 5
- 0
src/drivers/net/3c503.c View File

@@ -0,0 +1,5 @@
1
+/* 3Com 3c503, a memory-mapped NS8390-based card */
2
+#if 0 /* Currently broken! */
3
+#define INCLUDE_3C503
4
+#include "ns8390.c"
5
+#endif

+ 6
- 0
src/drivers/net/ne.c View File

@@ -0,0 +1,6 @@
1
+/* ISA I/O mapped NS8390-based cards, including NE2000 */
2
+#if 0 /* Currently broken! */
3
+#define INCLUDE_NE 1
4
+#define NE_SCAN 0x300,0x280,0x320,0x340,0x380
5
+#include "ns8390.c"
6
+#endif

+ 6
- 0
src/drivers/net/ns8390.c View File

@@ -29,6 +29,12 @@ SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02
29 29
 
30 30
 #if 1
31 31
 
32
+#if !defined(INCLUDE_NS8390) && !defined(INCLUDE_WD) && \
33
+    !defined(INCLUDE_NE) && !defined(INCLUDE_3C503)
34
+  /* The driver named ns8390 is the PCI driver, often called
35
+     "PCI ne2000 clones". */
36
+# define INCLUDE_NS8390 1
37
+#endif
32 38
 
33 39
 #include "etherboot.h"
34 40
 #include "nic.h"

+ 6
- 0
src/drivers/net/wd.c View File

@@ -0,0 +1,6 @@
1
+/* ISA memory-mapped NS8390-based cards, including WD80x3 */
2
+#if 0 /* Currently broken! */
3
+#define INCLUDE_WD
4
+#define WD_DEFAULT_MEM 0xCC000
5
+#include "ns8390.c"
6
+#endif

Loading…
Cancel
Save