From 9c5873b7de153a162c09e53be4ed042fa4023163 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 17 Jun 2005 14:32:23 +0000 Subject: 2005-06-17 Joel Sherrill * 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. --- c/src/ChangeLog | 6 ++++++ c/src/libchip/network/if_dc.c | 29 ++++++++++++++++++++++------- 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 + + * 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 * 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 #include #include @@ -114,8 +131,8 @@ #include #include "if_media.h" -#include "pci.h" -/*#include moved to cpukit/include/rtems in CVS current ! +#include +/* #include #include */ @@ -160,10 +177,7 @@ #define SRM_MEDIA #endif -#if defined(__i386__) -#include -#include -#endif +#include #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 */ -- cgit v1.2.3