summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2006-01-12 06:13:03 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2006-01-12 06:13:03 +0000
commit2be6d66bc9f94da00f6c073b82a266c42cb90c75 (patch)
treede2e5c6b75259e8ad17cc69415f606ebff907349
parentRegenerate. (diff)
downloadrtems-2be6d66bc9f94da00f6c073b82a266c42cb90c75.tar.bz2
2006-01-12 Ralf Corsepius <ralf.corsepius@rtems.org>
* libchip/Makefile.am: Build libchip/network/smc91111. * libchip/network/smc91111.c, libchip/network/smc91111config.h: Eliminate cyg_int* crap.
-rw-r--r--c/src/ChangeLog5
-rw-r--r--c/src/libchip/Makefile.am3
-rw-r--r--c/src/libchip/network/smc91111.c34
-rw-r--r--c/src/libchip/network/smc91111config.h26
4 files changed, 31 insertions, 37 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index 2255dfcf59..33c2dacc37 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-12 Ralf Corsepius <ralf.corsepius@rtems.org>
+ * libchip/Makefile.am: Build libchip/network/smc91111.
+ * libchip/network/smc91111.c, libchip/network/smc91111config.h:
+ Eliminate cyg_int* crap.
+
2006-01-11 Ralf Corsepius <ralf.corsepius@rtems.org>
* librdbg/Makefile.am: Add preinstall.am.
diff --git a/c/src/libchip/Makefile.am b/c/src/libchip/Makefile.am
index 4e99f9e122..39e4ae2b56 100644
--- a/c/src/libchip/Makefile.am
+++ b/c/src/libchip/Makefile.am
@@ -35,9 +35,8 @@ include_libchip_HEADERS += network/open_eth.h network/if_dcreg.h
libnetchip_a_SOURCES = network/cs8900.c network/dec21140.c network/i82586.c \
network/sonic.c network/if_fxp.c network/elnk.c network/open_eth.c \
network/if_dc.c
-# FIXME: These don't compile
include_libchip_HEADERS += network/smc91111.h network/smc91111exp.h
-# libnetchip_a_SOURCES += network/smc91111.c network/smc91111config.h
+libnetchip_a_SOURCES += network/smc91111.c network/smc91111config.h
endif
endif
diff --git a/c/src/libchip/network/smc91111.c b/c/src/libchip/network/smc91111.c
index 94ea6fc6b0..911f9a922b 100644
--- a/c/src/libchip/network/smc91111.c
+++ b/c/src/libchip/network/smc91111.c
@@ -61,11 +61,11 @@
struct lan91cxx_priv_data smc91111;
int lan91cxx_hardware_init(struct lan91cxx_priv_data *cpd);
-static cyg_uint16 lan91cxx_read_phy(struct lan91cxx_priv_data *cpd,
- cyg_uint8 phyaddr, cyg_uint8 phyreg);
+static uint16_t lan91cxx_read_phy(struct lan91cxx_priv_data *cpd,
+ uint8_t phyaddr, uint8_t phyreg);
static void lan91cxx_write_phy(struct lan91cxx_priv_data *cpd,
- cyg_uint8 phyaddr, cyg_uint8 phyreg,
- cyg_uint16 value);
+ uint8_t phyaddr, uint8_t phyreg,
+ uint16_t value);
static void lan91cxx_start(struct ifnet *ifp);
static void smc91111_start(struct ifnet *ifp);
static int smc_probe(struct lan91cxx_priv_data *cpd);
@@ -355,7 +355,7 @@ static int readpacket(struct lan91cxx_priv_data *cpd)
unsigned short stat, complen;
struct ifnet *ifp = &cpd->arpcom.ac_if;
#ifdef LAN91CXX_32BIT_RX
- cyg_uint32 val;
+ uint32_t val;
#endif
DEBUG_FUNCTION();
@@ -486,7 +486,7 @@ static void sendpacket(struct ifnet *ifp, struct mbuf *m)
struct mbuf *n = m;
unsigned short *sdata = NULL;
unsigned short ints, control;
- cyg_uint16 packet, status;
+ uint16_t packet, status;
dbg_prefix = ">";
DEBUG_FUNCTION();
@@ -1078,8 +1078,8 @@ static void lan91cxx_start(struct ifnet *ifp)
{
struct lan91cxx_priv_data *cpd = ifp->if_softc;
- cyg_uint16 intr;
- cyg_uint16 phy_ctl;
+ uint16_t intr;
+ uint16_t phy_ctl;
int delay;
DEBUG_FUNCTION();
@@ -1414,13 +1414,13 @@ static void lan91cxx_phy_configure(struct lan91cxx_priv_data *cpd)
}
#endif
-static cyg_uint16
-lan91cxx_read_phy(struct lan91cxx_priv_data *cpd, cyg_uint8 phyaddr,
- cyg_uint8 phyreg)
+static uint16_t
+lan91cxx_read_phy(struct lan91cxx_priv_data *cpd, uint8_t phyaddr,
+ uint8_t phyreg)
{
int i, mask, input_idx, clk_idx = 0;
- cyg_uint16 mii_reg, value;
- cyg_uint8 bits[64];
+ uint16_t mii_reg, value;
+ uint8_t bits[64];
/* 32 consecutive ones on MDO to establish sync */
for (i = 0; i < 32; ++i)
@@ -1503,12 +1503,12 @@ lan91cxx_read_phy(struct lan91cxx_priv_data *cpd, cyg_uint8 phyaddr,
}
static void
-lan91cxx_write_phy(struct lan91cxx_priv_data *cpd, cyg_uint8 phyaddr,
- cyg_uint8 phyreg, cyg_uint16 value)
+lan91cxx_write_phy(struct lan91cxx_priv_data *cpd, uint8_t phyaddr,
+ uint8_t phyreg, uint16_t value)
{
int i, mask, clk_idx = 0;
- cyg_uint16 mii_reg;
- cyg_uint8 bits[65];
+ uint16_t mii_reg;
+ uint8_t bits[65];
/* 32 consecutive ones on MDO to establish sync */
for (i = 0; i < 32; ++i)
diff --git a/c/src/libchip/network/smc91111config.h b/c/src/libchip/network/smc91111config.h
index 5c293e37fb..82e8021586 100644
--- a/c/src/libchip/network/smc91111config.h
+++ b/c/src/libchip/network/smc91111config.h
@@ -40,31 +40,21 @@
/* ----------------- compat layer ----------------- */
-/* -------------------------------------------------------------------------
- Define basic types for using integers in memory and structures;
- depends on compiler defaults and CPU type. */
-
-typedef unsigned char cyg_uint8 ;
-typedef signed char cyg_int8 ;
-typedef unsigned short cyg_uint16 ;
-typedef signed short cyg_int16 ;
-typedef unsigned int cyg_uint32 ;
-typedef signed int cyg_int32 ;
-typedef unsigned int cyg_bool ;
-
-typedef cyg_uint32 CYG_WORD;
-typedef cyg_uint8 CYG_BYTE;
-typedef cyg_uint16 CYG_WORD16;
-typedef cyg_uint32 CYG_WORD32;
+#include <rtems/stdint.h>
+
+typedef uint32_t CYG_WORD;
+typedef uint8_t CYG_BYTE;
+typedef uint16_t CYG_WORD16;
+typedef uint32_t CYG_WORD32;
#ifndef CYG_SWAP16
# define CYG_SWAP16(_x_) \
- ({ cyg_uint16 _x = (_x_); ((_x << 8) | (_x >> 8)); })
+ ({ uint16_t _x = (_x_); ((_x << 8) | (_x >> 8)); })
#endif
#ifndef CYG_SWAP32
# define CYG_SWAP32(_x_) \
- ({ cyg_uint32 _x = (_x_); \
+ ({ uint32_t _x = (_x_); \
((_x << 24) | \
((0x0000FF00UL & _x) << 8) | \
((0x00FF0000UL & _x) >> 8) | \