The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/ic/iavcvar.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: iavcvar.h,v 1.4 2007/03/04 06:01:56 christos Exp $     */
    2 
    3 /*
    4  * Copyright (c) 2001-2003 Cubical Solutions Ltd. All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   25  * SUCH DAMAGE.
   26  *
   27  * capi/iavc/iavc.h     The AVM ISDN controllers' common declarations.
   28  *
   29  * $FreeBSD: src/sys/i4b/capi/iavc/iavc.h,v 1.1.2.1 2001/08/10 14:08:34 obrien Exp $
   30  */
   31 
   32 #include <netisdn/i4b_capi.h>
   33 
   34 /*
   35 //  iavc_softc_t
   36 //      The software context of one AVM T1 controller.
   37 */
   38 
   39 #define IAVC_IO_BASES 1
   40 #define IAVC_DMA_SIZE (128 + 2048)
   41 
   42 typedef struct iavc_softc {
   43     struct device       sc_dev;
   44     capi_softc_t        sc_capi;
   45 
   46     bus_space_handle_t  sc_mem_bh;
   47     bus_space_tag_t     sc_mem_bt;
   48 
   49     bus_space_handle_t  sc_io_bh;
   50     bus_space_tag_t     sc_io_bt;
   51 
   52     bus_dma_tag_t       dmat;
   53 
   54     bus_dmamap_t        tx_map;
   55     bus_dmamap_t        rx_map;
   56 
   57     bus_dma_segment_t   txseg;
   58     bus_dma_segment_t   rxseg;
   59     int                 ntxsegs, nrxsegs;
   60 
   61     uint32_t            sc_unit;
   62     uint32_t            sc_intr;
   63 
   64     int32_t             sc_state;
   65 #define IAVC_DOWN       0
   66 #define IAVC_POLL       1
   67 #define IAVC_INIT       2
   68 #define IAVC_UP         3
   69     uint32_t            sc_blocked;
   70     uint32_t            sc_dma;
   71     uint32_t            sc_t1;
   72 
   73     u_int32_t           sc_csr;
   74 
   75     void *              sc_sendbuf;
   76     void *              sc_recvbuf;
   77 
   78     u_int32_t           sc_recv1;
   79 
   80     struct ifqueue      sc_txq;
   81 } iavc_softc_t;
   82 
   83 /*
   84 //  {b1,b1dma,t1}_{detect,reset}
   85 //      Routines to detect and manage the specific type of card.
   86 */
   87 
   88 int      iavc_b1_detect(iavc_softc_t *sc);
   89 void     iavc_b1_disable_irq(iavc_softc_t *sc);
   90 void     iavc_b1_reset(iavc_softc_t *sc);
   91 
   92 int      iavc_b1dma_detect(iavc_softc_t *sc);
   93 void     iavc_b1dma_reset(iavc_softc_t *sc);
   94 
   95 int      iavc_t1_detect(iavc_softc_t *sc);
   96 void     iavc_t1_disable_irq(iavc_softc_t *sc);
   97 void     iavc_t1_reset(iavc_softc_t *sc);
   98 
   99 
  100 /*
  101 //  iavc_handle_intr
  102 //      Interrupt handler, called by the bus specific interrupt routine
  103 //      in iavc_<bustype>.c module.
  104 //
  105 //  iavc_load
  106 //      CAPI callback. Resets device and loads firmware.
  107 //
  108 //  iavc_register
  109 //      CAPI callback. Registers an application id.
  110 //
  111 //  iavc_release
  112 //      CAPI callback. Releases an application id.
  113 //
  114 //  iavc_send
  115 //      CAPI callback. Sends a CAPI message. A B3_DATA_REQ message has
  116 //      m_next point to a data mbuf.
  117 */
  118 
  119 int iavc_handle_intr(iavc_softc_t *);
  120 int iavc_load(capi_softc_t *, int, u_int8_t *);
  121 int iavc_register(capi_softc_t *, int, int);
  122 int iavc_release(capi_softc_t *, int);
  123 int iavc_send(capi_softc_t *, struct mbuf *);
  124 
  125 #ifdef notyet
  126 extern void b1isa_setup_irq(struct iavc_softc *sc);
  127 #endif

Cache object: 897e81e6d6d340740bef1799753d5720


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.