diff options
author | cvs2git <rtems-devel@rtems.org> | 2010-03-07 17:11:24 +0000 |
---|---|---|
committer | cvs2git <rtems-devel@rtems.org> | 2010-03-07 17:11:24 +0000 |
commit | a9f34b79757de68cdd3f951077be0dd65da6354c (patch) | |
tree | f60c55f42307a08ebee35449d53e450e7f4a3321 /bsd_eth_drivers/libbsdport/libbsdport.h | |
parent | - importing updated version from SLAC as of 20090422 (diff) | |
download | libbsdport-R_20100307_p0.tar.bz2 |
This commit was manufactured by cvs2svn to create tag 'R_20100307_p0'.R_20100307_p0
Sprout from base 2009-04-22 22:06:58 UTC Till Straumann <strauman@slac.stanford.edu> ' - importing updated version from SLAC as of 20090422'
Cherrypick from master 2010-03-07 17:11:23 UTC Till Straumann <strauman@slac.stanford.edu> '2010-03-07 Till Straumann <Till.Straumann@TU-Berlin.de>':
bsd_eth_drivers/.cvsignore
bsd_eth_drivers/ChangeLog
bsd_eth_drivers/Makefile.am
bsd_eth_drivers/if_bge/.cvsignore
bsd_eth_drivers/if_bge/Makefile.am
bsd_eth_drivers/if_bge/if_bge.c
bsd_eth_drivers/if_bge/if_bgereg.h
bsd_eth_drivers/if_em/.cvsignore
bsd_eth_drivers/if_em/Makefile.am
bsd_eth_drivers/if_em/e1000_manage.c
bsd_eth_drivers/if_em/e1000_manage.h
bsd_eth_drivers/if_em/e1000_osdep.h
bsd_eth_drivers/if_em/if_em.c
bsd_eth_drivers/if_fxp/.cvsignore
bsd_eth_drivers/if_fxp/Makefile.am
bsd_eth_drivers/if_fxp/if_fxp.c
bsd_eth_drivers/if_fxp/if_fxpvar.h
bsd_eth_drivers/if_le/.cvsignore
bsd_eth_drivers/if_pcn/.cvsignore
bsd_eth_drivers/if_pcn/if_pcn.c
bsd_eth_drivers/if_re/.cvsignore
bsd_eth_drivers/if_re/Makefile.am
bsd_eth_drivers/if_re/if_re.c
bsd_eth_drivers/if_re/if_rl.c
bsd_eth_drivers/if_re/if_rlreg.h
bsd_eth_drivers/libbsdport/.cvsignore
bsd_eth_drivers/libbsdport/Makefile.am
bsd_eth_drivers/libbsdport/alldrv.c
bsd_eth_drivers/libbsdport/bus.h
bsd_eth_drivers/libbsdport/callout.h
bsd_eth_drivers/libbsdport/devicet.c
bsd_eth_drivers/libbsdport/ifmedia.c
bsd_eth_drivers/libbsdport/libbsdport.h
bsd_eth_drivers/libbsdport/libbsdport_api.h
bsd_eth_drivers/libbsdport/libbsdport_post.h
bsd_eth_drivers/libbsdport/miistuff.c
bsd_eth_drivers/libbsdport/misc.c
bsd_eth_drivers/libbsdport/mutex.h
bsd_eth_drivers/libbsdport/rtems_callout.c
bsd_eth_drivers/libbsdport/sysbus.c
bsd_eth_drivers/libbsdport/taskqueue.h
bsd_eth_drivers/links.am
Cherrypick from freebsd_orig 2009-04-23 04:52:05 UTC Till Straumann <strauman@slac.stanford.edu> ' - importing original 'releng_7_1' version of FXP driver from FreeBSD.':
bsd_eth_drivers/if_fxp/if_fxpreg.h
bsd_eth_drivers/if_fxp/rcvbundl.h
Delete:
INSTALL
Makefile.am
bootstrap
config.h.in
configure.ac
m4/acinclude.m4
m4/config-if-present.m4
m4/cvstag.m4
m4/multilib-fix.m4
m4/multilib-installdir.m4
m4/rtems-bsp-postlink.m4
m4/rtems-bsplist.m4
m4/rtems-check-libargs.m4
m4/rtems-checkprog.m4
m4/rtems-checktool.m4
m4/rtems-checktop.m4
m4/rtems-fixup-prefix.m4
m4/rtems-isml.m4
m4/rtems-ismultibsp.m4
m4/rtems-isrtems.m4
m4/rtems-makevars.m4
m4/rtems-multilib.m4
m4/rtems-options.m4
m4/rtems-setup-recurse.m4
m4/rtems-tools.m4
m4/rtems-trim-builddir.m4
m4/rtems-verscheck.m4
makefile.top.am
makefile.top.in
rtems-pre.am
rtems.am
ssrlApps.components.in
Diffstat (limited to '')
-rw-r--r-- | bsd_eth_drivers/libbsdport/libbsdport.h | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/bsd_eth_drivers/libbsdport/libbsdport.h b/bsd_eth_drivers/libbsdport/libbsdport.h index 0fdd4a4..24d8da7 100644 --- a/bsd_eth_drivers/libbsdport/libbsdport.h +++ b/bsd_eth_drivers/libbsdport/libbsdport.h @@ -2,12 +2,19 @@ #define RTEMS_COMPAT_DEFS_H #include <rtems.h> -#include <sys/param.h> +#ifndef _KERNEL #define _KERNEL +#endif +#ifndef __INSIDE_RTEMS_BSD_TCPIP_STACK__ +#define __INSIDE_RTEMS_BSD_TCPIP_STACK__ +#endif + #include <rtems/rtems_bsdnet.h> #include <rtems/rtems_bsdnet_internal.h> +#include <sys/param.h> + #include <inttypes.h> #include <string.h> @@ -31,6 +38,10 @@ #include <rtems_udelay.h> +#ifndef bswap32 +#define bswap32(_x) CPU_swap_u32(_x) +#endif + #if defined(__LITTLE_ENDIAN__) || defined(__i386__) static inline uint16_t htole16(uint16_t v) { return v; } static inline uint32_t htole32(uint32_t v) { return v; } @@ -128,6 +139,17 @@ static inline void membarrier_w() { asm volatile("eieio":::"memory"); } #error "Unknown CPU endianness" #endif +static __inline void +le32enc(void *pp, uint32_t u) +{ + unsigned char *p = (unsigned char *)pp; + + p[0] = u & 0xff; + p[1] = (u >> 8) & 0xff; + p[2] = (u >> 16) & 0xff; + p[3] = (u >> 24) & 0xff; +} + #include <mutex.h> #include <callout.h> @@ -175,6 +197,10 @@ static inline void membarrier_w() { asm volatile("eieio":::"memory"); } #define PCIR_POWER_STATUS 0x4 #endif +#ifndef PCIR_CACHELNSZ +#define PCIR_CACHELNSZ PCI_CACHE_LINE_SIZE +#endif + #ifndef PCIM_PSTAT_PME #define PCIM_PSTAT_PME 0x8000 #endif @@ -183,10 +209,17 @@ static inline void membarrier_w() { asm volatile("eieio":::"memory"); } #define PCIM_PSTAT_PMEENABLE 0x0100 #endif +#ifndef PCIM_CMD_MWRICEN +#define PCIM_CMD_MWRICEN PCI_COMMAND_INVALIDATE +#endif + #ifndef PCIY_PMG #define PCIY_PMG 0x01 #endif +#ifndef PCI_RF_DENSE +#define PCI_RF_DENSE 0 +#endif static inline uint32_t pci_read_config(device_t dev, unsigned reg, int width) @@ -259,6 +292,12 @@ pci_get_subdevice(device_t dev) return pci_read_config(dev, PCIR_SUBDEV_0, 2); } +static inline uint8_t +pci_get_revid(device_t dev) +{ + return pci_read_config(dev, PCIR_REVID, 1); +} + static inline void pci_enable_busmaster(device_t dev) { @@ -325,6 +364,9 @@ pci_release_msi(device_t dev) { } #define if_link_state_change(ifp, state) do {} while (0) +#define if_maddr_rlock(ifp) do {} while (0) +#define if_maddr_runlock(ifp) do {} while (0) + /* if_name should probably be const char * but isn't */ #define if_initname(ifp, name, unit) \ do { (ifp)->if_name = (char*)(name); (ifp)->if_unit = (unit); } while (0) @@ -362,12 +404,14 @@ contigfree(void *ptr, size_t size, int type); #define __FBSDID(x) #define MODULE_DEPEND(x1,x2,x3,x4,x5) -#define mii_mediachg(mii) do {} while (0) - void * real_libc_malloc(size_t); void real_libc_free(void*); +extern int libbsdport_bootverbose; +/* Try not to pollute global namespace */ +#define bootverbose libbsdport_bootverbose + #endif |