summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-11-04 18:09:59 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-11-04 18:09:59 +0000
commitf82dabae42c10bb31c3881af0954bea5d340db09 (patch)
tree99e58154fd148cb0a7f750e39b53fd627aca0bc6 /c
parent2005-11-04 Ralf Corsepius <ralf.corsepius@rtems.org> (diff)
downloadrtems-f82dabae42c10bb31c3881af0954bea5d340db09.tar.bz2
Use libcpu/byteorder.h for i386.
Diffstat (limited to 'c')
-rw-r--r--c/src/libchip/network/dec21140.c15
-rw-r--r--c/src/libchip/network/elnk.c14
2 files changed, 8 insertions, 21 deletions
diff --git a/c/src/libchip/network/dec21140.c b/c/src/libchip/network/dec21140.c
index 2a904fa64b..f5a7dc792b 100644
--- a/c/src/libchip/network/dec21140.c
+++ b/c/src/libchip/network/dec21140.c
@@ -61,6 +61,10 @@
#include <libcpu/io.h>
#endif
+#if defined(__i386__)
+#include <libcpu/byteorder.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
@@ -233,17 +237,6 @@ extern void Wait_X_ms( unsigned int timeToWait );
#define bus_to_phys(address) ((unsigned int) ((address)))
#define rtems_bsp_delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 )
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
-
-static inline void st_le32(volatile uint32_t *addr, uint32_t value)
-{
- *(addr)=value ;
-}
-
-static inline uint32_t ld_le32(volatile uint32_t *addr)
-{
- return(*addr);
-}
-
#endif
#if (MCLBYTES < RBUF_SIZE)
diff --git a/c/src/libchip/network/elnk.c b/c/src/libchip/network/elnk.c
index 4f3066924f..b77dcd1bf7 100644
--- a/c/src/libchip/network/elnk.c
+++ b/c/src/libchip/network/elnk.c
@@ -90,6 +90,10 @@
#include <libcpu/io.h>
#endif
+#if defined(__i386__)
+#include <libcpu/byteorder.h>
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
@@ -197,16 +201,6 @@ extern void Wait_X_ms( unsigned int timeToWait );
#define bus_to_phys(address) ((unsigned int) ((address)))
#define rtems_bsp_delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 )
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
-
-static inline void st_le32(volatile uint32_t *addr, uint32_t value)
-{
- *(addr)=value ;
-}
-
-static inline uint32_t ld_le32(volatile uint32_t *addr)
-{
- return(*addr);
-}
#endif
/* the actual duration waited in DELAY is not especially predictable,