Changeset a8bf95d in libbsdport


Ignore:
Timestamp:
Apr 22, 2009, 10:06:58 PM (10 years ago)
Author:
Till Straumann <strauman@…>
Branches:
B_20100615, base, libbsdport-4-10-branch, master
Children:
0d88da2, 903690b, 914cc24, 930df35, a97f934, a9f34b7, c7b02a7, cfbd5a0, d5e3331, e60e738
Parents:
a90d1ed
Message:
  • importing updated version from SLAC as of 20090422
Files:
26 added
11 edited

Legend:

Unmodified
Added
Removed
  • bsd_eth_drivers/Makefile.am

    ra90d1ed ra8bf95d  
    11AUTOMAKE_OPTIONS=foreign
    22
    3 SUBDIRS=libbsdport if_pcn if_le if_em re
     3SUBDIRS=libbsdport if_pcn if_le if_em
  • bsd_eth_drivers/libbsdport/Makefile.am

    ra90d1ed ra8bf95d  
    3939DUMMYHEADERS+=dummyheaders/miibus_if.h
    4040
    41 DUMMYHEADERS+=dummyheaders/miidevs.h
    42 DUMMYHEADERS+=dummyheaders/dev/mii/brgphyreg.h
    43 
    4441BUILT_SOURCES=
    4542
  • bsd_eth_drivers/libbsdport/alldrv.c

    ra90d1ed ra8bf95d  
    66        &libbsdport_pcn_driver,
    77        &libbsdport_le_pci_driver,
    8         &libbsdport_re_driver,
    98        0
    109};
  • bsd_eth_drivers/libbsdport/bus.h

    ra90d1ed ra8bf95d  
    157157#define INTR_MPSAFE         0
    158158#define INTR_TYPE_NET   0
    159 /* INTR_FAST indicates that a 'handler' is actually
    160  * a 'fast' handler which already uses taskqueues
    161  */
    162 #define INTR_FAST       1
    163159
    164160int
     
    195191/* ignored anyways */
    196192#define BUS_DMA_COHERENT 0
    197 #endif
    198 
    199 #ifndef BUS_DMA_ZERO   
    200 /* ignored anyways */
    201 #define BUS_DMA_ZERO 0
    202 #endif
    203 
    204 #ifndef BUS_DMA_ALLOCNOW       
    205 /* ignored anyways */
    206 #define BUS_DMA_ALLOCNOW 0
    207193#endif
    208194
     
    280266}
    281267
    282 typedef void bus_dmamap_callback_t (void *arg, bus_dma_segment_t *segs, int nseg, int error);
     268typedef void bus_dmamap_callback_t (void *, bus_dma_segment_t *, int, int);
    283269
    284270static inline int
    285 bus_dmamap_load(bus_dma_tag_t tag, bus_dmamap_t map, caddr_t vaddr, bus_size_t size, bus_dmamap_callback_t cb, void *arg, unsigned flags)
     271bus_dmamap_load(bus_dma_tag_t tag, bus_dmamap_t map, caddr_t vaddr, bus_size_t size, void (*cb)(void *arg, bus_dma_segment_t *segs, int nseg, int error), void *arg, unsigned flags)
    286272{
    287273bus_dma_segment_t segs[1];
     
    292278}
    293279
    294 typedef void bus_dmamap_callback2_t (void *arg, bus_dma_segment_t *segs, int nsegs, bus_size_t mapsize, int error);
    295 
    296 static inline int
    297 bus_dmamap_load_mbuf(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf *m_head, bus_dmamap_callback2_t cb, void *arg, unsigned flags)
    298 {
    299 /* hopefully there's enough stack ... */
    300 bus_dma_segment_t segs[tag->maxsegs];
    301 struct mbuf *m;
    302 int          n;
    303 bus_size_t   sz;
    304         for ( m=m_head, sz=0, n=0; m; m=m->m_next, n++ ) {
    305                 if ( n >= tag->maxsegs ) {
    306                         cb(arg, segs, n, sz, EFBIG);
    307                         return EFBIG;
    308                 }
    309                 segs[n].ds_addr = CPU2BUSADDR(mtod(m, unsigned));
    310                 sz += (segs[n].ds_len  = m->m_len);
    311         }
    312         cb(arg, segs, n, sz, 0);
    313         return 0;
    314 }
    315 
    316280#define bus_dmamap_unload(tag, map) do {} while (0)
    317281
  • bsd_eth_drivers/libbsdport/devicet.c

    ra90d1ed ra8bf95d  
    1313#include "libbsdport_api.h"
    1414
    15 #define  DEBUG
     15#undef  DEBUG
    1616
    1717extern void real_libc_free(void*);
  • bsd_eth_drivers/libbsdport/libbsdport.h

    ra90d1ed ra8bf95d  
    3131
    3232#include <rtems_udelay.h>
    33 
    34 #ifndef bswap32
    35 #define bswap32(_x) CPU_swap_u32(_x)
    36 #endif
    3733
    3834#if defined(__LITTLE_ENDIAN__) || defined(__i386__)
     
    192188#endif
    193189
    194 #ifndef PCI_RF_DENSE
    195 #define PCI_RF_DENSE         0
    196 #endif
    197190
    198191static inline uint32_t
  • bsd_eth_drivers/libbsdport/libbsdport_api.h

    ra90d1ed ra8bf95d  
    2525/* AMD 79C971..976 pcnet PCI */
    2626extern driver_t libbsdport_pcn_driver;
    27 /* RealTek RTL8139, 8168, 8169, 8169S, 8110, 8101E, and 8111 PCI */
    28 extern driver_t libbsdport_re_driver;
    2927/* AMD/Lance older (and later) chips; this driver also supports what 'pcn'
    3028 * does but might not be as efficient.
  • bsd_eth_drivers/libbsdport/sysbus.c

    ra90d1ed ra8bf95d  
    144144struct irq_cookie *info = 0;
    145145
     146
     147
    146148        if ( filter && handler ) {
    147149                rtems_panic("bus_setup_intr for both: filter & handler not implemented\n");
    148         }
    149 
    150         if ( (flags & INTR_FAST) && filter ) {
    151                 rtems_panic("bus_setup_intr for both: filter & INTR_FAST not implemented\n");
    152                 /* handler is a fast handler already */
    153                 filter  = (driver_filter_t) handler;
    154                 handler = 0;
    155150        }
    156151
     
    193188        }
    194189
    195         if ( cookiep )
    196                 *cookiep = info;
     190        *cookiep = info;
    197191        return rval;
    198192}
  • bsd_eth_drivers/libbsdport/taskqueue.h

    ra90d1ed ra8bf95d  
    3131int
    3232taskqueue_enqueue(struct taskqueue *tq, struct task *ta);
    33 
    34 #define taskqueue_enqueue_fast(_q,_t) taskqueue_enqueue(_q,_t)
    3533
    3634void
  • configure.ac

    ra90d1ed ra8bf95d  
    1 AC_PREREQ(2.63)
     1AC_PREREQ(2.62)
    22
    33m4_include(./m4/cvstag.m4)
     
    297297        AC_CONFIG_FILES([bsd_eth_drivers/Makefile])
    298298        AC_CONFIG_FILES([bsd_eth_drivers/libbsdport/Makefile])
    299         AC_CONFIG_FILES([bsd_eth_drivers/bge/Makefile])
    300299        AC_CONFIG_FILES([bsd_eth_drivers/if_pcn/Makefile])
    301300        AC_CONFIG_FILES([bsd_eth_drivers/if_le/Makefile])
    302301        AC_CONFIG_FILES([bsd_eth_drivers/if_em/Makefile])
    303         AC_CONFIG_FILES([bsd_eth_drivers/re/Makefile])
    304302        all_subdirs="${all_subdirs} bsd_eth_drivers"
    305303        if test "$ac_cv_func_pci_find_device" = "yes" ; then
    306 ##              if test "${host_cpu}" = i386 && test ! "${have_bspext}" = yes ; then
    307 ##                      AC_MSG_NOTICE([Not building bsd_eth_drivers; on i386 you need libbspExt])
    308 ##              else
     304                if test "${host_cpu}" = i386 && test ! "${have_bspext}" = yes ; then
     305                        AC_MSG_NOTICE([Not building bsd_eth_drivers; on i386 you need libbspExt])
     306                else
    309307                        #FIXME: make these configurable options
    310308                        ENBL_82542_SUPPORT=NO
     
    313311                        AC_SUBST([ENBL_ICH8LAN_SUPPORT])
    314312                        enable_subdirs="${enable_subdirs} bsd_eth_drivers"
    315 ##              fi
     313                fi
    316314        fi
    317315fi]dnl
  • rtems-pre.am

    ra90d1ed ra8bf95d  
    1 AM_CPPFLAGS     = -Wall -D__BSD_VISIBLE
     1AM_CPPFLAGS     = -Wall
    22AM_CFLAGS       = -Wall
    33AM_CXXFLAGS     = -Wall
Note: See TracChangeset for help on using the changeset viewer.