Home | History | Annotate | Line # | Download | only in ibm4xx
dcr403cgx.h revision 1.1
      1  1.1  hannken /*	$NetBSD: dcr403cgx.h,v 1.1 2003/03/11 10:40:17 hannken Exp $	*/
      2  1.1  hannken 
      3  1.1  hannken /*-
      4  1.1  hannken  * Copyright (c) 2003 The NetBSD Foundation, Inc.
      5  1.1  hannken  * All rights reserved.
      6  1.1  hannken  *
      7  1.1  hannken  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1  hannken  * by Juergen Hannken-Illjes.
      9  1.1  hannken  *
     10  1.1  hannken  * Redistribution and use in source and binary forms, with or without
     11  1.1  hannken  * modification, are permitted provided that the following conditions
     12  1.1  hannken  * are met:
     13  1.1  hannken  * 1. Redistributions of source code must retain the above copyright
     14  1.1  hannken  *    notice, this list of conditions and the following disclaimer.
     15  1.1  hannken  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  hannken  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  hannken  *    documentation and/or other materials provided with the distribution.
     18  1.1  hannken  * 3. All advertising materials mentioning features or use of this software
     19  1.1  hannken  *    must display the following acknowledgement:
     20  1.1  hannken  *      This product includes software developed by the NetBSD
     21  1.1  hannken  *      Foundation, Inc. and its contributors.
     22  1.1  hannken  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.1  hannken  *    contributors may be used to endorse or promote products derived
     24  1.1  hannken  *    from this software without specific prior written permission.
     25  1.1  hannken  *
     26  1.1  hannken  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.1  hannken  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.1  hannken  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1  hannken  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1  hannken  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.1  hannken  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.1  hannken  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.1  hannken  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.1  hannken  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.1  hannken  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.1  hannken  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1  hannken  */
     38  1.1  hannken 
     39  1.1  hannken #ifndef _DCR403GCXP_H_
     40  1.1  hannken #define	_DCR403GCXP_H_
     41  1.1  hannken 
     42  1.1  hannken #ifndef _LOCORE
     43  1.1  hannken #define	mtdcr(reg, val)						\
     44  1.1  hannken 	asm volatile("mtdcr %0,%1" : : "K"(reg), "r"(val))
     45  1.1  hannken #define	mfdcr(reg)						\
     46  1.1  hannken 	( { u_int32_t val;					\
     47  1.1  hannken 	  asm volatile("mfdcr %0,%1" : "=r"(val) : "K"(reg));	\
     48  1.1  hannken 	  val; } )
     49  1.1  hannken #endif /* _LOCORE */
     50  1.1  hannken 
     51  1.1  hannken /* Device Control Register declarations */
     52  1.1  hannken 
     53  1.1  hannken #define DCR_EXISR		0x040	/* External Interrupt Status Register */
     54  1.1  hannken #define DCR_EXIER		0x042	/* External Interrupt Enable Register */
     55  1.1  hannken #define DCR_BRH0		0x070	/* Bank Register High 0 */
     56  1.1  hannken #define DCR_BRH1		0x071	/* Bank Register High 1 */
     57  1.1  hannken #define DCR_BRH2		0x072	/* Bank Register High 2 */
     58  1.1  hannken #define DCR_BRH3		0x073	/* Bank Register High 3 */
     59  1.1  hannken #define DCR_BRH4		0x074	/* Bank Register High 4 */
     60  1.1  hannken #define DCR_BRH5		0x075	/* Bank Register High 5 */
     61  1.1  hannken #define DCR_BRH6		0x076	/* Bank Register High 6 */
     62  1.1  hannken #define DCR_BRH7		0x077	/* Bank Register High 7 */
     63  1.1  hannken #define DCR_BR0			0x080	/* Bank Register 0 */
     64  1.1  hannken #define DCR_BR1			0x081	/* Bank Register 1 */
     65  1.1  hannken #define DCR_BR2			0x082	/* Bank Register 2 */
     66  1.1  hannken #define DCR_BR3			0x083	/* Bank Register 3 */
     67  1.1  hannken #define DCR_BR4			0x084	/* Bank Register 4 */
     68  1.1  hannken #define DCR_BR5			0x085	/* Bank Register 5 */
     69  1.1  hannken #define DCR_BR6			0x086	/* Bank Register 6 */
     70  1.1  hannken #define DCR_BR7			0x087	/* Bank Register 7 */
     71  1.1  hannken #define DCR_BEAR		0x090	/* Bus Error Address Register */
     72  1.1  hannken #define DCR_BESR		0x091	/* Bus Error Syndrome Register */
     73  1.1  hannken #define DCR_IOCR		0x0a0	/* I/O Configuration Register */
     74  1.1  hannken #define DCR_DMACR0		0x0c0	/* DMA Channel Control Register 0 */
     75  1.1  hannken #define DCR_DMACT0		0x0c1	/* DMA Count Register 0 */
     76  1.1  hannken #define DCR_DMADA0		0x0c2	/* DMA Destination Address Reg. 0 */
     77  1.1  hannken #define DCR_DMASA0		0x0c3	/* DMA Source Address Register 0 */
     78  1.1  hannken #define DCR_DMACC0		0x0c4	/* DMA Chained Count 0 */
     79  1.1  hannken #define DCR_DMACR1		0x0c8	/* DMA Channel Control Register 1 */
     80  1.1  hannken #define DCR_DMACT1		0x0c9	/* DMA Count Register 1 */
     81  1.1  hannken #define DCR_DMADA1		0x0cA	/* DMA Destination Address Reg. 1 */
     82  1.1  hannken #define DCR_DMACC1		0x0cC	/* DMA Chained Count 1 */
     83  1.1  hannken #define DCR_DMASA1		0x0cb	/* DMA Source Address Register 1 */
     84  1.1  hannken #define DCR_DMACR2		0x0d0	/* DMA Channel Control Register 2 */
     85  1.1  hannken #define DCR_DMACT2		0x0d1	/* DMA Count Register 2 */
     86  1.1  hannken #define DCR_DMADA2		0x0d2	/* DMA Destination Address Reg. 2 */
     87  1.1  hannken #define DCR_DMASA2		0x0d3	/* DMA Source Address Register 2 */
     88  1.1  hannken #define DCR_DMACC2		0x0d4	/* DMA Chained Count 2 */
     89  1.1  hannken #define DCR_DMACR3		0x0d8	/* DMA Channel Control Register 3 */
     90  1.1  hannken #define DCR_DMACT3		0x0d9	/* DMA Count Register 3 */
     91  1.1  hannken #define DCR_DMADA3		0x0da	/* DMA Destination Address Reg. 3 */
     92  1.1  hannken #define DCR_DMASA3		0x0db	/* DMA Source Address Register 3 */
     93  1.1  hannken #define DCR_DMACC3		0x0dc	/* DMA Chained Count 3 */
     94  1.1  hannken #define DCR_DMASR		0x0e0	/* DMA Status Register */
     95  1.1  hannken 
     96  1.1  hannken #endif /* _DCR403GCXP_H_ */
     97