diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2009-04-22 22:06:58 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2009-04-22 22:06:58 +0000 |
commit | c7b02a7980ed41a969c76ce377dd87e77c3cf49f (patch) | |
tree | 2ddade9b81c5a82bef5968fad99480acd423f70b /bsd_eth_drivers/libbsdport | |
parent | 2fa8677baaaa7234e71db15b8f05fbc3b29a8ca5 (diff) | |
parent | a8bf95d0249565f4210ccab5c13232d501ce0c2d (diff) |
This commit was generated by cvs2svn to compensate for changes in r20, which
included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'bsd_eth_drivers/libbsdport')
-rw-r--r-- | bsd_eth_drivers/libbsdport/Makefile | 116 | ||||
-rw-r--r-- | bsd_eth_drivers/libbsdport/Makefile.am | 3 | ||||
-rw-r--r-- | bsd_eth_drivers/libbsdport/devicet.c | 2 | ||||
-rw-r--r-- | bsd_eth_drivers/libbsdport/libbsdport.h | 7 | ||||
-rw-r--r-- | bsd_eth_drivers/libbsdport/modini.c | 100 | ||||
-rw-r--r-- | bsd_eth_drivers/libbsdport/taskqueue.h | 2 |
6 files changed, 217 insertions, 13 deletions
diff --git a/bsd_eth_drivers/libbsdport/Makefile b/bsd_eth_drivers/libbsdport/Makefile new file mode 100644 index 0000000..fbf9f35 --- /dev/null +++ b/bsd_eth_drivers/libbsdport/Makefile @@ -0,0 +1,116 @@ +# +# Makefile.lib,v 1.5 2000/06/12 15:00:14 joel Exp +# +# Templates/Makefile.lib +# Template library Makefile +# + +LIBNAME=libbsdport.a +LIB=${ARCH}/${LIBNAME} + +# C and C++ source names, if any, go here -- minus the .c or .cc +C_PIECES=rtems_callout rtems_taskqueue rtems_udelay ifstuff devicet alldrv +C_PIECES+=contigmalloc sysbus malloc ifmedia +C_FILES=$(C_PIECES:%=%.c) +C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) + +CC_PIECES= +CC_FILES=$(CC_PIECES:%=%.cc) +CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o) + +H_FILES=libbsdport_api.h rtems_verscheck.h + +LINKS+=sys/taskqueue.h +LINKS+=sys/bus.h +LINKS+=sys/mutex.h +LINKS+=bsp/rtems_verscheck.h + +DUMMYHEADERS+=dummyheaders/machine/bus.h +DUMMYHEADERS+=dummyheaders/machine/resource.h +DUMMYHEADERS+=dummyheaders/dev/pci/pcivar.h +DUMMYHEADERS+=dummyheaders/dev/pci/pcireg.h +DUMMYHEADERS+=dummyheaders/dev/mii/miivar.h +DUMMYHEADERS+=dummyheaders/sys/module.h +DUMMYHEADERS+=dummyheaders/sys/rman.h +DUMMYHEADERS+=dummyheaders/sys/kthread.h +DUMMYHEADERS+=dummyheaders/sys/endian.h +DUMMYHEADERS+=dummyheaders/net/if_vlan_var.h +DUMMYHEADERS+=dummyheaders/netinet/ip6.h +DUMMYHEADERS+=dummyheaders/vm/pmap.h +DUMMYHEADERS+=dummyheaders/miibus_if.h + +# Assembly source names, if any, go here -- minus the .S +S_PIECES= +S_FILES=$(S_PIECES:%=%.S) +S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o) + +SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) +OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) + +all: + +depend: ${LINKS} + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc + +include $(RTEMS_CUSTOM) +include $(RTEMS_ROOT)/make/lib.cfg + +# +# Add local stuff here using += +# + +DEFINES += +CPPFLAGS += -I. +CFLAGS += + +# +# Add your list of files to delete here. The config files +# already know how to delete some stuff, so you may want +# to just run 'make clean' first to see what gets missed. +# 'make clobber' already includes 'make clean' +# + +CLEAN_ADDITIONS += +CLOBBER_ADDITIONS += dummyheaders +CLOBBER_ADDITIONS += $(sort $(foreach n,$(LINKS),$(firstword $(subst /, ,$(n))))) + +all: ${DUMMYHEADERS} ${LINKS} ${ARCH} $(SRCS) $(LIB) + +$(LIB): ${OBJS} + $(make-library) + +dummyheaders/%: + @if [ ! -d `dirname $@` ] ; then mkdir -p `dirname $@`; fi + @touch $@ + +# for each name listed in LINKS, create parent directories (if needed) +# and a symlink to file in . +# E.g., LINKS=a/b/c.h +# creates a/b/c.h -> ../../c.h +$(LINKS): + @if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@); fi + @ln -s `echo $@ | sed -e 's%[^/]\+[/]\+%../%g'` $@ + +ifndef RTEMS_SITE_INSTALLDIR +RTEMS_SITE_INSTALLDIR = $(PROJECT_RELEASE) +endif + +ifndef RTEMS_SITE_BSP_INSTALLDIR +RTEMS_SITE_BSP_INSTALLDIR = $(RTEMS_SITE_INSTALLDIR) +endif + +${RTEMS_SITE_INSTALLDIR}/include/bsp \ +${RTEMS_SITE_INSTALLDIR}/lib \ +${RTEMS_SITE_INSTALLDIR}/bin: + test -d $@ || mkdir -p $@ + +# Install the program(s), appending _g or _p as appropriate. +# for include files, just use $(INSTALL_CHANGE) +# + +install: all $(RTEMS_SITE_INSTALLDIR)/lib $(RTEMS_SITE_INSTALLDIR)/include/bsp + $(INSTALL_VARIANT) -m 644 ${LIB} ${RTEMS_SITE_INSTALLDIR}/lib + $(INSTALL_CHANGE) -m 644 ${H_FILES} ${RTEMS_SITE_INSTALLDIR}/include/bsp + + diff --git a/bsd_eth_drivers/libbsdport/Makefile.am b/bsd_eth_drivers/libbsdport/Makefile.am index 44096b5..e6e31cd 100644 --- a/bsd_eth_drivers/libbsdport/Makefile.am +++ b/bsd_eth_drivers/libbsdport/Makefile.am @@ -38,9 +38,6 @@ DUMMYHEADERS+=dummyheaders/netinet/ip6.h DUMMYHEADERS+=dummyheaders/vm/pmap.h DUMMYHEADERS+=dummyheaders/miibus_if.h -DUMMYHEADERS+=dummyheaders/miidevs.h -DUMMYHEADERS+=dummyheaders/dev/mii/brgphyreg.h - BUILT_SOURCES= include ../links.am diff --git a/bsd_eth_drivers/libbsdport/devicet.c b/bsd_eth_drivers/libbsdport/devicet.c index 48ddd9a..f197da4 100644 --- a/bsd_eth_drivers/libbsdport/devicet.c +++ b/bsd_eth_drivers/libbsdport/devicet.c @@ -12,7 +12,7 @@ #include <sys/bus.h> #include "libbsdport_api.h" -#define DEBUG +#undef DEBUG extern void real_libc_free(void*); diff --git a/bsd_eth_drivers/libbsdport/libbsdport.h b/bsd_eth_drivers/libbsdport/libbsdport.h index 8b88784..0fdd4a4 100644 --- a/bsd_eth_drivers/libbsdport/libbsdport.h +++ b/bsd_eth_drivers/libbsdport/libbsdport.h @@ -31,10 +31,6 @@ #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; } @@ -191,9 +187,6 @@ static inline void membarrier_w() { asm volatile("eieio":::"memory"); } #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) diff --git a/bsd_eth_drivers/libbsdport/modini.c b/bsd_eth_drivers/libbsdport/modini.c new file mode 100644 index 0000000..3156c16 --- /dev/null +++ b/bsd_eth_drivers/libbsdport/modini.c @@ -0,0 +1,100 @@ +#include "devicet.h" +#include <rtems/rtems_bsdnet.h> + +struct { + struct device dev; + struct { + char space[4096]; + } softc; +} thele = { + { + bushdr: { +/* mvme5500 { x, x, x } */ +/* qemu */ { 0, 3, 0 } + }, + type: DEV_TYPE_PCI, + name: "le", + nameunit: { 'l', 'e', '1', 0}, + unit: 1, + }, + { + { 0, } + } +}; + +void *thelesoftc = &thele.softc; + + +struct { + struct device dev; + struct { + char space[4096]; + } softc; +} theem = { + { + bushdr: { +/* mvme5500 { 2, 0xa, 0 } */ +/* cpci */ { 7, 0, 0 } + }, + type: DEV_TYPE_PCI, + name: "em", + nameunit: { 'e', 'm', '1', 0}, + unit: 1, + }, + { + { 0, } + } +}; + +void *theemsoftc = &theem.softc; + +struct { + struct device dev; + struct { + char space[4096]; + } softc; +} thepcn = { + { + bushdr: { +/* mvme5500 { x, 0xx, x } */ +/* cpci */ { 4, 6, 0 } + }, + type: DEV_TYPE_PCI, + name: "pcn", + nameunit: { 'p', 'c', 'n', '1', 0}, + unit: 1, + }, + { + { 0, } + } +}; + +void *thepcnsoftc = &thepcn.softc; + +extern driver_t rtems_em_driver; +extern driver_t rtems_le_pci_driver; +extern driver_t rtems_pcn_driver; + +driver_t *rtems_netdriver_table[] = { + &rtems_em_driver, + &rtems_le_pci_driver, + &rtems_pcn_driver, + 0 +}; + +struct rtems_bsdnet_ifconfig pcncfg = { + name: "pcn", + rbuf_count:20, + xbuf_count:3, +}; + +#ifdef DEBUG_MODULAR +void +_cexpModuleInitialize(void *unused) +{ +extern void * rtems_callout_initialize(); +extern void * rtems_taskqueue_initialize(); + rtems_callout_initialize(); + rtems_taskqueue_initialize(); +} +#endif diff --git a/bsd_eth_drivers/libbsdport/taskqueue.h b/bsd_eth_drivers/libbsdport/taskqueue.h index d700edf..a341ec1 100644 --- a/bsd_eth_drivers/libbsdport/taskqueue.h +++ b/bsd_eth_drivers/libbsdport/taskqueue.h @@ -31,8 +31,6 @@ taskqueue_create_fast(const char *name, int mflags, tq_enq_fn, void *ctxt); int taskqueue_enqueue(struct taskqueue *tq, struct task *ta); -#define taskqueue_enqueue_fast(_q,_t) taskqueue_enqueue(_q,_t) - void taskqueue_thread_enqueue(void *ctxt); |