[BACK]Return to pcctworeg.h CVS log [TXT][DIR] Up to [local] / sys / arch / mvme68k / dev

Annotation of sys/arch/mvme68k/dev/pcctworeg.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: pcctworeg.h,v 1.6 2004/07/30 22:29:45 miod Exp $ */
        !             2:
        !             3: /*
        !             4:  * Copyright (c) 1995 Theo de Raadt
        !             5:  * All rights reserved.
        !             6:  *
        !             7:  * Redistribution and use in source and binary forms, with or without
        !             8:  * modification, are permitted provided that the following conditions
        !             9:  * are met:
        !            10:  * 1. Redistributions of source code must retain the above copyright
        !            11:  *    notice, this list of conditions and the following disclaimer.
        !            12:  * 2. Redistributions in binary form must reproduce the above copyright
        !            13:  *    notice, this list of conditions and the following disclaimer in the
        !            14:  *    documentation and/or other materials provided with the distribution.
        !            15:  *
        !            16:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
        !            17:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
        !            18:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        !            19:  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            20:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
        !            21:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        !            22:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
        !            23:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            24:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
        !            25:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        !            26:  */
        !            27:
        !            28: /*
        !            29:  * MVME16x PCC2 chip: sort of a confused mish-mash of the MC in the 162
        !            30:  * and the PCC in the 147
        !            31:  */
        !            32: struct pcctworeg {
        !            33:        volatile u_char         pcc2_chipid;
        !            34:        volatile u_char         pcc2_chiprev;
        !            35:        volatile u_char         pcc2_genctl;
        !            36:        volatile u_char         pcc2_vecbase;   /* irq vector base */
        !            37:        volatile u_long         pcc2_t1cmp;     /* timer1 compare */
        !            38:        volatile u_long         pcc2_t1count;   /* timer1 count */
        !            39:        volatile u_long         pcc2_t2cmp;     /* timer2 compare */
        !            40:        volatile u_long         pcc2_t2count;   /* timer2 count */
        !            41:        volatile u_char         pcc2_pscalecnt; /* timer prescaler counter */
        !            42:        volatile u_char         pcc2_pscaleadj; /* timer prescaler adjust */
        !            43:        volatile u_char         pcc2_t2ctl;     /* timer2 ctrl reg */
        !            44:        volatile u_char         pcc2_t1ctl;     /* timer1 ctrl reg */
        !            45:        volatile u_char         pcc2_gpioirq;   /* gpio irq */
        !            46:        volatile u_char         pcc2_gpio;      /* gpio i/o */
        !            47:        volatile u_char         pcc2_t2irq;
        !            48:        volatile u_char         pcc2_t1irq;
        !            49:        volatile u_char         pcc2_sccerr;
        !            50:        volatile u_char         pcc2_sccirq;
        !            51:        volatile u_char         pcc2_scctx;
        !            52:        volatile u_char         pcc2_sccrx;
        !            53:        volatile u_char         :8;
        !            54:        volatile u_char         :8;
        !            55:        volatile u_char         :8;
        !            56:        volatile u_char         pcc2_sccmoiack;
        !            57:        volatile u_char         :8;
        !            58:        volatile u_char         pcc2_scctxiack;
        !            59:        volatile u_char         :8;
        !            60:        volatile u_char         pcc2_sccrxiack;
        !            61:        volatile u_char         pcc2_ieerr;
        !            62:        volatile u_char         :8;
        !            63:        volatile u_char         pcc2_ieirq;
        !            64:        volatile u_char         pcc2_iefailirq;
        !            65:        volatile u_char         pcc2_ncrerr;
        !            66:        volatile u_char         :8;
        !            67:        volatile u_char         :8;
        !            68:        volatile u_char         pcc2_ncrirq;
        !            69:        volatile u_char         pcc2_prtairq;
        !            70:        volatile u_char         pcc2_prtfirq;
        !            71:        volatile u_char         pcc2_prtsirq;
        !            72:        volatile u_char         pcc2_prtpirq;
        !            73:        volatile u_char         pcc2_prtbirq;
        !            74:        volatile u_char         :8;
        !            75:        volatile u_char         pcc2_prtstat;
        !            76:        volatile u_char         pcc2_prtctl;
        !            77:        volatile u_short        pcc2_speed;     /* DO NOT USE */
        !            78:        volatile u_short        pcc2_prtdat;
        !            79:        volatile u_short        :16;
        !            80:        volatile u_char         pcc2_ipl;
        !            81:        volatile u_char         pcc2_mask;
        !            82: };
        !            83: #define PCC2_PCC2CHIP_OFF      0x42000
        !            84: #define PCC2_CHIPID            0x20
        !            85:
        !            86: /*
        !            87:  * points to system's PCCTWO. This is not active until the pcctwo0
        !            88:  * device has been attached.
        !            89:  */
        !            90: extern struct pcctworeg *sys_pcc2;
        !            91:
        !            92: /*
        !            93:  * We lock off our interrupt vector at 0x50.
        !            94:  */
        !            95: #define PCC2_VECBASE           0x50
        !            96: #define PCC2_NVEC              16
        !            97:
        !            98: /*
        !            99:  * Vectors we use
        !           100:  */
        !           101: #define PCC2V_NCR              0x05
        !           102: #define PCC2V_IEFAIL           0x06
        !           103: #define PCC2V_IE               0x07
        !           104: #define PCC2V_TIMER2           0x08
        !           105: #define PCC2V_TIMER1           0x09
        !           106: #define PCC2V_GPIO             0x0a
        !           107: #define PCC2V_SCC_RXE          0x0c
        !           108: #define PCC2V_SCC_M            0x0d
        !           109: #define PCC2V_SCC_TX           0x0e
        !           110: #define PCC2V_SCC_RX           0x0f
        !           111:
        !           112: #define PCC2_TCTL_CEN          0x01
        !           113: #define PCC2_TCTL_COC          0x02
        !           114: #define PCC2_TCTL_COVF         0x04
        !           115: #define PCC2_TCTL_OVF          0xf0
        !           116:
        !           117: #define PCC2_GPIO_PLTY         0x80
        !           118: #define PCC2_GPIO_EL           0x40
        !           119:
        !           120: #define PCC2_GPIOCR_OE         0x2
        !           121: #define PCC2_GPIOCR_O          0x1
        !           122:
        !           123: #define PCC2_SCC_AVEC          0x08
        !           124: #define PCC2_SCCRX_INHIBIT     (0 << 6)
        !           125: #define PCC2_SCCRX_SNOOP       (1 << 6)
        !           126: #define PCC2_SCCRX_INVAL       (2 << 6)
        !           127: #define PCC2_SCCRX_RESV                (3 << 6)
        !           128:
        !           129: #define pcc2_timer_us2lim(us)  (us)            /* timer increments in "us" */
        !           130:
        !           131: #define PCC2_IRQ_IPL           0x07
        !           132: #define PCC2_IRQ_ICLR          0x08
        !           133: #define PCC2_IRQ_IEN           0x10
        !           134: #define PCC2_IRQ_INT           0x20
        !           135:
        !           136: #define PCC2_IEERR_SCLR                0x01
        !           137:
        !           138: #define PCC2_GENCTL_FAST       0x01
        !           139: #define PCC2_GENCTL_IEN                0x02
        !           140: #define PCC2_GENCTL_C040       0x03
        !           141:
        !           142: #define PCC2_SC_INHIBIT                (0 << 6)
        !           143: #define PCC2_SC_SNOOP          (1 << 6)
        !           144: #define PCC2_SC_INVAL          (2 << 6)
        !           145: #define PCC2_SC_RESV           (3 << 6)
        !           146:
        !           147: int  pcctwointr_establish(int, struct intrhand *, const char *);

CVSweb