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/isa/isic_isa_tel_s0163.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  *   Copyright (c) 1996 Arne Helme. All rights reserved.
    3  *
    4  *   Copyright (c) 1996 Gary Jennejohn. All rights reserved. 
    5  *
    6  *   Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
    7  *
    8  *   Redistribution and use in source and binary forms, with or without
    9  *   modification, are permitted provided that the following conditions
   10  *   are met:
   11  *
   12  *   1. Redistributions of source code must retain the above copyright
   13  *      notice, this list of conditions and the following disclaimer.
   14  *   2. Redistributions in binary form must reproduce the above copyright
   15  *      notice, this list of conditions and the following disclaimer in the
   16  *      documentation and/or other materials provided with the distribution.
   17  *   3. Neither the name of the author nor the names of any co-contributors
   18  *      may be used to endorse or promote products derived from this software
   19  *      without specific prior written permission.
   20  *   4. Altered versions must be plainly marked as such, and must not be
   21  *      misrepresented as being the original software and/or documentation.
   22  *   
   23  *   THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   24  *   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   25  *   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   26  *   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   27  *   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   28  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   29  *   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   30  *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   31  *   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   32  *   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   33  *   SUCH DAMAGE.
   34  *
   35  *---------------------------------------------------------------------------
   36  *
   37  *      isic - I4B Siemens ISDN Chipset Driver for Teles S0/16.3
   38  *      ========================================================
   39  *
   40  *      $Id: isic_isa_tel_s0163.c,v 1.4 2002/03/24 20:35:49 martin Exp $ 
   41  *
   42  *      last edit-date: [Fri Jan  5 11:37:22 2001]
   43  *
   44  *      -hm     clean up
   45  *      -hm     more cleanup
   46  *      -hm     NetBSD patches from Martin
   47  *      -hm     VSTR detection for older 16.3 cards
   48  *
   49  *---------------------------------------------------------------------------*/
   50 
   51 #include <sys/cdefs.h>
   52 __KERNEL_RCSID(0, "$NetBSD: isic_isa_tel_s0163.c,v 1.4 2002/03/24 20:35:49 martin Exp $");
   53 
   54 #include "opt_isicisa.h"
   55 #ifdef ISICISA_TEL_S0_16_3
   56 
   57 #include <sys/param.h>
   58 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
   59 #include <sys/ioccom.h>
   60 #else
   61 #include <sys/ioctl.h>
   62 #endif
   63 #include <sys/kernel.h>
   64 #include <sys/systm.h>
   65 #include <sys/mbuf.h>
   66 
   67 #if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000
   68 #include <sys/callout.h>
   69 #endif
   70 
   71 #ifdef __FreeBSD__
   72 #include <machine/clock.h>
   73 #include <i386/isa/isa_device.h>
   74 #elif defined(__bsdi__)
   75         /* XXX */
   76 #else
   77 #include <machine/bus.h>
   78 #include <sys/device.h>
   79 #endif
   80 
   81 #include <sys/socket.h>
   82 #include <net/if.h>
   83 
   84 #ifdef __FreeBSD__
   85 #include <machine/i4b_debug.h>
   86 #include <machine/i4b_ioctl.h>
   87 #else
   88 #include <netisdn/i4b_debug.h>
   89 #include <netisdn/i4b_ioctl.h>
   90 #endif
   91 
   92 #include <netisdn/i4b_global.h>
   93 #include <netisdn/i4b_debug.h>
   94 #include <netisdn/i4b_l2.h>
   95 #include <netisdn/i4b_l1l2.h>
   96 #include <netisdn/i4b_mbuf.h>
   97 
   98 #include <dev/ic/isic_l1.h>
   99 #include <dev/ic/isac.h>
  100 #include <dev/ic/hscx.h>
  101 
  102 static u_char intr_no[] = { 1, 1, 0, 2, 4, 6, 1, 1, 1, 0, 8, 10, 12, 1, 1, 14 };
  103 
  104 #if !defined(__FreeBSD__) && !defined(__bsdi__)
  105 static u_int8_t tels0163_read_reg __P((struct isic_softc *sc, int what, bus_size_t offs));
  106 static void tels0163_write_reg __P((struct isic_softc *sc, int what, bus_size_t offs, u_int8_t data));
  107 static void tels0163_read_fifo __P((struct isic_softc *sc, int what, void *buf, size_t size));
  108 static void tels0163_write_fifo __P((struct isic_softc *sc, int what, const void *data, size_t size));
  109 #endif
  110 
  111 /*---------------------------------------------------------------------------*
  112  *      Teles S0/16.3 read fifo routine
  113  *---------------------------------------------------------------------------*/
  114 #if defined(__FreeBSD__) || defined(__bsdi__)
  115 
  116 static void             
  117 tels0163_read_fifo(void *buf, const void *base, size_t len)
  118 {
  119         insb((int)base + 0x3e, (u_char *)buf, (u_int)len);
  120 }
  121 
  122 #else
  123 
  124 static void
  125 tels0163_read_fifo(struct isic_softc *sc, int what, void *buf, size_t size)
  126 {
  127         bus_space_tag_t t = sc->sc_maps[what+1].t;
  128         bus_space_handle_t h = sc->sc_maps[what+1].h;
  129         bus_size_t o = sc->sc_maps[what+1].offset;
  130         bus_space_read_multi_1(t, h, o + 0x1e, buf, size);
  131 }
  132 
  133 #endif
  134 
  135 /*---------------------------------------------------------------------------*
  136  *      Teles S0/16.3 write fifo routine
  137  *---------------------------------------------------------------------------*/
  138 #if defined(__FreeBSD__) || defined(__bsdi__)
  139 
  140 static void
  141 tels0163_write_fifo(void *base, const void *buf, size_t len)
  142 {
  143         outsb((int)base + 0x3e, (u_char *)buf, (u_int)len);
  144 }
  145 
  146 #else
  147 
  148 static void
  149 tels0163_write_fifo(struct isic_softc *sc, int what, const void *buf, size_t size)
  150 {
  151         bus_space_tag_t t = sc->sc_maps[what+1].t;
  152         bus_space_handle_t h = sc->sc_maps[what+1].h;
  153         bus_size_t o = sc->sc_maps[what+1].offset;
  154         bus_space_write_multi_1(t, h, o + 0x1e, (u_int8_t*)buf, size);
  155 }
  156 #endif
  157 
  158 /*---------------------------------------------------------------------------*
  159  *      Teles S0/16.3 ISAC put register routine
  160  *---------------------------------------------------------------------------*/
  161 #if defined(__FreeBSD__) || defined(__bsdi__)
  162 
  163 static void
  164 tels0163_write_reg(u_char *base, u_int offset, u_int v)
  165 {
  166         outb((int)base + offset, (u_char)v);
  167 }
  168 
  169 #else
  170 
  171 static void
  172 tels0163_write_reg(struct isic_softc *sc, int what, bus_size_t offs, u_int8_t data)
  173 {
  174         bus_space_tag_t t = sc->sc_maps[what+1].t;
  175         bus_space_handle_t h = sc->sc_maps[what+1].h;
  176         bus_size_t o = sc->sc_maps[what+1].offset;
  177         bus_space_write_1(t, h, o + offs - 0x20, data);
  178 }
  179 #endif
  180 
  181 /*---------------------------------------------------------------------------*
  182  *      Teles S0/16.3 ISAC get register routine
  183  *---------------------------------------------------------------------------*/
  184 #if defined(__FreeBSD__) || defined(__bsdi__)
  185 
  186 static u_char
  187 tels0163_read_reg(u_char *base, u_int offset)
  188 {
  189         return (inb((int)base + offset));
  190 }
  191 
  192 #else
  193 
  194 static u_int8_t
  195 tels0163_read_reg(struct isic_softc *sc, int what, bus_size_t offs)
  196 {
  197         bus_space_tag_t t = sc->sc_maps[what+1].t;
  198         bus_space_handle_t h = sc->sc_maps[what+1].h;
  199         bus_size_t o = sc->sc_maps[what+1].offset;
  200         return bus_space_read_1(t, h, o + offs - 0x20);
  201 }
  202 
  203 #endif
  204 
  205 /*---------------------------------------------------------------------------*
  206  *      isic_probe_s0163 - probe for Teles S0/16.3 and compatibles
  207  *---------------------------------------------------------------------------*/
  208 #ifdef __FreeBSD__
  209 int
  210 isic_probe_s0163(struct isa_device *dev)
  211 {
  212         struct isic_softc *sc = &l1_sc[dev->id_unit];
  213         u_char byte;
  214         
  215         /* check max unit range */
  216         
  217         if(dev->id_unit >= ISIC_MAXUNIT)
  218         {
  219                 printf("isic%d: Error, unit %d >= ISIC_MAXUNIT for Teles S0/16.3!\n",
  220                                 dev->id_unit, dev->id_unit);
  221                 return(0);      
  222         }       
  223         sc->sc_unit = dev->id_unit;
  224 
  225         /* check IRQ validity */
  226 
  227         if((intr_no[ffs(dev->id_irq) - 1]) == 1)
  228         {
  229                 printf("isic%d: Error, invalid IRQ [%d] specified for Teles S0/16.3!\n",
  230                         dev->id_unit, ffs(dev->id_irq)-1);
  231                 return(0);
  232         }
  233         sc->sc_irq = dev->id_irq;
  234 
  235         /* check if memory addr specified */
  236 
  237         if(dev->id_maddr)
  238         {
  239                 printf("isic%d: Error, mem addr 0x%lx specified for Teles S0/16.3!\n",
  240                         dev->id_unit, (u_long)dev->id_maddr);
  241                 return(0);
  242         }
  243                 
  244         dev->id_msize = 0;
  245         
  246         /* check if we got an iobase */
  247 
  248         switch(dev->id_iobase)
  249         {
  250                 case 0xd80:
  251                 case 0xe80:
  252                 case 0xf80:
  253                         break;
  254                         
  255                 default:
  256                         printf("isic%d: Error, invalid iobase 0x%x specified for Teles S0/16.3!\n",
  257                                 dev->id_unit, dev->id_iobase);
  258                         return(0);
  259                         break;
  260         }
  261         sc->sc_port = dev->id_iobase;
  262         
  263         if(((byte = inb(sc->sc_port)) != 0x51) && (byte != 0x10))
  264         {
  265                 printf("isic%d: Error, signature 1 0x%x != 0x51 or 0x10 for Teles S0/16.3!\n",
  266                         dev->id_unit, byte);
  267                 return(0);
  268         }
  269         
  270         if((byte = inb(sc->sc_port + 1)) != 0x93)
  271         {
  272                 printf("isic%d: Error, signature 2 0x%x != 0x93 for Teles S0/16.3!\n",
  273                         dev->id_unit, byte);
  274                 return(0);
  275         }
  276 
  277         if(((byte = inb(sc->sc_port + 2)) != 0x1c) && (byte != 0x1f))   
  278         {
  279                 printf("isic%d: Error, signature 3 0x%x != (0x1c||0x1f) for Teles S0/16.3!\n",
  280                         dev->id_unit, byte);
  281                 return(0);
  282         }
  283 
  284         /* setup access routines */
  285 
  286         sc->clearirq = NULL;
  287         sc->readreg = tels0163_read_reg;
  288         sc->writereg = tels0163_write_reg;
  289 
  290         sc->readfifo = tels0163_read_fifo;
  291         sc->writefifo = tels0163_write_fifo;
  292 
  293         /* setup card type */
  294         
  295         sc->sc_cardtyp= CARD_TYPEP_16_3;
  296 
  297         /* setup IOM bus type */
  298         
  299         sc->sc_bustyp = BUS_TYPE_IOM2;
  300 
  301         sc->sc_ipac = 0;
  302         sc->sc_bfifolen = HSCX_FIFO_LEN;        
  303 
  304         /* setup ISAC and HSCX base addr */
  305         
  306         switch(dev->id_iobase)
  307         {
  308                 case 0xd80:
  309                         ISAC_BASE = (caddr_t) 0x960;
  310                         HSCX_A_BASE = (caddr_t) 0x160;
  311                         HSCX_B_BASE = (caddr_t) 0x560;
  312                         break;
  313                 
  314                 case 0xe80:
  315                         ISAC_BASE = (caddr_t) 0xa60;
  316                         HSCX_A_BASE = (caddr_t) 0x260;
  317                         HSCX_B_BASE = (caddr_t) 0x660;
  318                         break;
  319 
  320                 case 0xf80:
  321                         ISAC_BASE = (caddr_t) 0xb60;
  322                         HSCX_A_BASE = (caddr_t) 0x360;
  323                         HSCX_B_BASE = (caddr_t) 0x760;
  324                         break;
  325         }
  326 
  327         /* 
  328          * Read HSCX A/B VSTR.  Expected value for the S0/16.3 card is
  329          * 0x05 or 0x04 (for older 16.3's) in the least significant bits.
  330          */
  331 
  332         if( (((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) &&
  333              ((HSCX_READ(0, H_VSTR) & 0xf) != 0x4))     ||
  334             (((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) &&
  335              ((HSCX_READ(1, H_VSTR) & 0xf) != 0x4)) )  
  336         {
  337                 printf("isic%d: HSCX VSTR test failed for Teles S0/16.3\n",
  338                         dev->id_unit);
  339                 printf("isic%d: HSC0: VSTR: %#x\n",
  340                         dev->id_unit, HSCX_READ(0, H_VSTR));
  341                 printf("isic%d: HSC1: VSTR: %#x\n",
  342                         dev->id_unit, HSCX_READ(1, H_VSTR));
  343                 return (0);
  344         }                   
  345 
  346         return (1);
  347 }
  348 
  349 #elif defined(__bsdi__)
  350 
  351 static int
  352 set_softc(struct isic_softc *sc, struct isa_attach_args *ia, int unit)
  353 {
  354         sc->sc_irq = ia->ia_irq;
  355 
  356         /* check if we got an iobase */
  357 
  358         switch(ia->ia_iobase)
  359         {
  360                 case 0xd80:
  361                 case 0xe80:
  362                 case 0xf80:
  363                         break;
  364                         
  365                 default:
  366                         printf("isic%d: Error, invalid iobase 0x%x specified for Teles S0/16.3!\n",
  367                                 unit, ia->ia_iobase);
  368                         return(0);
  369                         break;
  370         }
  371         sc->sc_port = ia->ia_iobase;
  372         
  373         /* setup access routines */
  374 
  375         sc->clearirq = NULL;
  376         sc->readreg = tels0163_read_reg;
  377         sc->writereg = tels0163_write_reg;
  378 
  379         sc->readfifo = tels0163_read_fifo;
  380         sc->writefifo = tels0163_write_fifo;
  381 
  382         /* setup card type */
  383         
  384         sc->sc_cardtyp= CARD_TYPEP_16_3;
  385 
  386         /* setup IOM bus type */
  387         
  388         sc->sc_bustyp = BUS_TYPE_IOM2;
  389 
  390         sc->sc_ipac = 0;
  391         sc->sc_bfifolen = HSCX_FIFO_LEN;        
  392 
  393         /* setup ISAC and HSCX base addr */
  394         
  395         switch(ia->ia_iobase)
  396         {
  397                 case 0xd80:
  398                         ISAC_BASE = (caddr_t) 0x960;
  399                         HSCX_A_BASE = (caddr_t) 0x160;
  400                         HSCX_B_BASE = (caddr_t) 0x560;
  401                         break;
  402                 
  403                 case 0xe80:
  404                         ISAC_BASE = (caddr_t) 0xa60;
  405                         HSCX_A_BASE = (caddr_t) 0x260;
  406                         HSCX_B_BASE = (caddr_t) 0x660;
  407                         break;
  408 
  409                 case 0xf80:
  410                         ISAC_BASE = (caddr_t) 0xb60;
  411                         HSCX_A_BASE = (caddr_t) 0x360;
  412                         HSCX_B_BASE = (caddr_t) 0x760;
  413                         break;
  414         }
  415         return 1;
  416 }
  417 
  418 int
  419 isic_probe_s0163(struct device *dev, struct cfdata *cf,
  420                 struct isa_attach_args *ia)
  421 {
  422         u_char byte;
  423         struct isic_softc dummysc, *sc = &dummysc;
  424         
  425         if((intr_no[ffs(ia->ia_irq) - 1]) == 1)
  426         {
  427                 printf("isic%d: Error, invalid IRQ [%d] specified for Teles S0/16.3!\n",
  428                         cf->cf_unit, ffs(ia->ia_irq)-1);
  429                 return(0);
  430         }
  431 
  432         /* check if memory addr specified */
  433 
  434         if(ia->ia_maddr)
  435         {
  436                 printf("isic%d: Error, mem addr 0x%lx specified for Teles S0/16.3!\n",
  437                         cf->cf_unit, (u_long)ia->ia_maddr);
  438                 return 0;
  439         }
  440 
  441         /* Set up a temporary softc for the probe */
  442 
  443         if (set_softc(sc, ia, cf->cf_unit) == 0)
  444                 return 0;
  445         
  446         if((byte = inb(sc->sc_port)) != 0x51)
  447         {
  448                 printf("isic%d: Error, signature 1 0x%x != 0x51 for Teles S0/16.3!\n",
  449                         cf->cf_unit, byte);
  450                 return(0);
  451         }
  452         
  453         if((byte = inb(sc->sc_port + 1)) != 0x93)
  454         {
  455                 printf("isic%d: Error, signature 2 0x%x != 0x93 for Teles S0/16.3!\n",
  456                         cf->cf_unit, byte);
  457                 return(0);
  458         }
  459 
  460         if(((byte = inb(sc->sc_port + 2)) != 0x1c) && (byte != 0x1f))   
  461         {
  462                 printf("isic%d: Error, signature 3 0x%x != (0x1c||0x1f) for Teles S0/16.3!\n",
  463                         cf->cf_unit, byte);
  464                 return(0);
  465         }
  466 
  467         /* 
  468          * Read HSCX A/B VSTR.  Expected value for the S0/16.3 card is
  469          * 0x05 or 0x04 (for older 16.3's) in the least significant bits.
  470          */
  471 
  472         if( (((HSCX_READ(0, H_VSTR) & 0xf) != 0x5) &&
  473              ((HSCX_READ(0, H_VSTR) & 0xf) != 0x4))     ||
  474             (((HSCX_READ(1, H_VSTR) & 0xf) != 0x5) &&
  475              ((HSCX_READ(1, H_VSTR) & 0xf) != 0x4)) )  
  476         {
  477                 printf("isic%d: HSCX VSTR test failed for Teles S0/16.3\n",
  478                         cf->cf_unit);
  479                 printf("isic%d: HSC0: VSTR: %#x\n",
  480                         cf->cf_unit, HSCX_READ(0, H_VSTR));
  481                 printf("isic%d: HSC1: VSTR: %#x\n",
  482                         cf->cf_unit, HSCX_READ(1, H_VSTR));
  483                 return (0);
  484         }                   
  485 
  486         return (1);
  487 }
  488 
  489 
  490 #else
  491 
  492 int
  493 isic_probe_s0163(struct isic_attach_args *ia)
  494 {
  495         bus_space_tag_t t = ia->ia_maps[0].t;
  496         bus_space_handle_t h = ia->ia_maps[0].h;
  497         u_int8_t b0, b1, b2;
  498 
  499         b0 = bus_space_read_1(t, h, 0);
  500         b1 = bus_space_read_1(t, h, 1);
  501         b2 = bus_space_read_1(t, h, 2);
  502 
  503         if (b0 == 0x51 && b1 == 0x93 && (b2 == 0x1c || b2 == 0x1f))
  504                 return 1;
  505 
  506         return 0;
  507 }
  508 #endif
  509 
  510 /*---------------------------------------------------------------------------*
  511  *      isic_attach_s0163 - attach Teles S0/16.3 and compatibles
  512  *---------------------------------------------------------------------------*/
  513 #ifdef __FreeBSD__
  514 int
  515 isic_attach_s0163(struct isa_device *dev)
  516 {
  517         u_char irq;
  518 
  519         if((irq = intr_no[ffs(dev->id_irq) - 1]) == 1)
  520         {
  521                 printf("isic%d: Attach error, invalid IRQ [%d] specified for Teles S0/16.3!\n",
  522                         dev->id_unit, ffs(dev->id_irq)-1);
  523                 return(0);
  524         }
  525 
  526         /* configure IRQ */
  527         
  528         DELAY(SEC_DELAY / 10);
  529         outb(dev->id_iobase + 4, irq);
  530 
  531         DELAY(SEC_DELAY / 10);
  532         outb(dev->id_iobase + 4, irq | 0x01);   
  533 
  534         return (1);
  535 }
  536 
  537 #elif defined(__bsdi__)
  538 
  539 extern int
  540 isic_attach_s0163(struct device *parent, struct device *self, struct isa_attach_args *ia)
  541 {
  542         u_char irq;
  543         struct isic_softc *sc = (struct isic_softc *)self;
  544         int unit = sc->sc_dev.dv_unit;
  545 
  546         /* Commit the probed attachement values */
  547 
  548         if (set_softc(sc, ia, unit) == 0)
  549                 panic("isic_attach_s0163: set_softc");
  550 
  551         if (((unsigned)sc->sc_unit) >= NISIC)
  552                 panic("attach isic%d; NISIC=%d", sc->sc_unit, NISIC);
  553         l1_sc[sc->sc_unit] = sc;
  554         irq = intr_no[ffs(sc->sc_irq) - 1];
  555         /* configure IRQ */
  556         
  557         DELAY(SEC_DELAY / 10);
  558         outb(sc->sc_port + 4, irq);
  559 
  560         DELAY(SEC_DELAY / 10);
  561         outb(sc->sc_port + 4, irq | 0x01);      
  562 
  563         return 1;
  564 }
  565 #else
  566 
  567 int
  568 isic_attach_s0163(struct isic_softc *sc)
  569 {
  570         bus_space_tag_t t = sc->sc_maps[0].t;
  571         bus_space_handle_t h = sc->sc_maps[0].h;
  572         u_int8_t irq = intr_no[sc->sc_irq];
  573 
  574         /* configure IRQ */
  575         
  576         DELAY(SEC_DELAY / 10);
  577         bus_space_write_1(t, h, 4, irq);
  578 
  579         DELAY(SEC_DELAY / 10);
  580         bus_space_write_1(t, h, 4, irq | 0x01);
  581 
  582         /* setup access routines */
  583 
  584         sc->clearirq = NULL;
  585         sc->readreg = tels0163_read_reg;
  586         sc->writereg = tels0163_write_reg;
  587 
  588         sc->readfifo = tels0163_read_fifo;
  589         sc->writefifo = tels0163_write_fifo;
  590 
  591         /* setup card type */
  592         
  593         sc->sc_cardtyp= CARD_TYPEP_16_3;
  594 
  595         /* setup IOM bus type */
  596         
  597         sc->sc_bustyp = BUS_TYPE_IOM2;
  598 
  599         sc->sc_ipac = 0;
  600         sc->sc_bfifolen = HSCX_FIFO_LEN;
  601 
  602         return (1);
  603 }
  604 #endif
  605 
  606 #endif /* ISICISA_TEL_S0_16_3 */
  607 

Cache object: 6fba02a15780f1ff8d59281760fd157f


[ 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.