forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -40,31 +40,21 @@
|
||||
|
||||
/* ----------------- compat layer ----------------- */
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
Define basic types for using integers in memory and structures;
|
||||
depends on compiler defaults and CPU type. */
|
||||
#include <rtems/stdint.h>
|
||||
|
||||
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;
|
||||
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) | \
|
||||
|
||||
Reference in New Issue
Block a user