Home | History | Annotate | Line # | Download | only in xscale
i80321reg.h revision 1.3
      1  1.3  thorpej /*	$NetBSD: i80321reg.h,v 1.3 2002/04/16 17:36:06 thorpej 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 _ARM_XSCALE_I80321REG_H_
     39  1.1  thorpej #define _ARM_XSCALE_I80321REG_H_
     40  1.1  thorpej 
     41  1.1  thorpej /*
     42  1.1  thorpej  * Register definitions for the Intel 80321 (``Verde'') I/O processor,
     43  1.1  thorpej  * based on the XScale core.
     44  1.1  thorpej  */
     45  1.1  thorpej 
     46  1.1  thorpej /*
     47  1.1  thorpej  * Base i80321 memory map:
     48  1.1  thorpej  *
     49  1.1  thorpej  *	0x0000.0000 - 0x7fff.ffff	ATU Outbound Direct Addressing Window
     50  1.1  thorpej  *	0x8000.0000 - 0x9001.ffff	ATU Outbound Translation Windows
     51  1.1  thorpej  *	0x9002.0000 - 0xffff.dfff	External Memory
     52  1.1  thorpej  *	0xffff.e000 - 0xffff.e8ff	Peripheral Memory Mapped Registers
     53  1.1  thorpej  *	0xffff.e900 - 0xffff.ffff	Reserved
     54  1.1  thorpej  */
     55  1.1  thorpej 
     56  1.1  thorpej #define	VERDE_OUT_DIRECT_WIN_BASE	0x00000000UL
     57  1.1  thorpej #define	VERDE_OUT_DIRECT_WIN_SIZE	0x80000000UL
     58  1.1  thorpej 
     59  1.1  thorpej #define	VERDE_OUT_XLATE_MEM_WIN_SIZE	0x04000000UL
     60  1.1  thorpej #define	VERDE_OUT_XLATE_IO_WIN_SIZE	0x00010000UL
     61  1.1  thorpej 
     62  1.1  thorpej #define	VERDE_OUT_XLATE_MEM_WIN0_BASE	0x80000000UL
     63  1.1  thorpej #define	VERDE_OUT_XLATE_MEM_WIN1_BASE	0x84000000UL
     64  1.1  thorpej 
     65  1.1  thorpej #define	VERDE_OUT_XLATE_IO_WIN0_BASE	0x90000000UL
     66  1.1  thorpej 
     67  1.1  thorpej #define	VERDE_EXTMEM_BASE		0x90020000UL
     68  1.1  thorpej 
     69  1.1  thorpej #define	VERDE_PMMR_BASE			0xffffe000UL
     70  1.1  thorpej #define	VERDE_PMMR_SIZE			0x00000900UL
     71  1.1  thorpej 
     72  1.1  thorpej /*
     73  1.1  thorpej  * Peripheral Memory Mapped Registers.  Defined as offsets
     74  1.1  thorpej  * from the VERDE_PMMR_BASE.
     75  1.1  thorpej  */
     76  1.1  thorpej #define	VERDE_ATU_BASE			0x0100
     77  1.1  thorpej #define	VERDE_ATU_SIZE			0x0100
     78  1.1  thorpej 
     79  1.2  thorpej #define	VERDE_DMA_BASE			0x0400
     80  1.2  thorpej #define	VERDE_DMA_SIZE			0x0100
     81  1.2  thorpej 
     82  1.1  thorpej #define	VERDE_MCU_BASE			0x0500
     83  1.1  thorpej #define	VERDE_MCU_SIZE			0x0100
     84  1.1  thorpej 
     85  1.3  thorpej #define	VERDE_AAU_BASE			0x0800
     86  1.3  thorpej #define	VERDE_AAU_SIZE			0x0100
     87  1.3  thorpej 
     88  1.1  thorpej /*
     89  1.1  thorpej  * Address Translation Unit
     90  1.1  thorpej  */
     91  1.1  thorpej 	/* 0x00 - 0x38 -- PCI configuration space header */
     92  1.1  thorpej #define	ATU_IALR0	0x40	/* Inbound ATU Limit 0 */
     93  1.1  thorpej #define	ATU_IATVR0	0x44	/* Inbound ATU Xlate Value 0 */
     94  1.1  thorpej #define	ATU_ERLR	0x48	/* Expansion ROM Limit */
     95  1.1  thorpej #define	ATU_ERTVR	0x4c	/* Expansion ROM Xlate Value */
     96  1.1  thorpej #define	ATU_IALR1	0x50	/* Inbound ATU Limit 1 */
     97  1.1  thorpej #define	ATU_IALR2	0x54	/* Inbound ATU Limit 2 */
     98  1.1  thorpej #define	ATU_IATVR2	0x58	/* Inbound ATU Xlate Value 2 */
     99  1.1  thorpej #define	ATU_OIOWTVR	0x5c	/* Outbound I/O Window Xlate Value */
    100  1.1  thorpej #define	ATU_OMWTVR0	0x60	/* Outbound Mem Window Xlate Value 0 */
    101  1.1  thorpej #define	ATU_OUMWTVR0	0x64	/* Outbound Mem Window Xlate Value 0 Upper */
    102  1.1  thorpej #define	ATU_OMWTVR1	0x68	/* Outbound Mem Window Xlate Value 1 */
    103  1.1  thorpej #define	ATU_OUMWTVR1	0x6c	/* Outbound Mem Window Xlate Value 1 Upper */
    104  1.1  thorpej #define	ATU_OUDWTVR	0x78	/* Outbound Mem Direct Xlate Value Upper */
    105  1.1  thorpej #define	ATU_ATUCR	0x80	/* ATU Configuration */
    106  1.1  thorpej #define	ATU_PCSR	0x84	/* PCI Configuration and Status */
    107  1.1  thorpej #define	ATU_ATUISR	0x88	/* ATU Interrupt Status */
    108  1.1  thorpej #define	ATU_ATUIMR	0x8c	/* ATU Interrupt Mask */
    109  1.1  thorpej #define	ATU_IABAR3	0x90	/* Inbound ATU Base Address 3 */
    110  1.1  thorpej #define	ATU_IAUBAR3	0x94	/* Inbound ATU Base Address 3 Upper */
    111  1.1  thorpej #define	ATU_IALR3	0x98	/* Inbound ATU Limit 3 */
    112  1.1  thorpej #define	ATU_IATVR3	0x9c	/* Inbound ATU Xlate Value 3 */
    113  1.1  thorpej #define	ATU_OCCAR	0xa4	/* Outbound Configuration Cycle Address */
    114  1.1  thorpej #define	ATU_OCCDR	0xac	/* Outbound Configuration Cycle Data */
    115  1.1  thorpej #define	ATU_MSI_PORT	0xb4	/* MSI port */
    116  1.1  thorpej #define	ATU_PDSCR	0xbc	/* PCI Bus Drive Strength Control */
    117  1.1  thorpej #define	ATU_PCI_X_CAP_ID 0xe0	/* (1) */
    118  1.1  thorpej #define	ATU_PCI_X_NEXT	0xe1	/* (1) */
    119  1.1  thorpej #define	ATU_PCIXCMD	0xe2	/* PCI-X Command Register (2) */
    120  1.1  thorpej #define	ATU_PCIXSR	0xe4	/* PCI-X Status Register */
    121  1.1  thorpej 
    122  1.1  thorpej #define	ATUCR_DRC_ALIAS		(1U << 19)
    123  1.1  thorpej #define	ATUCR_DAU2GXEN		(1U << 18)
    124  1.1  thorpej #define	ATUCR_P_SERR_MA		(1U << 16)
    125  1.1  thorpej #define	ATUCR_DTS		(1U << 15)
    126  1.1  thorpej #define	ATUCR_P_SERR_DIE	(1U << 9)
    127  1.1  thorpej #define	ATUCR_DAE		(1U << 8)
    128  1.1  thorpej #define	ATUCR_BIST_IE		(1U << 3)
    129  1.1  thorpej #define	ATUCR_OUT_EN		(1U << 1)
    130  1.1  thorpej 
    131  1.1  thorpej #define	PCSR_DAAAPE		(1U << 18)
    132  1.1  thorpej #define	PCSR_PCI_X_CAP		(3U << 16)
    133  1.1  thorpej #define	PCSR_PCI_X_CAP_BORING	(0 << 16)
    134  1.1  thorpej #define	PCSR_PCI_X_CAP_66	(1U << 16)
    135  1.1  thorpej #define	PCSR_PCI_X_CAP_100	(2U << 16)
    136  1.1  thorpej #define	PCSR_PCI_X_CAP_133	(3U << 16)
    137  1.1  thorpej #define	PCSR_OTQB		(1U << 15)
    138  1.1  thorpej #define	PCSR_IRTQB		(1U << 14)
    139  1.1  thorpej #define	PCSR_DTV		(1U << 12)
    140  1.1  thorpej #define	PCSR_BUS66		(1U << 10)
    141  1.1  thorpej #define	PCSR_BUS64		(1U << 8)
    142  1.1  thorpej #define	PCSR_RIB		(1U << 5)
    143  1.1  thorpej #define	PCSR_RPB		(1U << 4)
    144  1.1  thorpej #define	PCSR_CCR		(1U << 2)
    145  1.1  thorpej #define	PCSR_CPR		(1U << 1)
    146  1.1  thorpej 
    147  1.1  thorpej #define	ATUISR_IMW1BU		(1U << 14)
    148  1.1  thorpej #define	ATUISR_ISCEM		(1U << 13)
    149  1.1  thorpej #define	ATUISR_RSCEM		(1U << 12)
    150  1.1  thorpej #define	ATUISR_PST		(1U << 11)
    151  1.1  thorpej #define	ATUISR_P_SERR_ASRT	(1U << 10)
    152  1.1  thorpej #define	ATUISR_DPE		(1U << 9)
    153  1.1  thorpej #define	ATUISR_BIST		(1U << 8)
    154  1.1  thorpej #define	ATUISR_IBMA		(1U << 7)
    155  1.1  thorpej #define	ATUISR_P_SERR_DET	(1U << 4)
    156  1.1  thorpej #define	ATUISR_PMA		(1U << 3)
    157  1.1  thorpej #define	ATUISR_PTAM		(1U << 2)
    158  1.1  thorpej #define	ATUISR_PTAT		(1U << 1)
    159  1.1  thorpej #define	ATUISR_PMPE		(1U << 0)
    160  1.1  thorpej 
    161  1.1  thorpej #define	ATUIMR_IMW1BU		(1U << 11)
    162  1.1  thorpej #define	ATUIMR_ISCEM		(1U << 10)
    163  1.1  thorpej #define	ATUIMR_RSCEM		(1U << 9)
    164  1.1  thorpej #define	ATUIMR_PST		(1U << 8)
    165  1.1  thorpej #define	ATUIMR_DPE		(1U << 7)
    166  1.1  thorpej #define	ATUIMR_P_SERR_ASRT	(1U << 6)
    167  1.1  thorpej #define	ATUIMR_PMA		(1U << 5)
    168  1.1  thorpej #define	ATUIMR_PTAM		(1U << 4)
    169  1.1  thorpej #define	ATUIMR_PTAT		(1U << 3)
    170  1.1  thorpej #define	ATUIMR_PMPE		(1U << 2)
    171  1.1  thorpej #define	ATUIMR_IE_SERR_EN	(1U << 1)
    172  1.1  thorpej #define	ATUIMR_ECC_TAE		(1U << 0)
    173  1.1  thorpej 
    174  1.1  thorpej #define	PCIXCMD_MOST_1		(0 << 4)
    175  1.1  thorpej #define	PCIXCMD_MOST_2		(1 << 4)
    176  1.1  thorpej #define	PCIXCMD_MOST_3		(2 << 4)
    177  1.1  thorpej #define	PCIXCMD_MOST_4		(3 << 4)
    178  1.1  thorpej #define	PCIXCMD_MOST_8		(4 << 4)
    179  1.1  thorpej #define	PCIXCMD_MOST_12		(5 << 4)
    180  1.1  thorpej #define	PCIXCMD_MOST_16		(6 << 4)
    181  1.1  thorpej #define	PCIXCMD_MOST_32		(7 << 4)
    182  1.1  thorpej #define	PCIXCMD_MOST_MASK	(7 << 4)
    183  1.1  thorpej #define	PCIXCMD_MMRBC_512	(0 << 2)
    184  1.1  thorpej #define	PCIXCMD_MMRBC_1024	(1 << 2)
    185  1.1  thorpej #define	PCIXCMD_MMRBC_2048	(2 << 2)
    186  1.1  thorpej #define	PCIXCMD_MMRBC_4096	(3 << 2)
    187  1.1  thorpej #define	PCIXCMD_MMRBC_MASK	(3 << 2)
    188  1.1  thorpej #define	PCIXCMD_ERO		(1U << 1)
    189  1.1  thorpej #define	PCIXCMD_DPERE		(1U << 0)
    190  1.1  thorpej 
    191  1.1  thorpej #define	PCIXSR_RSCEM		(1U << 29)
    192  1.1  thorpej #define	PCIXSR_DMCRS_MASK	(7 << 26)
    193  1.1  thorpej #define	PCIXSR_DMOST_MASK	(7 << 23)
    194  1.1  thorpej #define	PCIXSR_COMPLEX		(1U << 20)
    195  1.1  thorpej #define	PCIXSR_USC		(1U << 19)
    196  1.1  thorpej #define	PCIXSR_SCD		(1U << 18)
    197  1.1  thorpej #define	PCIXSR_133_CAP		(1U << 17)
    198  1.1  thorpej #define	PCIXSR_32PCI		(1U << 16)	/* 0 = 32, 1 = 64 */
    199  1.1  thorpej #define	PCIXSR_BUSNO(x)		(((x) & 0xff) >> 8)
    200  1.1  thorpej #define	PCIXSR_DEVNO(x)		(((x) & 0x1f) >> 3)
    201  1.1  thorpej #define	PCIXSR_FUNCNO(x)	((x) & 0x7)
    202  1.1  thorpej 
    203  1.1  thorpej /*
    204  1.1  thorpej  * Memory Controller Unit
    205  1.1  thorpej  */
    206  1.1  thorpej #define	MCU_SDIR		0x00	/* DDR SDRAM Init. Register */
    207  1.1  thorpej #define	MCU_SDCR		0x04	/* DDR SDRAM Control Register */
    208  1.1  thorpej #define	MCU_SDBR		0x08	/* SDRAM Base Register */
    209  1.1  thorpej #define	MCU_SBR0		0x0c	/* SDRAM Boundary 0 */
    210  1.1  thorpej #define	MCU_SBR1		0x10	/* SDRAM Boundary 1 */
    211  1.1  thorpej #define	MCU_ECCR		0x34	/* ECC Control Register */
    212  1.1  thorpej #define	MCU_ELOG0		0x38	/* ECC Log 0 */
    213  1.1  thorpej #define	MCU_ELOG1		0x3c	/* ECC Log 1 */
    214  1.1  thorpej #define	MCU_ECAR0		0x40	/* ECC address 0 */
    215  1.1  thorpej #define	MCU_ECAR1		0x44	/* ECC address 1 */
    216  1.1  thorpej #define	MCU_ECTST		0x48	/* ECC test register */
    217  1.1  thorpej #define	MCU_MCISR		0x4c	/* MCU Interrupt Status Register */
    218  1.1  thorpej #define	MCU_RFR			0x50	/* Refresh Frequency Register */
    219  1.1  thorpej #define	MCU_DBUDSR		0x54	/* Data Bus Pull-up Drive Strength */
    220  1.1  thorpej #define	MCU_DBDDSR		0x58	/* Data Bus Pull-down Drive Strength */
    221  1.1  thorpej #define	MCU_CUDSR		0x5c	/* Clock Pull-up Drive Strength */
    222  1.1  thorpej #define	MCU_CDDSR		0x60	/* Clock Pull-down Drive Strength */
    223  1.1  thorpej #define	MCU_CEUDSR		0x64	/* Clock En Pull-up Drive Strength */
    224  1.1  thorpej #define	MCU_CEDDSR		0x68	/* Clock En Pull-down Drive Strength */
    225  1.1  thorpej #define	MCU_CSUDSR		0x6c	/* Chip Sel Pull-up Drive Strength */
    226  1.1  thorpej #define	MCU_CSDDSR		0x70	/* Chip Sel Pull-down Drive Strength */
    227  1.1  thorpej #define	MCU_REUDSR		0x74	/* Rx En Pull-up Drive Strength */
    228  1.1  thorpej #define	MCU_REDDSR		0x78	/* Rx En Pull-down Drive Strength */
    229  1.1  thorpej #define	MCU_ABUDSR		0x7c	/* Addr Bus Pull-up Drive Strength */
    230  1.1  thorpej #define	MCU_ABDDSR		0x80	/* Addr Bus Pull-down Drive Strength */
    231  1.1  thorpej #define	MCU_DSDR		0x84	/* Data Strobe Delay Register */
    232  1.1  thorpej #define	MCU_REDR		0x88	/* Rx Enable Delay Register */
    233  1.1  thorpej 
    234  1.1  thorpej #define	SDCR_DIMMTYPE		(1U << 1)	/* 0 = unbuf, 1 = reg */
    235  1.1  thorpej #define	SDCR_BUSWIDTH		(1U << 2)	/* 0 = 64, 1 = 32 */
    236  1.1  thorpej 
    237  1.1  thorpej #define	SBRx_TECH		(1U << 31)
    238  1.1  thorpej #define	SBRx_BOUND		0x0000003f
    239  1.1  thorpej 
    240  1.1  thorpej #define	ECCR_SBERE		(1U << 0)
    241  1.1  thorpej #define	ECCR_MBERE		(1U << 1)
    242  1.1  thorpej #define	ECCR_SBECE		(1U << 2)
    243  1.1  thorpej #define	ECCR_ECCEN		(1U << 3)
    244  1.1  thorpej 
    245  1.1  thorpej #define	ELOGx_SYNDROME		0x000000ff
    246  1.1  thorpej #define	ELOGx_ERRTYPE		(1U << 8)	/* 1 = multi-bit */
    247  1.1  thorpej #define	ELOGx_RW		(1U << 12)	/* 1 = write error */
    248  1.1  thorpej 	/*
    249  1.1  thorpej 	 * Dev ID	Func		Requester
    250  1.1  thorpej 	 * 2		0		XScale core
    251  1.1  thorpej 	 * 2		1		ATU
    252  1.1  thorpej 	 * 13		0		DMA channel 0
    253  1.1  thorpej 	 * 13		1		DMA channel 1
    254  1.1  thorpej 	 * 26		0		ATU
    255  1.1  thorpej 	 */
    256  1.1  thorpej #define	ELOGx_REQ_DEV(x)	(((x) >> 19) & 0x1f)
    257  1.1  thorpej #define	ELOGx_REQ_FUNC(x)	(((x) >> 16) & 0x3)
    258  1.1  thorpej 
    259  1.1  thorpej #define	MCISR_ECC_ERR0		(1U << 0)
    260  1.1  thorpej #define	MCISR_ECC_ERR1		(1U << 1)
    261  1.1  thorpej #define	MCISR_ECC_ERRN		(1U << 2)
    262  1.1  thorpej 
    263  1.1  thorpej /*
    264  1.1  thorpej  * Timers
    265  1.1  thorpej  *
    266  1.1  thorpej  * The i80321 timer registers are available in both memory-mapped
    267  1.1  thorpej  * and coprocessor spaces.  Most of the registers are read-only
    268  1.1  thorpej  * if memory-mapped, so we access them via coprocessor space.
    269  1.1  thorpej  *
    270  1.1  thorpej  *	TMR0	cp6 c0,1	0xffffe7e0
    271  1.1  thorpej  *	TMR1	cp6 c1,1	0xffffe7e4
    272  1.1  thorpej  *	TCR0	cp6 c2,1	0xffffe7e8
    273  1.1  thorpej  *	TCR1	cp6 c3,1	0xffffe7ec
    274  1.1  thorpej  *	TRR0	cp6 c4,1	0xffffe7f0
    275  1.1  thorpej  *	TRR1	cp6 c5,1	0xffffe7f4
    276  1.1  thorpej  *	TISR	cp6 c6,1	0xffffe7f8
    277  1.1  thorpej  *	WDTCR	cp6 c7,1	0xffffe7fc
    278  1.1  thorpej  */
    279  1.1  thorpej 
    280  1.1  thorpej #define	TMRx_TC			(1U << 0)
    281  1.1  thorpej #define	TMRx_ENABLE		(1U << 1)
    282  1.1  thorpej #define	TMRx_RELOAD		(1U << 2)
    283  1.1  thorpej #define	TMRx_CSEL_CORE		(0 << 4)
    284  1.1  thorpej #define	TMRx_CSEL_CORE_div4	(1 << 4)
    285  1.1  thorpej #define	TMRx_CSEL_CORE_div8	(2 << 4)
    286  1.1  thorpej #define	TMRx_CSEL_CORE_div16	(3 << 4)
    287  1.1  thorpej 
    288  1.1  thorpej #define	TISR_TMR0		(1U << 0)
    289  1.1  thorpej #define	TISR_TMR1		(1U << 1)
    290  1.1  thorpej 
    291  1.1  thorpej #define	WTDCR_ENABLE1		0x1e1e1e1e
    292  1.1  thorpej #define	WTDCR_ENABLE2		0xe1e1e1e1
    293  1.1  thorpej 
    294  1.1  thorpej /*
    295  1.1  thorpej  * Interrupt Controller Unit.
    296  1.1  thorpej  *
    297  1.1  thorpej  *	INTCTL	cp6 c0,0	0xffffe7d0
    298  1.1  thorpej  *	INTSTR	cp6 c4,0	0xffffe7d4
    299  1.1  thorpej  *	IINTSRC	cp6 c8,0	0xffffe7d8
    300  1.1  thorpej  *	FINTSRC	cp6 c9,0	0xffffe7dc
    301  1.1  thorpej  *	PIRSR			0xffffe2ec
    302  1.1  thorpej  */
    303  1.1  thorpej 
    304  1.1  thorpej #define	ICU_PIRSR		0x02ec
    305  1.1  thorpej #define	ICU_GPOE		0x07c4
    306  1.1  thorpej #define	ICU_GPID		0x07c8
    307  1.1  thorpej #define	ICU_GPOD		0x07cc
    308  1.1  thorpej 
    309  1.1  thorpej /*
    310  1.1  thorpej  * NOTE: WE USE THE `bitXX' BITS TO INDICATE PENDING SOFTWARE
    311  1.1  thorpej  * INTERRUPTS.  See i80321_icu.c
    312  1.1  thorpej  */
    313  1.1  thorpej #define	ICU_INT_HPI		31	/* high priority interrupt */
    314  1.1  thorpej #define	ICU_INT_XINT(x)		((x) + 27) /* external interrupts */
    315  1.1  thorpej #define	ICU_INT_bit26		26
    316  1.1  thorpej #define	ICU_INT_SSP		25	/* SSP serial port */
    317  1.1  thorpej #define	ICU_INT_MUE		24	/* msg unit error */
    318  1.1  thorpej #define	ICU_INT_AAUE		23	/* AAU error */
    319  1.1  thorpej #define	ICU_INT_bit22		22
    320  1.1  thorpej #define	ICU_INT_DMA1E		21	/* DMA Ch 1 error */
    321  1.1  thorpej #define	ICU_INT_DMA0E		20	/* DMA Ch 0 error */
    322  1.1  thorpej #define	ICU_INT_MCUE		19	/* memory controller error */
    323  1.1  thorpej #define	ICU_INT_ATUE		18	/* ATU error */
    324  1.1  thorpej #define	ICU_INT_BIUE		17	/* bus interface unit error */
    325  1.1  thorpej #define	ICU_INT_PMU		16	/* XScale PMU */
    326  1.1  thorpej #define	ICU_INT_PPM		15	/* peripheral PMU */
    327  1.1  thorpej #define	ICU_INT_BIST		14	/* ATU Start BIST */
    328  1.1  thorpej #define	ICU_INT_MU		13	/* messaging unit */
    329  1.1  thorpej #define	ICU_INT_I2C1		12	/* i2c unit 1 */
    330  1.1  thorpej #define	ICU_INT_I2C0		11	/* i2c unit 0 */
    331  1.1  thorpej #define	ICU_INT_TMR1		10	/* timer 1 */
    332  1.1  thorpej #define	ICU_INT_TMR0		9	/* timer 0 */
    333  1.1  thorpej #define	ICU_INT_CPPM		8	/* core processor PMU */
    334  1.1  thorpej #define	ICU_INT_AAU_EOC		7	/* AAU end-of-chain */
    335  1.1  thorpej #define	ICU_INT_AAU_EOT		6	/* AAU end-of-transfer */
    336  1.1  thorpej #define	ICU_INT_bit5		5
    337  1.1  thorpej #define	ICU_INT_bit4		4
    338  1.1  thorpej #define	ICU_INT_DMA1_EOC	3	/* DMA1 end-of-chain */
    339  1.1  thorpej #define	ICU_INT_DMA1_EOT	2	/* DMA1 end-of-transfer */
    340  1.1  thorpej #define	ICU_INT_DMA0_EOC	1	/* DMA0 end-of-chain */
    341  1.1  thorpej #define	ICU_INT_DMA0_EOT	0	/* DMA0 end-of-transfer */
    342  1.1  thorpej 
    343  1.1  thorpej #define	ICU_INT_HWMASK		(0xffffffff & ~(ICU_INT_bit26|ICU_INT_bit22| \
    344  1.1  thorpej 						ICU_INT_bit5|ICU_INT_bit4))
    345  1.2  thorpej 
    346  1.2  thorpej /*
    347  1.2  thorpej  * DMA Controller
    348  1.2  thorpej  */
    349  1.2  thorpej 
    350  1.2  thorpej struct dma_chain_desc {
    351  1.2  thorpej 	uint32_t	dcd_nda;	/* next descriptor address */
    352  1.2  thorpej 	uint32_t	dcd_pad;	/* PCI address (lower) */
    353  1.2  thorpej 	uint32_t	dcd_puad;	/* PCI address (upper) */
    354  1.2  thorpej 	uint32_t	dcd_lad;	/* local address */
    355  1.2  thorpej 	uint32_t	dcd_bc;		/* byte count */
    356  1.2  thorpej 	uint32_t	dcd_dc;		/* descriptor control */
    357  1.2  thorpej } __attribute__((__packed__));
    358  1.2  thorpej 
    359  1.2  thorpej #define	DMA_CHAN1_OFF	0x40		/* offset to channel 1 regs */
    360  1.2  thorpej 
    361  1.2  thorpej #define	DMA_CCR		0x00		/* channel control register */
    362  1.2  thorpej #define	DMA_CSR		0x04		/* channel status register */
    363  1.2  thorpej #define	DMA_DAR		0x0c		/* descriptor address */
    364  1.2  thorpej #define	DMA_DNAR	0x10		/* next descriptor address */
    365  1.2  thorpej #define	DMA_PADR	0x14		/* PCI address (low) */
    366  1.2  thorpej #define	DMA_PUADR	0x18		/* PCI address (high) */
    367  1.2  thorpej #define	DMA_LADR	0x1c		/* local address */
    368  1.2  thorpej #define	DMA_BCR		0x20		/* byte count */
    369  1.2  thorpej #define	DMA_DCR		0x24		/* descriptor control */
    370  1.2  thorpej 
    371  1.2  thorpej #define	DMA_CCR_CE	(1U << 0)	/* channel enable */
    372  1.2  thorpej #define	DMA_CCR_CR	(1U << 1)	/* chain resume */
    373  1.2  thorpej 
    374  1.2  thorpej #define	DMA_SSR_STE	(1U << 1)	/* PCI-X split transaction error */
    375  1.2  thorpej #define	DMA_SSR_TAF	(1U << 2)	/* PCI target abort flag */
    376  1.2  thorpej #define	DMA_SSR_MAF	(1U << 3)	/* PCI master abort flag */
    377  1.2  thorpej #define	DMA_SSR_IBMAF	(1U << 5)	/* Internal bus master abort flag */
    378  1.2  thorpej #define	DMA_SSR_ECIF	(1U << 8)	/* end-of-chain interrupt */
    379  1.2  thorpej #define	DMA_SSR_ETIF	(1U << 9)	/* end-of-transfer interrupt */
    380  1.2  thorpej #define	DMA_SSR_CAF	(1U << 10)	/* channel active flag */
    381  1.2  thorpej 
    382  1.2  thorpej #define	DMA_BCR_MASK	0x00ffffff	/* 24-bit count */
    383  1.2  thorpej 
    384  1.2  thorpej #define	DMA_DCR_TTYPE	0x0000000f	/* PCI transaction type */
    385  1.2  thorpej #define	DMA_DCR_IE	(1U << 4)	/* interrupt enable */
    386  1.2  thorpej #define	DMA_DCR_DACE	(1U << 5)	/* dual address cycle enable */
    387  1.2  thorpej #define	DMA_DCR_MMTE	(1U << 6)	/* memory->memory transfer enable */
    388  1.2  thorpej 
    389  1.2  thorpej #define	DMA_DCR_TTYPE_MR	0x06	/* Memory Read */
    390  1.2  thorpej #define	DMA_DCR_TTYPE_MW	0x07	/* Memory Write */
    391  1.2  thorpej #define	DMA_DCR_TTYPE_MRM	0x0c	/* Memory Read Multiple */
    392  1.2  thorpej #define	DMA_DCR_TTYPE_MRL	0x0e	/* Memory Read Line */
    393  1.2  thorpej #define	DMA_DCR_TTYPE_MW2	0x0f	/* Memory Write */
    394  1.3  thorpej 
    395  1.3  thorpej /*
    396  1.3  thorpej  * Application Accelerator Unit
    397  1.3  thorpej  */
    398  1.3  thorpej 
    399  1.3  thorpej struct aau_chain_princ {
    400  1.3  thorpej 	uint32_t	acd_nda;	/* next descriptor address */
    401  1.3  thorpej 	uint32_t	acd_sar[4];	/* source address 0..3 */
    402  1.3  thorpej 	uint32_t	acd_dar;	/* destination address */
    403  1.3  thorpej 	uint32_t	acd_bc;		/* byte count */
    404  1.3  thorpej 	uint32_t	acd_dc;		/* descriptor control */
    405  1.3  thorpej } __attribute__((__packed__));
    406  1.3  thorpej 
    407  1.3  thorpej struct aau_chain_mini {
    408  1.3  thorpej 	uint32_t	acd_sar[4];	/* source address 4..7 */
    409  1.3  thorpej } __attribute__((__packed__));
    410  1.3  thorpej 
    411  1.3  thorpej struct aau_chain_ext {
    412  1.3  thorpej 	uint32_t	acd_edc;	/* extended descriptor control */
    413  1.3  thorpej 	uint32_t	acd_sar[8];	/* source address n..n+7 */
    414  1.3  thorpej } __attribute__((__packed__));
    415  1.3  thorpej 
    416  1.3  thorpej struct aau_chain_desc8 {
    417  1.3  thorpej 	struct aau_chain_princ acd8_princ;	/* 0..3 */
    418  1.3  thorpej 	struct aau_chain_mini acd8_mini;	/* 4..7 */
    419  1.3  thorpej } __attribute__((__packed__));
    420  1.3  thorpej 
    421  1.3  thorpej struct aau_chain_desc16 {
    422  1.3  thorpej 	struct aau_chain_princ acd16_princ;	/* 0..3 */
    423  1.3  thorpej 	struct aau_chain_mini acd16_mini;	/* 4..7 */
    424  1.3  thorpej 	struct aau_chain_ext acd16_ext0;	/* 8..15 */
    425  1.3  thorpej } __attribute__((__packed__));
    426  1.3  thorpej 
    427  1.3  thorpej struct aau_chain_desc32 {
    428  1.3  thorpej 	struct aau_chain_princ acd32_princ;	/* 0..3 */
    429  1.3  thorpej 	struct aau_chain_mini acd32_mini;	/* 4..7 */
    430  1.3  thorpej 	struct aau_chain_ext acd32_ext0;	/* 8..15 */
    431  1.3  thorpej 	struct aau_chain_ext acd32_ext1;	/* 16..23 */
    432  1.3  thorpej 	struct aau_chain_ext acd32_ext2;	/* 24..31 */
    433  1.3  thorpej } __attribute__((__packed__));
    434  1.3  thorpej 
    435  1.3  thorpej #define	AAU_ACR		0x00		/* accelerator control */
    436  1.3  thorpej #define	AAU_ASR		0x04		/* accelerator status */
    437  1.3  thorpej #define	AAU_ADAR	0x08		/* descriptor address */
    438  1.3  thorpej #define	AAU_ANDAR	0x0c		/* next descriptor address */
    439  1.3  thorpej #define	AAU_DAR		0x20		/* destination address */
    440  1.3  thorpej #define	AAU_ABCR	0x24		/* byte count */
    441  1.3  thorpej #define	AAU_ADCR	0x28		/* descriptor control */
    442  1.3  thorpej #define	AAU_EDCR0	0x3c		/* extended descriptor control 0 */
    443  1.3  thorpej #define	AAU_EDCR1	0x60		/* extended descriptor control 1 */
    444  1.3  thorpej #define	AAU_EDCR2	0x84		/* extended descriptor control 2 */
    445  1.3  thorpej 
    446  1.3  thorpej #define	AAU_ACR_AAE	(1U << 0)	/* accelerator enable */
    447  1.3  thorpej #define	AAU_ACR_CR	(1U << 1)	/* chain resume */
    448  1.3  thorpej #define	AAU_ACR_512	(1U << 2)	/* 512-byte buffer enable */
    449  1.3  thorpej 
    450  1.3  thorpej #define	AAU_ASR_MA	(1U << 5)	/* master abort */
    451  1.3  thorpej #define	AAU_ASR_ECIF	(1U << 8)	/* end of chain interrupt */
    452  1.3  thorpej #define	AAU_ASR_ETIF	(1U << 9)	/* end of transfer interrupt */
    453  1.3  thorpej #define	AAU_ASR_AAF	(1U << 10)	/* acellerator active */
    454  1.3  thorpej 
    455  1.3  thorpej #define	AAU_ABCR_MASK	0x00ffffff	/* 24-bit count */
    456  1.3  thorpej 
    457  1.3  thorpej #define	AAU_CMD_NULL	0		/* disregard this block */
    458  1.3  thorpej #define	AAU_CMD_XOR	1		/* XOR */
    459  1.3  thorpej #define	AAU_CMD_FILL	7		/* block fill */
    460  1.3  thorpej 
    461  1.3  thorpej #define	AAU_ADCR_IE	(1U << 0)	/* interrupt enable */
    462  1.3  thorpej #define	AAU_ADCR_BxCMD(b, x) ((x) << (((b) * 3) + 1)) /* block 0..7 command */
    463  1.3  thorpej #define	AAU_ADCR_SBCI_0	0		/* no supplemental blocks */
    464  1.3  thorpej #define	AAU_ADCR_SBCI_4	(1U << 25)	/* 4 supplemental blocks */
    465  1.3  thorpej #define	AAU_ADCR_SBCI_12 (2U << 25)	/* 12 supplemental blocks */
    466  1.3  thorpej #define	AAU_ADCR_SBCI_28 (3U << 25)	/* 28 supplemental blocks */
    467  1.3  thorpej #define	AAU_ADCR_TC	(1U << 28)	/* transfer complete */
    468  1.3  thorpej #define	AAU_ADCR_PBAD	(1U << 29)	/* computed parity bad */
    469  1.3  thorpej #define	AAU_ADCR_PE	(1U << 30)	/* parity computation enable */
    470  1.3  thorpej #define	AAU_ADCR_DWE	(1U << 31)	/* destination write enable */
    471  1.3  thorpej 
    472  1.3  thorpej #define	AAU_EDCR_BxCMD(b, x) ((x) << (((b) * 3) + 1))
    473  1.1  thorpej 
    474  1.1  thorpej #endif /* _ARM_XSCALE_I80321REG_H_ */
    475