summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mvme5500/network
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-23 06:28:17 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-23 06:28:17 +0000
commit2e9d27c06c132927e5f69f69ee178451a03102fd (patch)
treebeeea69183875982147893a9de76d95ea15c75f6 /c/src/lib/libbsp/powerpc/mvme5500/network
parent2009-10-23 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-2e9d27c06c132927e5f69f69ee178451a03102fd.tar.bz2
2009-10-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* irq/BSP_irq.c, network/if_100MHz/GT64260eth.c, network/if_1GHz/if_wm.c, network/if_1GHz/pci_map.c, startup/bspstart.c: Add missing prototypes. Adjust bogus types. Remove unused vars.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mvme5500/network')
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c12
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c10
-rw-r--r--c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c4
3 files changed, 19 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
index feec946c92..8288641bd7 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_100MHz/GT64260eth.c
@@ -61,6 +61,8 @@
#include <bsp/GT64260eth.h>
#include <bsp/VPD.h>
+extern unsigned char ReadConfVPD_buff(int offset); /* in startup/bspstart.c */
+
#define GT_ETH_TASK_NAME "Geth"
#define PKT_BUF_SZ 1536
#define SOFTC_ALIGN 31
@@ -104,7 +106,7 @@ enum GTeth_hash_op {
#define ET_MINLEN 64 /* minimum message length */
-static int GTeth_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
+static int GTeth_ifioctl(struct ifnet *ifp, ioctl_command_t cmd, caddr_t data);
static void GTeth_ifstart (struct ifnet *);
static void GTeth_ifchange(struct GTeth_softc *sc);
static void GTeth_init_rx_ring(struct GTeth_softc *sc);
@@ -502,9 +504,9 @@ int rtems_GT64260eth_driver_attach(struct rtems_bsdnet_ifconfig *config, int att
static void GT64260eth_stats(struct GTeth_softc *sc)
{
+#if 0
struct ifnet *ifp = &sc->arpcom.ac_if;
-#if 0
printf(" Rx Interrupts:%-8lu\n", sc->stats.rxInterrupts);
printf(" Receive Packets:%-8lu\n", ifp->if_ipackets);
printf(" Receive errors:%-8lu\n", ifp->if_ierrors);
@@ -532,7 +534,7 @@ void GT64260eth_printStats(void)
GT64260eth_stats(root_GT64260eth_dev);
}
-static int GTeth_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
+static int GTeth_ifioctl(struct ifnet *ifp, ioctl_command_t cmd, caddr_t data)
{
struct GTeth_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *) data;
@@ -855,6 +857,7 @@ static void GTeth_txq_free(struct GTeth_softc *sc, unsigned cmdsts)
--sc->txq_nactive;
}
+#if UNUSED
static int txq_high_limit(struct GTeth_softc *sc)
{
/*
@@ -894,6 +897,9 @@ static int txq_high_limit(struct GTeth_softc *sc)
} /* end if ( TX_RING_SIZE == sc->txq_nactive + TXQ_HiLmt_OFF) */
return 0;
}
+#endif
+
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m)
{
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
index 7288fe8c92..761beb0a10 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/if_wm.c
@@ -77,6 +77,9 @@
#include <bsp/pci.h>
#include <bsp/pcireg.h>
#include <bsp/if_wmreg.h>
+
+extern int pci_mem_find(int b, int d, int f, int reg, unsigned *basep,unsigned *sizep);
+
#define WMREG_RADV 0x282c /* Receive Interrupt Absolute Delay Timer */
#define ETHERTYPE_FLOWCONTROL 0x8808 /* 802.3x flow control packet */
@@ -236,7 +239,6 @@ static void wm_set_filter(struct wm_softc *sc);
static void i82544EI_rx(struct wm_softc *sc);
static void i82544EI_isr(rtems_irq_hdl_param handle);
static void i82544EI_sendpacket(struct wm_softc *sc, struct mbuf *m);
-extern int pci_mem_find(), pci_io_find(), pci_get_capability();
static void i82544EI_irq_on(const rtems_irq_connect_data *irq)
{
@@ -1142,11 +1144,11 @@ static int i82544EI_init_hw(struct wm_softc *sc)
return(0);
}
-void BSP_rdTIDV()
+void BSP_rdTIDV(void)
{
printf("Reg TIDV: 0x%x\n", in_le32((volatile unsigned *) (BSP_1GHz_membase+WMREG_TIDV)));
}
-void BSP_rdRDTR()
+void BSP_rdRDTR(void)
{
printf("Reg RDTR: 0x%x\n", in_le32((volatile unsigned *) (BSP_1GHz_membase+WMREG_RDTR)));
}
@@ -1600,7 +1602,7 @@ static void i82544EI_error(struct wm_softc *sc)
if ((++sc->if_err_ptr1)==IF_ERR_BUFSZE) sc->if_err_ptr1=0; /* Till Straumann */
}
-void i82544EI_printStats()
+void i82544EI_printStats(void)
{
i82544EI_stats(root_i82544EI_dev);
}
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
index c238e637d0..7594fe9841 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
+++ b/c/src/lib/libbsp/powerpc/mvme5500/network/if_1GHz/pci_map.c
@@ -24,6 +24,10 @@
#include <bsp/pci.h>
#include <bsp/pcireg.h>
+extern int pci_get_capability(int b, int d, int f, int capid,int *offset,uint32_t *value);
+extern int pci_mem_find(int b, int d, int f, int reg, unsigned *basep,unsigned *sizep);
+extern int pci_io_find(int b, int d, int f, int reg,unsigned *basep,unsigned *sizep);
+
int pci_io_find(int b, int d, int f, int reg,unsigned *basep,unsigned *sizep)
{
uint32_t address, mask;