summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2005-06-17 14:32:23 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2005-06-17 14:32:23 +0000
commit9c5873b7de153a162c09e53be4ed042fa4023163 (patch)
treeda4b9ed0b6aa8370f6ae3cb99907a48bcde3306f /c
parent2005-06-17 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-9c5873b7de153a162c09e53be4ed042fa4023163.tar.bz2
2005-06-17 Joel Sherrill <joel@OARcorp.com>
* libchip/network/if_dc.c: Begin to convert to new PCI and IRQ interface. Also correct attempting to build on other than PowerPC and x86.
Diffstat (limited to 'c')
-rw-r--r--c/src/ChangeLog6
-rw-r--r--c/src/libchip/network/if_dc.c29
2 files changed, 28 insertions, 7 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index b839879227..f5980aac8a 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-17 Joel Sherrill <joel@OARcorp.com>
+
+ * libchip/network/if_dc.c: Begin to convert to new PCI and IRQ
+ interface. Also correct attempting to build on other than PowerPC and
+ x86.
+
2005-06-16 Daron Chabot <daron@nucleus.usask.ca>
* libchip/Makefile.am: Add driver for Tulip clones.
diff --git a/c/src/libchip/network/if_dc.c b/c/src/libchip/network/if_dc.c
index d7ffe0cc7f..20ad0dd47c 100644
--- a/c/src/libchip/network/if_dc.c
+++ b/c/src/libchip/network/if_dc.c
@@ -94,6 +94,23 @@
* AX88140A doesn't support internal NWAY.
*/
+/*
+ * This driver only supports architectures with the new style
+ * exception processing. The following checks try to keep this
+ * from being compiled on systems which can't support this driver.
+ */
+
+#if defined(__i386__)
+ #define DRIVER_SUPPORTED
+#endif
+
+#if defined(__PPC__) && (defined(mpc604) || defined(mpc750) || defined(mpc603e))
+ #define DRIVER_SUPPORTED
+#endif
+
+#undef DRIVER_SUPPORTED
+
+#if defined(DRIVER_SUPPORTED)
#include <rtems.h>
#include <rtems/error.h>
#include <rtems/rtems_bsdnet.h>
@@ -114,8 +131,8 @@
#include <bsp.h>
#include "if_media.h"
-#include "pci.h"
-/*#include <rtems/pci.h> moved to cpukit/include/rtems in CVS current !
+#include <rtems/pci.h>
+/*
#include <sys/kernel.h>
#include <sys/sysctl.h>
*/
@@ -160,10 +177,7 @@
#define SRM_MEDIA
#endif
-#if defined(__i386__)
-#include <irq.h>
-#include <pcibios.h>
-#endif
+#include <bsp/irq.h>
#include "if_dcreg.h"
@@ -1904,7 +1918,7 @@ rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
/*
* First, find a DEC board
*/
- if (pcib_init() == PCIB_ERR_NOTPRESENT) {
+ if (pci_initialize() == PCIB_ERR_NOTPRESENT) {
rtems_panic("PCI BIOS not found !!");
}
@@ -3796,3 +3810,4 @@ static int dc_resume(dev)
#endif
+#endif /* end if supported */