Home | History | Annotate | Line # | Download | only in xscale
      1  1.2   briggs /*	$NetBSD: beccreg.h,v 1.2 2003/04/05 04:18:26 briggs Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.1  thorpej  * Copyright (c) 2002 Wasabi Systems, Inc.
      5  1.1  thorpej  * All rights reserved.
      6  1.1  thorpej  *
      7  1.1  thorpej  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
      8  1.1  thorpej  *
      9  1.1  thorpej  * Redistribution and use in source and binary forms, with or without
     10  1.1  thorpej  * modification, are permitted provided that the following conditions
     11  1.1  thorpej  * are met:
     12  1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     13  1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     14  1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     17  1.1  thorpej  * 3. All advertising materials mentioning features or use of this software
     18  1.1  thorpej  *    must display the following acknowledgement:
     19  1.1  thorpej  *	This product includes software developed for the NetBSD Project by
     20  1.1  thorpej  *	Wasabi Systems, Inc.
     21  1.1  thorpej  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
     22  1.1  thorpej  *    or promote products derived from this software without specific prior
     23  1.1  thorpej  *    written permission.
     24  1.1  thorpej  *
     25  1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
     26  1.1  thorpej  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27  1.1  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28  1.1  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
     29  1.1  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30  1.1  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31  1.1  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32  1.1  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33  1.1  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34  1.1  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35  1.1  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     36  1.1  thorpej  */
     37  1.1  thorpej 
     38  1.1  thorpej #ifndef _BECCREG_H_
     39  1.1  thorpej #define	_BECCREG_H_
     40  1.1  thorpej 
     41  1.1  thorpej /*
     42  1.1  thorpej  * Register definitions for the ADI Engineering Big Endian Companion
     43  1.1  thorpej  * Chip for the Intel i80200.
     44  1.1  thorpej  */
     45  1.1  thorpej 
     46  1.1  thorpej /* Revision codes */
     47  1.1  thorpej 
     48  1.1  thorpej #define	BECC_REV_V7		0x00		/* rev <= 7 */
     49  1.1  thorpej #define	BECC_REV_V8		0x01		/* rev 8 */
     50  1.1  thorpej #define	BECC_REV_V9		0x02		/* rev >= 9 */
     51  1.1  thorpej 
     52  1.1  thorpej /* Memory Map */
     53  1.1  thorpej 
     54  1.1  thorpej #define	BECC_REG_BASE		0x04000000
     55  1.1  thorpej #define	BECC_REG_SIZE		0x01000000	/* 16M */
     56  1.1  thorpej 
     57  1.1  thorpej #define	BECC_PCI_CONF_BASE	0x08000000
     58  1.1  thorpej #define	BECC_PCI_CONF_SIZE	0x02000000	/* 32M */
     59  1.1  thorpej 
     60  1.1  thorpej #define	BECC_PCI_IO_BASE	0x0a000000
     61  1.1  thorpej #define	BECC_PCI_IO_SIZE	0x02000000	/* 32M */
     62  1.1  thorpej 
     63  1.1  thorpej #define	BECC_PCI_MEM1_BASE	0x0c000000
     64  1.1  thorpej #define	BECC_PCI_MEM1_SIZE	0x02000000	/* 32M */
     65  1.1  thorpej 
     66  1.1  thorpej #define	BECC_PCI_MEM2_BASE	0x0e000000
     67  1.1  thorpej #define	BECC_PCI_MEM2_SIZE	0x02000000	/* 32M */
     68  1.1  thorpej 
     69  1.1  thorpej #define	BECC_SDRAM_BASE		0xc0000000
     70  1.1  thorpej 
     71  1.1  thorpej /* Peripheral clock is 33.3MHz */
     72  1.1  thorpej #define	BECC_PERIPH_CLOCK	33300000
     73  1.1  thorpej 
     74  1.1  thorpej /* BECC registers; offsets from BECC_REG_BASE */
     75  1.1  thorpej 
     76  1.1  thorpej #define	BECC_PSISR		0x0000	/* PCI slave interrupt status */
     77  1.1  thorpej #define	PSISR_SERR		(1U << 4)	/* system error */
     78  1.1  thorpej #define	PSISR_PERR		(1U << 9)	/* parity error */
     79  1.1  thorpej #define	PSISR_IFU		(1U << 16)	/* inbound FIFO uflow */
     80  1.1  thorpej #define	PSISR_IFO		(1U << 17)	/* inbound FIFO oflow */
     81  1.1  thorpej #define	PSISR_OFU		(1U << 18)	/* outbound FIFO uflow */
     82  1.1  thorpej #define	PSISR_OFO		(1U << 19)	/* outbound FIFO oflow */
     83  1.1  thorpej 
     84  1.1  thorpej #define	BECC_PSTR0		0x0010	/* PCI slave translation window #0 */
     85  1.1  thorpej #define	BECC_PSTR1		0x0018	/* PCI slave translation window #1 */
     86  1.1  thorpej #define	PSTRx_ADDRMASK		(3U << 25)	/* address mask */
     87  1.1  thorpej #define	PSTRx_BEE		(1U << 0)	/* big-endian enable */
     88  1.1  thorpej #define	BECC_PSTR2		0x0020	/* PCI slave translation window #2 */
     89  1.1  thorpej #define	PSTR2_ADDRMASK		(0U)		/* address mask (all SDRAM) */
     90  1.1  thorpej 
     91  1.1  thorpej #define	BECC_PMISR		0x0100	/* PCI master interrupt status */
     92  1.1  thorpej #define	PMISR_PE		(1U << 0)	/* parity error */
     93  1.1  thorpej #define	PMISR_TA		(1U << 2)	/* target abort */
     94  1.1  thorpej #define	PMISR_MA		(1U << 3)	/* master abort */
     95  1.1  thorpej #define	PMISR_IFU		(1U << 16)	/* inbound FIFO uflow */
     96  1.1  thorpej #define	PMISR_IFO		(1U << 17)	/* inbound FIFO oflow */
     97  1.1  thorpej #define	PMISR_OFU		(1U << 18)	/* outbound FIFO uflow */
     98  1.1  thorpej #define	PMISR_OFO		(1U << 19)	/* outbound FIFO oflow */
     99  1.1  thorpej 
    100  1.1  thorpej #define	BECC_IDSEL_BIT		11	/* first device on PCI bus */
    101  1.1  thorpej 
    102  1.1  thorpej #define	BECC_POMR1		0x0110	/* PCI outbound memory window #1 */
    103  1.1  thorpej #define	BECC_POMR2		0x0114	/* PCI outbound memory window #2 */
    104  1.1  thorpej #define	POMRx_ADDRMASK		0xfe000000	/* address mask */
    105  1.1  thorpej #define	POMRx_BEE		(1U << 2)	/* big-endian enable */
    106  1.1  thorpej #define	POMRx_F32		(1U << 3)	/* force 32-bit transfer */
    107  1.1  thorpej #define	POMRx_BO(x)		(x)		/* busrt order (MBZ) */
    108  1.1  thorpej #define	BECC_POMR3		0x0130	/* PCI outbound memory window #3 */
    109  1.1  thorpej #define	POMR3_ADDRMASK		0xc0000000	/* address mask */
    110  1.1  thorpej 
    111  1.1  thorpej #define	BECC_POIR		0x0118	/* PCI outbound I/O window */
    112  1.1  thorpej #define	POIR_ADDRMASK		0xfe000000	/* address mask */
    113  1.1  thorpej #define	POIR_BEE		(1U << 2)	/* big-endian enable */
    114  1.1  thorpej 
    115  1.1  thorpej #define	BECC_POCR		0x0120	/* PCI outbound config window */
    116  1.1  thorpej #define	POCR_BEE		(1U << 2)	/* big-endian enable */
    117  1.1  thorpej #define	POCR_TYPE		(1U << 0)	/* for type 1 cycles */
    118  1.1  thorpej 
    119  1.1  thorpej #define	BECC_DMACR		0x0200	/* DMA control register */
    120  1.1  thorpej #define	DMACR_CE		(1U << 0)	/* channel enable */
    121  1.1  thorpej 
    122  1.1  thorpej #define	BECC_DMASR		0x0204	/* DMA status register */
    123  1.1  thorpej #define	DMASR_PEF		(1U << 0)	/* PCI parity error */
    124  1.1  thorpej #define	DMASR_PTA		(1U << 2)	/* PCI target abort */
    125  1.1  thorpej #define	DMASR_PMA		(1U << 3)	/* PCI master abort */
    126  1.1  thorpej #define	DMASR_EOTI		(1U << 8)	/* end of transfer interrupt */
    127  1.2   briggs #define	DMASR_CA		(1U << 10)	/* channel active */
    128  1.1  thorpej #define	DMASR_IFU		(1U << 16)	/* inbound FIFO uflow */
    129  1.1  thorpej #define	DMASR_IFO		(1U << 17)	/* inbound FIFO oflow */
    130  1.1  thorpej #define	DMASR_OFU		(1U << 18)	/* outbound FIFO uflow */
    131  1.1  thorpej #define	DMASR_OFO		(1U << 19)	/* outbound FIFO oflow */
    132  1.1  thorpej 
    133  1.1  thorpej #define	BECC_DMAPCIAR		0x0210	/* DMA PCI address */
    134  1.1  thorpej 
    135  1.1  thorpej #define	BECC_DMALAR		0x021c	/* DMA local address */
    136  1.1  thorpej 
    137  1.1  thorpej #define	BECC_DMABCR		0x0220	/* DMA byte count */
    138  1.1  thorpej 
    139  1.1  thorpej #define	BECC_DMADCR		0x0224	/* DMA descriptor control */
    140  1.1  thorpej #define	DMADCR_F32		(1U << 6)	/* force 32-bit */
    141  1.1  thorpej #define	DMADCR_BEE		(1U << 5)	/* big-endian enable */
    142  1.1  thorpej #define	DMADCR_PCICMD(x)	(x)		/* PCI command */
    143  1.1  thorpej 
    144  1.1  thorpej #define	PCICMD_MR		0x6	/* memory read */
    145  1.1  thorpej #define	PCICMD_MRL		0xe	/* memory read line */
    146  1.1  thorpej #define	PCICMD_MRM		0xc	/* memory read multiple */
    147  1.1  thorpej #define	PCICMD_MW		0x7	/* memory write */
    148  1.1  thorpej 
    149  1.1  thorpej #define	BECC_TSCRA		0x0300	/* Timer status/control A */
    150  1.1  thorpej #define	BECC_TSCRB		0x0320	/* Timer status/control B */
    151  1.1  thorpej #define	TSCRx_TE		(1U << 0)	/* timer enable */
    152  1.1  thorpej #define	TSCRx_CM		(1U << 1)	/* continuous mode */
    153  1.1  thorpej #define	TSCRx_TIF		(1U << 9)	/* timer interrupt flag */
    154  1.1  thorpej 
    155  1.1  thorpej #define	BECC_TPRA		0x0304	/* Timer preload A */
    156  1.1  thorpej #define	BECC_TPRB		0x0324	/* Timer preload B */
    157  1.1  thorpej 
    158  1.1  thorpej #define	BECC_TCVRA		0x0308	/* Timer current value A */
    159  1.1  thorpej #define	BECC_TCVRB		0x0328	/* Timer current value B */
    160  1.1  thorpej 
    161  1.1  thorpej #define	BECC_ICSR		0x0400	/* Interrupt control/status */
    162  1.1  thorpej #define	BECC_ICMR		0x0404	/* Interrupt mask */
    163  1.1  thorpej #define	BECC_ICSTR		0x0408	/* Interrupt steer */
    164  1.1  thorpej 
    165  1.1  thorpej #define	ICU_SOFT		0	/* software interrupt */
    166  1.1  thorpej #define	ICU_TIMERA		1	/* timer A */
    167  1.1  thorpej #define	ICU_TIMERB		2	/* timer B */
    168  1.1  thorpej #define	ICU_DIAGERR		7	/* diagnostic error */
    169  1.1  thorpej #define	ICU_DMA_EOT		8	/* DMA end-of-transfer */
    170  1.1  thorpej #define	ICU_DMA_PEF		9	/* DMA parity error */
    171  1.1  thorpej #define	ICU_DMA_TA		10	/* DMA target abort */
    172  1.1  thorpej #define	ICU_DMA_MA		11	/* DMA master abort */
    173  1.1  thorpej #define	ICU_PCI_PERR		16	/* PCI parity error */
    174  1.1  thorpej #define	ICU_PCI_SERR		19	/* PCI system error */
    175  1.1  thorpej #define	ICU_PCI_POAPEI		20	/* PCI outbound ATU parity error */
    176  1.1  thorpej #define	ICU_PCI_POATAI		21	/* PCI outbound ATU target abort */
    177  1.1  thorpej #define	ICU_PCI_POAMAI		22	/* PCI outbound ATU master abort */
    178  1.1  thorpej #define	ICU_UARTA		24	/* UART A */
    179  1.1  thorpej #define	ICU_UARTB		25	/* UART B */
    180  1.1  thorpej #define	ICU_PCI_INTA		26	/* PCI INTA# */
    181  1.1  thorpej #define	ICU_PCI_INTB		27	/* PCI INTB# */
    182  1.1  thorpej #define	ICU_PCI_INTC		28	/* PCI INTC# */
    183  1.1  thorpej #define	ICU_PCI_INTD		29	/* PCI INTD# */
    184  1.1  thorpej #define	ICU_PUSHBUTTON		30	/* push button pulse */
    185  1.1  thorpej 
    186  1.1  thorpej #define	ICU_RESERVED_MASK	((1U << 3) | (1U << 4) | (1U << 5) |	\
    187  1.1  thorpej 				 (1U << 6) | (1U << 12) | (1U << 13) |	\
    188  1.1  thorpej 				 (1U << 14) | (1U << 15) | (1U << 17) |	\
    189  1.1  thorpej 				 (1U << 18) | (1U << 23) | (1U << 31))
    190  1.1  thorpej #define	ICU_VALID_MASK		(~ICU_RESERVED_MASK)
    191  1.1  thorpej 
    192  1.1  thorpej #define	BECC_RSSR		0x0500	/* rotary switch status */
    193  1.1  thorpej #define	RSSR_POS		0x0000000f	/* switch position */
    194  1.1  thorpej #define	RSSR_BE			(1U << 6)	/* big-endian jumper */
    195  1.1  thorpej 
    196  1.1  thorpej #endif /* _BECCREG_H_ */
    197