Changeset 20b349f in rtems


Ignore:
Timestamp:
02/20/03 21:35:57 (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
b95aedf
Parents:
4f3e4f33
Message:

2003-02-20 Till Straumann <strauman@…>

PR 349/bsps

  • shared/README.universe, shared/vmeUniverse/README.porting shared/vmeUniverse/README.universe, shared/vmeUniverse/vmeUniverse.c, shared/vmeUniverse/vmeUniverse.h: Update of the VME universe driver.
Location:
c/src/lib/libbsp/shared
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/ChangeLog

    r4f3e4f33 r20b349f  
     12003-02-20      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 349/bsps
     4        * shared/README.universe, shared/vmeUniverse/README.porting
     5        shared/vmeUniverse/README.universe, shared/vmeUniverse/vmeUniverse.c,
     6        shared/vmeUniverse/vmeUniverse.h: Update of the VME universe driver.
     7
    182002-10-28      Eugeny S. Mints <Eugeny.Mints@oktet.ru>
    29
  • c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.c

    r4f3e4f33 r20b349f  
    77
    88#if 0
     9/*
    910 * $Log$
     11 * Revision 1.34  2003/02/10 23:20:05  till
     12 *  - added some macro magic to make porting easier (ppcn_60x BSP in mind)
     13 *  - made mgrInstalled public (vmeUniverseIrqMgrInstalled) so BSPs can
     14 *    supply their own versions of the mgrInstall() routine.
     15 *  - added READMEs to CVS
     16 *
     17 * Revision 1.33.2.1  2003/02/10 23:01:40  till
     18 *  - added some macro magic to make porting easier (ppcn_60x BSP in mind)
     19 *  - made mgrInstalled public (vmeUniverseIrqMgrInstalled) so BSPs can
     20 *    supply their own versions of the mgrInstall() routine.
     21 *
     22 * Revision 1.32  2002/09/05 02:50:41  till
     23 *  - use k_vsprintf(), not vsprintf() during early boot (RTEMS)
     24 *
     25 * Revision 1.31  2002/08/16 23:35:15  strauman
     26 *  - fixed typos
     27 *
     28 * Revision 1.30  2002/08/16 22:53:37  till
     29 *  - made address translation more generic; allow to look for reverse mappings
     30 *    also.
     31 *  - removed vmeUniverseLocalToBus() and vmeUniverseBusToLocal() and made
     32 *    vmeUniverseXlateAddr() public instead.
     33 *
     34 * Revision 1.29  2002/08/16 22:16:25  till
     35 *  - tweak U2SPEC (fix Joerger vtr10012_8 problem) the same
     36 *    way the synergy BSP does (rev 2 chips only)
     37 *
     38 * Revision 1.28  2002/08/15 23:16:01  till
     39 *  - bugfix: vmeUniverseISRGet() dereferenced a possibly NULL pointer
     40 *
     41 * Revision 1.25  2002/07/19 05:18:40  till
     42 *  - CVS log: again a problem. Cannot embed /_* *_/ comments in the log
     43 *    because the log has to be commented as a whole. I had tried
     44 *    #if 0 #endif - doesn't work because cpp expands char constants???
     45 *    WHAT A NUISANCE
     46 *
     47 * Revision 1.24  2002/07/19 02:44:14  till
     48 *  - added a new parameter to the IRQ manager install routine:
     49 *    the main interrupt's line can now also be specified (reading
     50 *    from PCI config does not always work - some boards don't
     51 *    have correct information there - PMC's will have a similar
     52 *    problem, though!)
     53 *
    1054 * Revision 1.21  2002/04/11 06:54:48  till
    1155 *  - silenced message about 'successfully configured a port'
     
    3377 * Revision 1.15  2002/01/23 06:15:30  till
    3478 *   - changed master port data width to 64 bit.
    35  *     /* NOTE: reading the CY961 (Echotek ECDR814) with VDW32
    36  *      *       generated bus errors when reading 32-bit words
    37  *      *       - very weird, because the registers are 16-bit
    38  *      *         AFAIK.
    39  *      *       - 32-bit accesses worked fine on vxWorks which
    40  *      *         has the port set to 64-bit.
    41  *      *       ????????
    42  *      */
     79 *        NOTE: reading the CY961 (Echotek ECDR814) with VDW32
     80 *              generated bus errors when reading 32-bit words
     81 *              - very weird, because the registers are 16-bit
     82 *                AFAIK.
     83 *              - 32-bit accesses worked fine on vxWorks which
     84 *                has the port set to 64-bit.
     85 *              ????????
    4386 *
    4487 * Revision 1.14  2002/01/11 19:30:54  till
     
    5699 * Revision 1.11  2002/01/08 03:59:52  till
    57100 *  - vxworks always defines _LITTLE_ENDIAN, fixed the conditionals
    58  *    so it should work on __vxworks and on __rtems now.
     101 *    so it should work on __vxworks and on __rtems__ now.
    59102 *  - rtems uprintf wrapper reverts to printk if stdio is not yet
    60103 *    initialized (uses _impure_ptr->__sdidinit)
     
    90133 * Revision 1.1.1.1  2001/07/12 23:15:19  till
    91134 *  - cvs import
    92  *
     135 */
    93136#endif
    94137
     
    138181#define VX_AM_SUP               4
    139182
    140 #ifdef __rtems
     183#ifdef __rtems__
    141184
    142185#include <stdlib.h>
     
    145188#include <bsp.h>
    146189
    147 #define pciFindDevice   BSP_pciFindDevice
    148 #define pciConfigInLong pci_read_config_dword
    149 #define pciConfigInByte pci_read_config_byte
     190/* allow the BSP to override the default routines */
     191#ifndef BSP_PCI_FIND_DEVICE
     192#define BSP_PCI_FIND_DEVICE             BSP_pciFindDevice
     193#endif
     194#ifndef BSP_PCI_CONFIG_IN_LONG
     195#define BSP_PCI_CONFIG_IN_LONG  pci_read_config_dword
     196#endif
     197#ifndef BSP_PCI_CONFIG_IN_BYTE
     198#define BSP_PCI_CONFIG_IN_BYTE  pci_read_config_byte
     199#endif
    150200
    151201typedef unsigned int pci_ulong;
     
    156206typedef unsigned long pci_ulong;
    157207#define PCI_TO_LOCAL_ADDR(memaddr) (memaddr)
    158 #define PCI_INTERRUPT_LINE      0x3c
     208#define BSP_PCI_FIND_DEVICE             pciFindDevice
     209#define BSP_PCI_CONFIG_IN_LONG  pciConfigInLong
     210#define BSP_PCI_CONFIG_IN_BYTE  pciConfigInByte
    159211#else
    160212#error "vmeUniverse not ported to this architecture yet"
    161213#endif
    162214
     215#ifndef PCI_INTERRUPT_LINE
     216#define PCI_INTERRUPT_LINE              0x3c
     217#endif
    163218
    164219volatile LERegister *vmeUniverse0BaseAddr=0;
     
    193248        /* offset is in bytes and MUST not end up in r0 */
    194249        __asm__ __volatile__("stwbrx %1, %0, %2" :: "b"(off),"r"(val),"r"(adrs));
    195 #elif defined(__rtems)
     250#elif defined(__rtems__)
    196251        st_le32((volatile unsigned long*)(((unsigned long)adrs)+off), val);
    197252#else
     
    222277__asm__ __volatile__("lwbrx %0, 0, %1":"=r"(rval):"r"(adrs));
    223278        return rval;
    224 #elif defined(__rtems)
     279#elif defined(__rtems__)
    225280        return ld_le32((volatile unsigned long*)adrs);
    226281#else
     
    255310#define UNIV_REV(base) (READ_LE(base,2*sizeof(LERegister)) & 0xff)
    256311       
    257 #ifdef __rtems
     312#ifdef __rtems__
    258313static int
    259314uprintk(char *fmt, va_list ap)
    260315{
    261316int             rval;
     317extern int k_vsprintf(char *, char *, va_list);
    262318/* during bsp init, there is no malloc and no stdio,
    263319 * hence we assemble the message on the stack and revert
     
    265321 */
    266322char    buf[200];
    267         rval = vsprintf(buf,fmt,ap);
     323        rval = k_vsprintf(buf,fmt,ap);
    268324        if (rval > sizeof(buf))
    269325                        BSP_panic("vmeUniverse/uprintk: buffer overrun");
     
    281337int     rval;
    282338        va_start(ap, fmt);
    283 #ifdef __rtems
     339#ifdef __rtems__
    284340        if (!f || !_impure_ptr->__sdidinit) {
    285341                /* Might be called at an early stage when
     
    308364unsigned char irqline;
    309365
    310         if (pciFindDevice(
     366        if (BSP_PCI_FIND_DEVICE(
    311367                        PCI_VENDOR_TUNDRA,
    312368                        PCI_DEVICE_UNIVERSEII,
     
    316372                        &fun))
    317373                return -1;
    318         if (pciConfigInLong(bus,dev,fun,PCI_UNIVERSE_BASE0,&busaddr))
     374        if (BSP_PCI_CONFIG_IN_LONG(bus,dev,fun,PCI_UNIVERSE_BASE0,&busaddr))
    319375                return -1;
    320376        if ((unsigned long)(busaddr) & 1) {
    321377                /* it's IO space, try BASE1 */
    322                 if (pciConfigInLong(bus,dev,fun,PCI_UNIVERSE_BASE1,&busaddr)
     378                if (BSP_PCI_CONFIG_IN_LONG(bus,dev,fun,PCI_UNIVERSE_BASE1,&busaddr)
    323379                   || ((unsigned long)(busaddr) & 1))
    324380                        return -1;
     
    326382        *pbase=(volatile LERegister*)PCI_TO_LOCAL_ADDR(busaddr);
    327383
    328         if (pciConfigInByte(bus,dev,fun,PCI_INTERRUPT_LINE,&irqline))
     384        if (BSP_PCI_CONFIG_IN_BYTE(bus,dev,fun,PCI_INTERRUPT_LINE,&irqline))
    329385                return -1;
    330386        else
     
    609665        unsigned long   address;
    610666        unsigned long   aspace;
     667        unsigned                reverse; /* find reverse mapping of this port */
    611668} XlatRec, *Xlat;
    612669
     
    654711
    655712        /* translate address to the other bus */
    656         x = l->address - offst;
    657 
    658         if (x >= start && x < bound) {
    659                 /* valid address found */
    660                 l->address = x;
    661                 return 1;
     713        if (l->reverse) {
     714                /* reverse mapping, i.e. for master ports we map from
     715                 * VME to PCI, for slave ports we map from VME to PCI
     716                 */
     717                if (l->address >= start && l->address < bound) {
     718                                l->address+=offst;
     719                                return 1;
     720                }
     721        } else {
     722                x = l->address - offst;
     723
     724                if (x >= start && x < bound) {
     725                        /* valid address found */
     726                        l->address = x;
     727                        return 1;
     728                }
    662729        }
    663730        return 0;
     
    712779}
    713780
    714 static int xlate(int ismaster, unsigned long as, unsigned long aIn, unsigned long *paOut)
     781int
     782vmeUniverseXlateAddr(
     783        int master,             /* look in the master windows */
     784        int reverse,            /* reverse mapping; for masters: map local to VME */
     785        unsigned long as,       /* address space */
     786        unsigned long aIn,      /* address to look up */
     787        unsigned long *paOut/* where to put result */
     788        )
    715789{
    716790int     rval;
    717791XlatRec l;
    718         l.aspace = as;
     792        l.aspace  = as;
    719793        l.address = aIn;
     794        l.reverse = reverse;
    720795        /* map result -1/0/1 to -2/-1/0 with 0 on success */
    721         rval = mapOverAll(ismaster,xlatePort,(void*)&l) - 1;
     796        rval = mapOverAll(master,xlatePort,(void*)&l) - 1;
    722797        *paOut = l.address;
    723798        return rval;
    724 }
    725 
    726 /* public functions */
    727 int
    728 vmeUniverseLocalToBusAdrs(unsigned long as, unsigned long localAdrs, unsigned long *pbusAdrs)
    729 {
    730         return xlate(0,as,localAdrs,pbusAdrs);
    731 }
    732 
    733 int
    734 vmeUniverseBusToLocalAdrs(unsigned long as, unsigned long busAdrs, unsigned long *plocalAdrs)
    735 {
    736         return xlate(1,as,busAdrs,plocalAdrs);
    737799}
    738800
     
    765827        /* disable VME bus image of VME CSR */
    766828        vmeUniverseWriteReg(0, UNIV_REGOFF_VCSR_CTL);
     829
     830
     831        /* I had problems with a Joerger vtr10012_8 card who would
     832         * only be accessible after tweaking the U2SPEC register
     833         * (the t27 parameter helped).
     834         * I use the same settings here that are used by the
     835         * Synergy VGM-powerpc BSP for vxWorks.
     836         */
     837        if (2==UNIV_REV(vmeUniverse0BaseAddr))
     838                vmeUniverseWriteReg(UNIV_U2SPEC_DTKFLTR |
     839                                                UNIV_U2SPEC_MASt11   |
     840                                                UNIV_U2SPEC_READt27_NODELAY |
     841                                                UNIV_U2SPEC_POSt28_FAST |
     842                                                UNIV_U2SPEC_PREt28_FAST,
     843                                                UNIV_REGOFF_U2SPEC);
    767844
    768845        /* disable interrupts, reset routing */
     
    9251002                        : "=r"(p) : "r"(p) : "r0"
    9261003                        );
    927 #elif defined(__rtems)
     1004#elif defined(__rtems__)
    9281005                p--; st_le32(p, *p);
    9291006#else
     
    9361013/* RTEMS interrupt subsystem */
    9371014
    938 #ifdef __rtems
     1015#ifdef __rtems__
    9391016#include <bsp/irq.h>
    9401017
     
    9451022} UniverseIRQEntryRec, *UniverseIRQEntry;
    9461023
    947 static UniverseIRQEntry universeHdlTbl[257]={0};
    948 
    949 static int mgrInstalled=0;
     1024static UniverseIRQEntry universeHdlTbl[UNIV_NUM_INT_VECS]={0};
     1025
     1026int        vmeUniverseIrqMgrInstalled=0;
    9501027static int vmeIrqUnivOut=-1;
    9511028static int specialIrqUnivOut=-1;
     
    9541031vmeUniverseISRGet(unsigned long vector, void **parg)
    9551032{
    956         if (vector>255) return 0;
     1033        if (vector>=UNIV_NUM_INT_VECS ||
     1034                ! universeHdlTbl[vector])
     1035                return 0;
    9571036        if (parg)
    9581037                *parg=universeHdlTbl[vector]->usrData;
     
    9631042universeSpecialISR(void)
    9641043{
    965 UniverseIRQEntry ip;
    966         /* try the special handler */
    967         if ((ip=universeHdlTbl[UNIV_SPECIAL_IRQ_VECTOR])) {
    968                 ip->isr(ip->usrData, UNIV_SPECIAL_IRQ_VECTOR);
     1044register UniverseIRQEntry       ip;
     1045register unsigned                       vec;
     1046register unsigned long          status;
     1047
     1048        status=vmeUniverseReadReg(UNIV_REGOFF_LINT_STAT);
     1049
     1050        /* scan all LINT bits except for the 'normal' VME interrupts */
     1051
     1052        /* do VOWN first */
     1053        vec=UNIV_VOWN_INT_VEC;
     1054        if ( (status & UNIV_LINT_STAT_VOWN) && (ip=universeHdlTbl[vec]))
     1055                ip->isr(ip->usrData,vec);
     1056
     1057        /* now continue with DMA and scan through all bits;
     1058         * we assume the vectors are in the right order!
     1059         *
     1060         * The initial right shift brings the DMA bit into position 0;
     1061         * the loop is left early if there are no more bits set.
     1062         */
     1063        for (status>>=8; status; status>>=1) {
     1064                vec++;
     1065                if ((status&1) && (ip=universeHdlTbl[vec]))
     1066                        ip->isr(ip->usrData,vec);
    9691067        }
    9701068        /* clear all special interrupts */
     
    10931191
    10941192int
    1095 vmeUniverseInstallIrqMgr(int vmeOut, int specialOut, int specialIrqPicLine)
     1193vmeUniverseInstallIrqMgr(int vmeOut,
     1194                                                 int vmeIrqPicLine,
     1195                                                 int specialOut,
     1196                                                 int specialIrqPicLine)
    10961197{
    10971198rtems_irq_connect_data aarrggh;
     
    11001201        if ((vmeIrqUnivOut=vmeOut) < 0 || vmeIrqUnivOut > 7) return -1;
    11011202        if ((specialIrqUnivOut=specialOut) > 7) return -2;
    1102         if (specialIrqPicLine < 0) return -3;
    1103 
    1104         if (mgrInstalled) return -4;
     1203        if (specialOut >=0 && specialIrqPicLine < 0) return -3;
     1204        /* give them a chance to override buggy PCI info */
     1205        if (vmeIrqPicLine >= 0) {
     1206                uprintf(stderr,"Overriding main IRQ line PCI info with %i\n",
     1207                                vmeIrqPicLine);
     1208                vmeUniverse0PciIrqLine=vmeIrqPicLine;
     1209        }
     1210
     1211        if (vmeUniverseIrqMgrInstalled) return -4;
    11051212
    11061213        aarrggh.on=my_no_op; /* at _least_ they could check for a 0 pointer */
     
    11431250                ),
    11441251                UNIV_REGOFF_LINT_MAP1);
    1145         mgrInstalled=1;
     1252        vmeUniverseIrqMgrInstalled=1;
    11461253        return 0;
    11471254}
     
    11531260UniverseIRQEntry ip;
    11541261
    1155                 if (vector>sizeof(universeHdlTbl)/sizeof(universeHdlTbl[0]) || !mgrInstalled)
     1262                if (vector>sizeof(universeHdlTbl)/sizeof(universeHdlTbl[0]) || !vmeUniverseIrqMgrInstalled)
    11561263                                return -1;
    11571264
     
    11711278UniverseIRQEntry ip;
    11721279
    1173                 if (vector>sizeof(universeHdlTbl)/sizeof(universeHdlTbl[0]) || !mgrInstalled)
     1280                if (vector>sizeof(universeHdlTbl)/sizeof(universeHdlTbl[0]) || !vmeUniverseIrqMgrInstalled)
    11741281                                return -1;
    11751282
     
    11861293vmeUniverseIntEnable(unsigned int level)
    11871294{
    1188                 if (!mgrInstalled || level<1 || level>7)
     1295                if (!vmeUniverseIrqMgrInstalled || level<1 || level>7)
    11891296                                return -1;
    11901297                vmeUniverseWriteReg(
     
    11991306vmeUniverseIntDisable(unsigned int level)
    12001307{
    1201                 if (!mgrInstalled || level<1 || level>7)
     1308                if (!vmeUniverseIrqMgrInstalled || level<1 || level>7)
    12021309                                return -1;
    12031310                vmeUniverseWriteReg(
  • c/src/lib/libbsp/shared/vmeUniverse/vmeUniverse.h

    r4f3e4f33 r20b349f  
    1515#else
    1616/* vxworks compatible addressing modes */
     17#define VME_AM_STD_SUP_ASCENDING        0x3f
    1718#define VME_AM_STD_SUP_PGM      0x3e
     19#define VME_AM_STD_USR_ASCENDING        0x3b
    1820#define VME_AM_STD_USR_PGM      0x3a
    1921#define VME_AM_STD_SUP_DATA     0x3d
    2022#define VME_AM_STD_USR_DATA     0x39
     23#define VME_AM_EXT_SUP_ASCENDING        0x0f
    2124#define VME_AM_EXT_SUP_PGM      0x0e
     25#define VME_AM_EXT_USR_ASCENDING        0x0b
    2226#define VME_AM_EXT_USR_PGM      0x0a
    2327#define VME_AM_EXT_SUP_DATA     0x0d
     
    2529#define VME_AM_SUP_SHORT_IO     0x2d
    2630#define VME_AM_USR_SHORT_IO     0x29
     31
     32#define VME_AM_IS_SHORT(a)      (((a) & 0xf0) == 0x20)
     33#define VME_AM_IS_STD(a)        (((a) & 0xf0) == 0x30)
     34#define VME_AM_IS_EXT(a)        (((a) & 0xf0) == 0x00)
     35
    2736#endif
    2837
     
    339348# define        UNIV_MISC_CTL_V64AUTO           (1<<16) /* (R/W) 1:initiate VME64 auto id slave participation */
    340349
     350/* U2SPEC described in VGM manual */
     351/* NOTE: the Joerger vtr10012_8 needs the timing to be tweaked!!!! READt27 must be _no_delay_
     352 */
     353#define         UNIV_REGOFF_U2SPEC              0x4fc
     354# define        UNIV_U2SPEC_DTKFLTR                     (1<<12) /* DTAck filter: 0: slow, better filter; 1: fast, poorer filter */
     355# define        UNIV_U2SPEC_MASt11                      (1<<10) /* Master parameter t11 (DS hi time during BLT and MBLTs) */
     356# define        UNIV_U2SPEC_READt27_DEFAULT     (0<<8)  /* VME master parameter t27: (latch data after DTAck + 25ns) */
     357# define        UNIV_U2SPEC_READt27_FAST        (1<<8)  /* VME master parameter t27: (latch data faster than 25ns)  */
     358# define        UNIV_U2SPEC_READt27_NODELAY     (2<<8)  /* VME master parameter t27: (latch data without any delay)  */
     359# define        UNIV_U2SPEC_POSt28_FAST         (1<<2)  /* VME slave parameter t28: (faster time of DS to DTAck for posted write) */
     360# define        UNIV_U2SPEC_PREt28_FAST         (1<<0)  /* VME slave parameter t28: (faster time of DS to DTAck for prefetch read) */
     361
    341362/* Location Monitor control register */
    342363#define         UNIV_REGOFF_LM_CTL              0xf64
     
    490511/* translate an address through the bridge
    491512 *
    492  * vmeUniverseLocalToBusAdrs() yields a VME a address that reflects
     513 * vmeUniverseXlateAddr(0,0,addr,as,&result)
     514 * yields a VME a address that reflects
    493515 * a local memory location as seen from the VME bus through the universe
    494516 * VME slave.
    495517 *
    496  * likewise does vmeUniverseBusToLocalAdrs() translate a VME bus addr
    497  * (through the VME master) to the PCI side of the bridge.
     518 * likewise does vmeUniverseXlateAddr(1,0,addr,as,&result)
     519 * translate a VME bus addr (through the VME master) to the
     520 * PCI side of the bridge.
    498521 *
    499522 * a valid address space modifier must be specified.
     523 *
     524 * The 'reverse' parameter may be used to find a reverse
     525 * mapping, i.e. the pci address in a master window can be
     526 * found if the respective vme address is known etc.
    500527 *
    501528 * RETURNS: translated address in *pbusAdrs / *plocalAdrs
     
    506533 */
    507534int
    508 vmeUniverseLocalToBusAdrs(unsigned long am, unsigned long localAdrs, unsigned long *pbusAdrs);
    509 
    510 int
    511 vmeUniverseBusToLocalAdrs(unsigned long am, unsigned long busAdrs, unsigned long *plocalAdrs);
    512 
     535vmeUniverseXlateAddr(
     536        int master,             /* look in the master windows */
     537        int reverse,            /* reverse mapping; for masters: map local to VME */
     538        unsigned long as,       /* address space */
     539        unsigned long addr,     /* address to look up */
     540        unsigned long *paOut/* where to put result */
     541        );
    513542
    514543/* configure a VME slave (PCI master) port */
     
    557586}
    558587
    559 #ifdef __rtems
     588#ifdef __rtems__
    560589/* VME Interrupt Handler functionality */
    561590
     
    609638
    610639
    611 /* use this special vector to connect a handler to the
     640/* use these special vectors to connect a handler to the
    612641 * universe specific interrupts (such as "DMA done",
    613642 * VOWN, error irqs etc.)
     
    616645 * responsibility to enable the necessary interrupts in
    617646 * LINT_EN
    618  */
    619 #define UNIV_SPECIAL_IRQ_VECTOR 256
     647 *
     648 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     649 * DO NOT CHANGE THE ORDER OF THESE VECTORS - THE DRIVER
     650 * DEPENDS ON IT
     651 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     652 *
     653 */
     654#define UNIV_VOWN_INT_VEC                       256
     655#define UNIV_DMA_INT_VEC                        257
     656#define UNIV_LERR_INT_VEC                       258
     657#define UNIV_VERR_INT_VEC                       259
     658#define UNIV_VME_SW_IACK_INT_VEC        260
     659#define UNIV_PCI_SW_INT_VEC                     261
     660#define UNIV_SYSFAIL_INT_VEC            262
     661#define UNIV_ACFAIL_INT_VEC                     263
     662#define UNIV_MBOX0_INT_VEC                      264
     663#define UNIV_MBOX1_INT_VEC                      265
     664#define UNIV_MBOX2_INT_VEC                      266
     665#define UNIV_MBOX3_INT_VEC                      267
     666#define UNIV_LM0_INT_VEC                        268
     667#define UNIV_LM1_INT_VEC                        269
     668#define UNIV_LM2_INT_VEC                        270
     669#define UNIV_LM3_INT_VEC                        271
     670
     671#define UNIV_NUM_INT_VECS                       272
    620672
    621673/* the universe interrupt handler is capable of routing all sorts of
     
    635687 * Hence the manager sets up routing VME interrupts to 1 or 2 universe
    636688 * OUTPUTS. However, it must also be told to which PIC INPUTS they
    637  * are wired. The first PIC input line is read from PCI config space
    638  * but the second must be passed to this routine.
     689 * are wired.
     690 * Optionally, the first PIC input line can be read from PCI config space
     691 * but the second must be passed to this routine. Note that the info read
     692 * from PCI config space is wrong for many boards!
    639693 *
    640694 * PARAMETERS:
    641  *       vmeIRQunivOut: to which output pin (of the universe) should the 7
     695 *       vmeIrqUnivOut: to which output pin (of the universe) should the 7
    642696 *                                      VME irq levels be routed.
    643  *   specialIRQunivOut: to which output pin (of the universe) should the
     697 *       vmeIrqPicLine: specifies to which PIC input the 'main' output is
     698 *                      wired. If passed a value < 0, the driver reads this
     699 *                      information from PCI config space ("IRQ line").
     700 *   specialIrqUnivOut: to which output pin (of the universe) should the
    644701 *                      internally irqs be routed. Use 'vmeIRQunivOut'
    645702 *                      if < 0.
     
    652709 */
    653710int
    654 vmeUniverseInstallIrqMgr(int vmeIrqUnivOut, int specialIrqUnivOut, int specialIrqPicLine);
     711vmeUniverseInstallIrqMgr(int vmeIrqUnivOut,
     712                                                 int vmeIrqPicLine,
     713                                                 int specialIrqUnivOut,
     714                                                 int specialIrqPicLine);
    655715
    656716#endif
Note: See TracChangeset for help on using the changeset viewer.