Home | History | Annotate | Line # | Download | only in include
      1  1.9   matt /*	$NetBSD: ka820.h,v 1.9 2008/03/11 05:34:02 matt Exp $	*/
      2  1.1  ragge /*
      3  1.1  ragge  * Copyright (c) 1988 Regents of the University of California.
      4  1.1  ragge  * All rights reserved.
      5  1.1  ragge  *
      6  1.1  ragge  * This code is derived from software contributed to Berkeley by
      7  1.1  ragge  * Chris Torek.
      8  1.1  ragge  *
      9  1.1  ragge  * Redistribution and use in source and binary forms, with or without
     10  1.1  ragge  * modification, are permitted provided that the following conditions
     11  1.1  ragge  * are met:
     12  1.1  ragge  * 1. Redistributions of source code must retain the above copyright
     13  1.1  ragge  *    notice, this list of conditions and the following disclaimer.
     14  1.1  ragge  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  ragge  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  ragge  *    documentation and/or other materials provided with the distribution.
     17  1.6    agc  * 3. Neither the name of the University nor the names of its contributors
     18  1.1  ragge  *    may be used to endorse or promote products derived from this software
     19  1.1  ragge  *    without specific prior written permission.
     20  1.1  ragge  *
     21  1.1  ragge  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  1.1  ragge  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.1  ragge  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.1  ragge  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  1.1  ragge  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.1  ragge  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.1  ragge  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.1  ragge  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.1  ragge  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.1  ragge  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.1  ragge  * SUCH DAMAGE.
     32  1.1  ragge  *
     33  1.1  ragge  *	@(#)ka820.h	7.3 (Berkeley) 6/28/90
     34  1.1  ragge  */
     35  1.1  ragge 
     36  1.1  ragge /*
     37  1.7    wiz  * Definitions specific to the ka820 CPU.
     38  1.1  ragge  */
     39  1.5   matt #ifndef _VAX_KA820_H_
     40  1.5   matt #define _VAX_KA820_H_
     41  1.1  ragge 
     42  1.1  ragge /*
     43  1.1  ragge  * Device addresses.
     44  1.1  ragge  */
     45  1.1  ragge #define KA820_PORTADDR		0x20088000	/* port controller */
     46  1.1  ragge #define KA820_BRAMADDR		0x20090000	/* boot ram */
     47  1.1  ragge #define KA820_EEPROMADDR	0x20098000	/* eeprom */
     48  1.1  ragge #define KA820_RX50ADDR		0x200b0000	/* rcx50 */
     49  1.1  ragge #define KA820_CLOCKADDR		0x200b8000	/* watch chip */
     50  1.1  ragge 
     51  1.1  ragge /*
     52  1.1  ragge  * Sizes.  The port controller, RCX50, and watch chip are all one page.
     53  1.1  ragge  */
     54  1.1  ragge #define KA820_BRPAGES		16		/* 8K */
     55  1.1  ragge #define KA820_EEPAGES		64		/* 32K */
     56  1.1  ragge 
     57  1.1  ragge /* port controller CSR bit values */
     58  1.1  ragge #define KA820PORT_RSTHALT	0x80000000	/* restart halt */
     59  1.1  ragge #define KA820PORT_LCONS		0x40000000	/* logical console */
     60  1.1  ragge #define KA820PORT_LCONSEN	0x20000000	/* logical console enable */
     61  1.1  ragge #define KA820PORT_BIRESET	0x10000000	/* BI reset */
     62  1.1  ragge #define KA820PORT_BISTF		0x08000000	/* ??? */
     63  1.1  ragge #define KA820PORT_ENBAPT	0x04000000	/* ??? */
     64  1.1  ragge #define KA820PORT_STPASS	0x02000000	/* self test pass */
     65  1.1  ragge #define KA820PORT_RUN		0x01000000	/* run */
     66  1.1  ragge #define KA820PORT_WWPE		0x00800000	/* ??? parity even? */
     67  1.1  ragge #define KA820PORT_EVLCK		0x00400000	/* event lock */
     68  1.1  ragge #define KA820PORT_WMEM		0x00200000	/* write mem */
     69  1.1  ragge #define KA820PORT_EV4		0x00100000	/* event 4 */
     70  1.1  ragge #define KA820PORT_EV3		0x00080000	/* event 3 */
     71  1.1  ragge #define KA820PORT_EV2		0x00040000	/* event 2 */
     72  1.1  ragge #define KA820PORT_EV1		0x00020000	/* event 1 */
     73  1.1  ragge #define KA820PORT_EV0		0x00010000	/* event 0 */
     74  1.1  ragge #define KA820PORT_WWPO		0x00008000	/* ??? parity odd? */
     75  1.1  ragge #define KA820PORT_PERH		0x00004000	/* parity error H */
     76  1.1  ragge #define KA820PORT_ENBPIPE	0x00002000	/* enable? pipe */
     77  1.1  ragge #define KA820PORT_TIMEOUT	0x00001000	/* timeout */
     78  1.1  ragge #define KA820PORT_RSVD		0x00000800	/* reserved */
     79  1.1  ragge #define KA820PORT_CONSEN	0x00000400	/* console interrupt enable */
     80  1.1  ragge #define KA820PORT_CONSCLR	0x00000200	/* clear console interrupt */
     81  1.1  ragge #define KA820PORT_CONSINTR	0x00000100	/* console interrupt req */
     82  1.1  ragge #define KA820PORT_RXIE		0x00000080	/* RX50 interrupt enable */
     83  1.1  ragge #define KA820PORT_RXCLR		0x00000040	/* clear RX50 interrupt */
     84  1.1  ragge #define KA820PORT_RXIRQ		0x00000020	/* RX50 interrupt request */
     85  1.1  ragge #define KA820PORT_IPCLR		0x00000010	/* clear IP interrupt */
     86  1.1  ragge #define KA820PORT_IPINTR	0x00000008	/* IP interrupt request */
     87  1.1  ragge #define KA820PORT_CRDEN		0x00000004	/* enable CRD interrupts */
     88  1.1  ragge #define KA820PORT_CRDCLR	0x00000002	/* clear CRD interrupt */
     89  1.1  ragge #define KA820PORT_CRDINTR	0x00000001	/* CRD interrupt request */
     90  1.2  ragge 
     91  1.2  ragge /* interrupt vectors unique for this CPU */
     92  1.2  ragge #define	KA820_INT_RXCD		0x58
     93  1.4  ragge #define KA820_INT_IPINTR	0x80
     94  1.1  ragge 
     95  1.1  ragge /* what the heck */
     96  1.1  ragge #define KA820PORT_BITS \
     97  1.1  ragge "\20\40RSTHALT\37LCONS\36LCONSEN\35BIRESET\34BISTF\33ENBAPT\32STPASS\31RUN\
     98  1.1  ragge \30WWPE\27EVLCK\26WMEM\25EV4\24EV3\23EV2\22EV1\21EV\20WWPO\17PERH\16ENBPIPE\
     99  1.1  ragge \15TIMEOUT\13CONSEN\12CONSCLR\11CONSINTR\10RXIE\7RXCLR\6RXIRQ\5IPCLR\4IPINTR\
    100  1.1  ragge \3CRDEN\2CLRCLR\1CRDINTR"
    101  1.1  ragge 
    102  1.1  ragge /* clock CSR bit values, per csr */
    103  1.1  ragge #define KA820CLK_0_BUSY		0x01		/* busy (time changing) */
    104  1.1  ragge #define KA820CLK_1_GO		0x0c		/* run */
    105  1.1  ragge #define KA820CLK_1_SET		0x0d		/* set the time */
    106  1.1  ragge #define KA820CLK_3_VALID	0x01		/* clock is valid */
    107  1.1  ragge 
    108  1.1  ragge #ifndef LOCORE
    109  1.1  ragge struct ka820port {
    110  1.1  ragge 	u_long	csr;
    111  1.1  ragge 	/* that seems to be all.... */
    112  1.1  ragge };
    113  1.1  ragge 
    114  1.1  ragge struct ka820clock {
    115  1.1  ragge 	u_char	sec;
    116  1.1  ragge 	u_char	pad0;
    117  1.1  ragge 	u_char	secalrm;
    118  1.1  ragge 	u_char	pad1;
    119  1.1  ragge 	u_char	min;
    120  1.1  ragge 	u_char	pad2;
    121  1.1  ragge 	u_char	minalrm;
    122  1.1  ragge 	u_char	pad3;
    123  1.1  ragge 	u_char	hr;
    124  1.1  ragge 	u_char	pad4;
    125  1.1  ragge 	u_char	hralrm;
    126  1.1  ragge 	u_char	pad5;
    127  1.1  ragge 	u_char	dayofwk;
    128  1.1  ragge 	u_char	pad6;
    129  1.1  ragge 	u_char	day;
    130  1.1  ragge 	u_char	pad7;
    131  1.1  ragge 	u_char	mon;
    132  1.1  ragge 	u_char	pad8;
    133  1.1  ragge 	u_char	yr;
    134  1.1  ragge 	u_char	pad9;
    135  1.1  ragge 	u_short csr0;
    136  1.1  ragge 	u_short csr1;
    137  1.1  ragge 	u_short csr2;
    138  1.1  ragge 	u_short csr3;
    139  1.1  ragge };
    140  1.1  ragge 
    141  1.9   matt void	crxintr(void *arg);
    142  1.5   matt #endif /* _LOCORE */
    143  1.5   matt 
    144  1.5   matt #endif /* _VAX_KA820_H_ */
    145