Home | History | Annotate | Line # | Download | only in tx
tx39icureg.h revision 1.3.4.1
      1  1.3.4.1  nathanw /*	$NetBSD: tx39icureg.h,v 1.3.4.1 2001/06/21 19:24:29 nathanw Exp $ */
      2      1.1      uch 
      3      1.3      uch /*-
      4      1.3      uch  * Copyright (c) 1999 The NetBSD Foundation, Inc.
      5      1.1      uch  * All rights reserved.
      6      1.1      uch  *
      7      1.3      uch  * This code is derived from software contributed to The NetBSD Foundation
      8      1.3      uch  * by UCHIYAMA Yasushi.
      9      1.3      uch  *
     10      1.1      uch  * Redistribution and use in source and binary forms, with or without
     11      1.1      uch  * modification, are permitted provided that the following conditions
     12      1.1      uch  * are met:
     13      1.1      uch  * 1. Redistributions of source code must retain the above copyright
     14      1.1      uch  *    notice, this list of conditions and the following disclaimer.
     15      1.3      uch  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.3      uch  *    notice, this list of conditions and the following disclaimer in the
     17      1.3      uch  *    documentation and/or other materials provided with the distribution.
     18      1.3      uch  * 3. All advertising materials mentioning features or use of this software
     19      1.3      uch  *    must display the following acknowledgement:
     20      1.3      uch  *        This product includes software developed by the NetBSD
     21      1.3      uch  *        Foundation, Inc. and its contributors.
     22      1.3      uch  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.3      uch  *    contributors may be used to endorse or promote products derived
     24      1.3      uch  *    from this software without specific prior written permission.
     25      1.1      uch  *
     26      1.3      uch  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.3      uch  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.3      uch  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.3      uch  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.3      uch  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.3      uch  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.3      uch  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.3      uch  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.3      uch  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.3      uch  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.3      uch  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1      uch  */
     38      1.3      uch 
     39      1.1      uch /*
     40      1.1      uch  *  TOSHIBA TMPR3912/3922 interrupt module.
     41      1.1      uch  */
     42      1.1      uch #ifdef TX391X
     43      1.1      uch #define TX39_INTRSET_MAX	5
     44      1.1      uch #endif /* TX391X */
     45      1.1      uch #ifdef TX392X
     46      1.1      uch #define TX39_INTRSET_MAX	8
     47      1.1      uch #endif /* TX391X */
     48      1.1      uch 
     49      1.1      uch #define TX39_IRQHIGH_MAX	16
     50      1.1      uch /* R */
     51      1.1      uch #define	TX39_INTRSTATUS1_REG	0x100
     52      1.1      uch #define	TX39_INTRSTATUS2_REG	0x104
     53      1.1      uch #define	TX39_INTRSTATUS3_REG	0x108
     54      1.1      uch #define	TX39_INTRSTATUS4_REG	0x10c
     55      1.1      uch #define	TX39_INTRSTATUS5_REG	0x110
     56      1.1      uch #define	TX39_INTRSTATUS6_REG	0x114
     57      1.1      uch #ifdef TX392X
     58      1.1      uch #define	TX39_INTRSTATUS7_REG	0x130
     59      1.1      uch #define TX39_INTRSTATUS8_REG	0x138
     60      1.1      uch #endif /* TX392X */
     61      1.1      uch #ifdef TX391X
     62      1.1      uch #define TX39_INTRSTATUS_REG(x)	(((x) - 1) * 4 + TX39_INTRSTATUS1_REG)
     63      1.1      uch #endif /* TX391X */
     64      1.1      uch #ifdef TX392X
     65  1.3.4.1  nathanw #define TX39_INTRSTATUS_REG(x)	(((x) <= 6) ?				\
     66  1.3.4.1  nathanw 	(((x) - 1) * 4 + TX39_INTRSTATUS1_REG) :			\
     67      1.1      uch 	(((x) - 7) * 8 + TX39_INTRSTATUS7_REG))
     68      1.1      uch #endif /* TX392X */
     69      1.1      uch 
     70      1.1      uch /* W */
     71      1.1      uch #define	TX39_INTRCLEAR1_REG	0x100
     72      1.1      uch #define	TX39_INTRCLEAR2_REG	0x104
     73      1.1      uch #define	TX39_INTRCLEAR3_REG	0x108
     74      1.1      uch #define	TX39_INTRCLEAR4_REG	0x10c
     75      1.1      uch #define	TX39_INTRCLEAR5_REG	0x110
     76      1.1      uch #ifdef TX392X
     77      1.1      uch #define	TX39_INTRCLEAR7_REG	0x130
     78      1.1      uch #define TX39_INTRCLEAR8_REG	0x138
     79      1.1      uch #endif /* TX392X */
     80      1.1      uch #ifdef TX391X
     81      1.1      uch #define TX39_INTRCLEAR_REG(x)	(((x) - 1) * 4 + TX39_INTRCLEAR1_REG)
     82      1.1      uch #endif /* TX391X */
     83      1.1      uch #ifdef TX392X
     84  1.3.4.1  nathanw #define TX39_INTRCLEAR_REG(x)	(((x) <= 6) ?				\
     85  1.3.4.1  nathanw 	(((x) - 1) * 4 + TX39_INTRCLEAR1_REG) :				\
     86      1.1      uch 	(((x) - 7) * 8 + TX39_INTRCLEAR7_REG))
     87      1.1      uch #endif /* TX392X */
     88      1.1      uch 
     89      1.1      uch /* R/W */
     90      1.1      uch #define	TX39_INTRENABLE1_REG	0x118
     91      1.1      uch #define	TX39_INTRENABLE2_REG	0x11c
     92      1.1      uch #define	TX39_INTRENABLE3_REG	0x120
     93      1.1      uch #define	TX39_INTRENABLE4_REG	0x124
     94      1.1      uch #define	TX39_INTRENABLE5_REG	0x128
     95      1.1      uch #define	TX39_INTRENABLE6_REG	0x12c
     96      1.1      uch #ifdef TX392X
     97      1.1      uch #define	TX39_INTRENABLE7_REG	0x134
     98      1.1      uch #define	TX39_INTRENABLE8_REG	0x13c
     99      1.1      uch #endif /* TX392X */
    100      1.1      uch #ifdef TX391X
    101      1.1      uch #define TX39_INTRENABLE_REG(x)	(((x) - 1) * 4 + TX39_INTRENABLE1_REG)
    102      1.1      uch #endif /* TX391X */
    103      1.1      uch #ifdef TX392X
    104  1.3.4.1  nathanw #define TX39_INTRENABLE_REG(x)	(((x) <= 6) ?				\
    105  1.3.4.1  nathanw 	(((x) - 1) * 4 + TX39_INTRENABLE1_REG) :			\
    106      1.1      uch 	(((x) - 7) * 8 + TX39_INTRENABLE7_REG))
    107      1.1      uch #endif /* TX392X */
    108      1.1      uch /*
    109      1.1      uch  *	IRQLOW
    110      1.1      uch  */
    111      1.1      uch /*
    112      1.1      uch  *	Interrupt status/clear 1 register.
    113      1.1      uch  *		  -> Enable 1 register
    114      1.1      uch  */
    115      1.1      uch /* R/W */
    116      1.1      uch #ifdef TX391X
    117      1.1      uch #define	TX39_INTRSTATUS1_LCDINT		0x80000000
    118      1.1      uch #define TX39_INTRSTATUS1_DFINT		0x40000000
    119      1.1      uch #endif /* TX391X */
    120      1.1      uch #define TX39_INTRSTATUS1_CHI0_5INT	0x20000000
    121      1.1      uch #define TX39_INTRSTATUS1_CHI1_0INT	0x10000000
    122      1.1      uch #define TX39_INTRSTATUS1_CHIDMACNTINT	0x08000000
    123      1.1      uch #define TX39_INTRSTATUS1_CHININTA	0x04000000
    124      1.1      uch #define TX39_INTRSTATUS1_CHININTB	0x02000000
    125      1.1      uch #define TX39_INTRSTATUS1_CHIACTINT	0x01000000
    126      1.1      uch #define TX39_INTRSTATUS1_CHIERRINT	0x00800000
    127      1.1      uch #define TX39_INTRSTATUS1_SND0_5INT	0x00400000
    128      1.1      uch #define TX39_INTRSTATUS1_SND1_0INT	0x00200000
    129      1.1      uch #define TX39_INTRSTATUS1_TEL0_5INT	0x00100000
    130      1.1      uch #define TX39_INTRSTATUS1_TEL1_0INT	0x00080000
    131      1.1      uch #define TX39_INTRSTATUS1_SNDDMACNTINT	0x00040000
    132      1.1      uch #define TX39_INTRSTATUS1_TELDMACNTINT	0x00020000
    133      1.1      uch #define TX39_INTRSTATUS1_LSNDCLIPINT	0x00010000
    134      1.1      uch #define TX39_INTRSTATUS1_RSNDCLIPINT	0x00008000
    135      1.1      uch #define TX39_INTRSTATUS1_VALSNDPOSINT	0x00004000
    136      1.1      uch #define TX39_INTRSTATUS1_VALSNDNEGINT	0x00002000
    137      1.1      uch #define TX39_INTRSTATUS1_VALTELPOSINT	0x00001000
    138      1.1      uch #define TX39_INTRSTATUS1_VALTELNEGINT	0x00000800
    139      1.1      uch #define TX39_INTRSTATUS1_SNDININT	0x00000400
    140      1.1      uch #define TX39_INTRSTATUS1_TELININT	0x00000200
    141      1.1      uch #define TX39_INTRSTATUS1_SIBSF0INT	0x00000100
    142      1.1      uch #define TX39_INTRSTATUS1_SIBSF1INT	0x00000080
    143      1.1      uch #define TX39_INTRSTATUS1_SIBIRQPOSINT	0x00000040
    144      1.1      uch #define TX39_INTRSTATUS1_SIBIRQNEGINT	0x00000020
    145      1.1      uch 
    146      1.1      uch #ifdef TX391X
    147      1.1      uch #define TX39_INTRSTATUS1_VIDEO		0xc0000000
    148      1.1      uch #endif /* TX391X */
    149      1.1      uch #define TX39_INTRSTATUS1_CHI		0x3f800000
    150      1.1      uch #define TX39_INTRSTATUS1_SND		0x007ffe00
    151      1.1      uch #define TX39_INTRSTATUS1_SIB		0x000001e0
    152      1.1      uch 
    153      1.1      uch /*
    154      1.1      uch  *	Interrupt status/clear 2 register.
    155      1.1      uch  *		  -> Enable 2 register
    156      1.1      uch  */
    157      1.1      uch /* R/W */
    158      1.1      uch #define	TX39_INTRSTATUS2_UARTARXINT		0x80000000
    159      1.1      uch #define TX39_INTRSTATUS2_UARTARXOVERRUNINT	0x40000000
    160      1.1      uch #define TX39_INTRSTATUS2_UARTAFRAMEERRINT	0x20000000
    161      1.1      uch #define TX39_INTRSTATUS2_UARTABREAKINT		0x10000000
    162      1.1      uch #define TX39_INTRSTATUS2_UARTAPARITYERRINT	0x08000000
    163      1.1      uch #define TX39_INTRSTATUS2_UARTATXINT		0x04000000
    164      1.1      uch #define TX39_INTRSTATUS2_UARTATXOVERRUNINT	0x02000000
    165      1.1      uch #define TX39_INTRSTATUS2_UARTAEMPTYINT		0x01000000
    166      1.1      uch #define TX39_INTRSTATUS2_UARTADMAFULLINT	0x00800000
    167      1.1      uch #define TX39_INTRSTATUS2_UARTADMAHALFINT	0x00400000
    168      1.2      uch 
    169      1.1      uch #define TX39_INTRSTATUS2_UARTBRXINT		0x00200000
    170      1.1      uch #define TX39_INTRSTATUS2_UARTBRXOVERRUNINT	0x00100000
    171      1.1      uch #define TX39_INTRSTATUS2_UARTBFRAMEERRINT	0x00080000
    172      1.1      uch #define TX39_INTRSTATUS2_UARTBBREAKINT		0x00040000
    173      1.1      uch #define TX39_INTRSTATUS2_UARTBPARITYERRINT	0x00020000
    174      1.1      uch #define TX39_INTRSTATUS2_UARTBTXINT		0x00010000
    175      1.1      uch #define TX39_INTRSTATUS2_UARTBTXOVERRUNINT	0x00008000
    176      1.1      uch #define TX39_INTRSTATUS2_UARTBEMPTYINT		0x00004000
    177      1.1      uch #define TX39_INTRSTATUS2_UARTBDMAFULLINT	0x00002000
    178      1.1      uch #define TX39_INTRSTATUS2_UARTBDMAHALFINT	0x00001000
    179      1.2      uch 
    180  1.3.4.1  nathanw #define	TX39_INTRSTATUS2_UARTRXINT(x)					\
    181  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBRXINT :				\
    182      1.2      uch 	 TX39_INTRSTATUS2_UARTARXINT)
    183  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTRXOVERRUNINT(x)				\
    184  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBRXOVERRUNINT :			\
    185      1.2      uch 	 TX39_INTRSTATUS2_UARTARXOVERRUNINT)
    186  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTFRAMEERRINT(x)				\
    187  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBFRAMEERRINT :			\
    188      1.2      uch 	 TX39_INTRSTATUS2_UARTAFRAMEERRINT)
    189  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTBREAKINT(x)				\
    190  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBBREAKINT :				\
    191      1.2      uch 	TX39_INTRSTATUS2_UARTABREAKINT)
    192  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTPARITYERRINT(x)				\
    193  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBPARITYERRINT :			\
    194      1.2      uch 	 TX39_INTRSTATUS2_UARTAPARITYERRINT)
    195  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTTXINT(x)					\
    196  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBTXINT :				\
    197      1.2      uch 	TX39_INTRSTATUS2_UARTATXINT)
    198  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTTXOVERRUNINT(x)				\
    199  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBTXOVERRUNINT :			\
    200      1.2      uch 	TX39_INTRSTATUS2_UARTATXOVERRUNINT)
    201  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTEMPTYINT(x)				\
    202  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBEMPTYINT :				\
    203      1.2      uch 	TX39_INTRSTATUS2_UARTEMPTYINT)
    204  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTDMAFULLINT(x)				\
    205  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBDMAFULLINT :			\
    206      1.2      uch 	TX39_INTRSTATUS2_UARTADMAFULLINT)
    207  1.3.4.1  nathanw #define TX39_INTRSTATUS2_UARTDMAHALFINT(x)				\
    208  1.3.4.1  nathanw 	((x) ? TX39_INTRSTATUS2_UARTBDMAHALFINT :			\
    209      1.2      uch 	TX39_INTRSTATUS2_UARTADMAHALFINT)
    210      1.2      uch 
    211      1.1      uch #ifdef TX391X
    212      1.1      uch #define TX39_INTRSTATUS2_MBUSTXBUFAVAILINT	0x00000800
    213      1.1      uch #define TX39_INTRSTATUS2_MBUSTXERRINT		0x00000400
    214      1.1      uch #define TX39_INTRSTATUS2_MBUSEMPTYINT		0x00000200
    215      1.1      uch #define TX39_INTRSTATUS2_MBUSRXBUFAVAILINT	0x00000100
    216      1.1      uch #define TX39_INTRSTATUS2_MBUSRXERRINT		0x00000080
    217      1.1      uch #define TX39_INTRSTATUS2_MBUSDETINT		0x00000040
    218      1.1      uch #define TX39_INTRSTATUS2_MBUSDMAFULLINT		0x00000020
    219      1.1      uch #define TX39_INTRSTATUS2_MBUSDMAHALFINT		0x00000010
    220      1.1      uch #define TX39_INTRSTATUS2_MBUSPOSINT		0x00000008
    221      1.1      uch #define TX39_INTRSTATUS2_MBUSNEGINT		0x00000004
    222      1.1      uch #endif /* TX391X */
    223      1.1      uch 
    224      1.1      uch #define TX39_INTRSTATUS2_UARTA			0xffc00000
    225      1.1      uch #define TX39_INTRSTATUS2_UARTB			0x003ff000
    226      1.1      uch #ifdef TX391X
    227      1.1      uch #define TX39_INTRSTATUS2_MBUS			0x00000ffc
    228      1.1      uch #endif /* TX391X */
    229      1.1      uch /*
    230      1.1      uch  *	Interrupt status/clear 3 register. (Multifunction I/O pin)
    231      1.1      uch  *		  -> Enable 3 register
    232      1.1      uch  */
    233      1.1      uch /* R/W */
    234      1.1      uch #define TX39_INTRSTATUS3_MFIOPOSINT(r)	((r) << 1)
    235      1.1      uch 
    236      1.1      uch #define TX39_INTRSTATUS3_CHIFSPOSINT		0x80000000
    237      1.1      uch #define TX39_INTRSTATUS3_CHICLKPOSINT		0x40000000
    238      1.1      uch #define TX39_INTRSTATUS3_CHIDOUTPOSINT		0x20000000
    239      1.1      uch #define TX39_INTRSTATUS3_CHIDINPOSINT		0x10000000
    240      1.1      uch #define TX39_INTRSTATUS3_DREQPOSINT		0x08000000
    241      1.1      uch #define TX39_INTRSTATUS3_DGRINTPOSINT		0x04000000
    242      1.1      uch #define TX39_INTRSTATUS3_BC32KPOSINT		0x02000000
    243      1.1      uch #define TX39_INTRSTATUS3_TXDPOSINT		0x01000000
    244      1.1      uch #define TX39_INTRSTATUS3_RXDPOSINT		0x00800000
    245      1.1      uch #define TX39_INTRSTATUS3_CS1POSINT		0x00400000
    246      1.1      uch #define TX39_INTRSTATUS3_CS2POSINT		0x00200000
    247      1.1      uch #define TX39_INTRSTATUS3_CS3POSINT		0x00100000
    248      1.1      uch #define TX39_INTRSTATUS3_MCS0POSINT		0x00080000
    249      1.1      uch #define TX39_INTRSTATUS3_MCS1POSINT		0x00040000
    250      1.1      uch #define TX39_INTRSTATUS3_MCS2POSINT		0x00020000
    251      1.1      uch #define TX39_INTRSTATUS3_MCS3POSINT		0x00010000
    252      1.1      uch #define TX39_INTRSTATUS3_SPICLKPOSINT		0x00008000
    253      1.1      uch #define TX39_INTRSTATUS3_SPIOUTPOSINT		0x00004000
    254      1.1      uch #define TX39_INTRSTATUS3_SPINPOSINT		0x00002000
    255      1.1      uch #define TX39_INTRSTATUS3_SIBMCLKPOSINT		0x00001000
    256      1.1      uch #define TX39_INTRSTATUS3_CARDREGPOSINT		0x00000800
    257      1.1      uch #define TX39_INTRSTATUS3_CARDIOWRPOSINT		0x00000400
    258      1.1      uch #define TX39_INTRSTATUS3_CARDIORDPOSINT		0x00000200
    259      1.1      uch #define TX39_INTRSTATUS3_CARD1CSLPOSINT		0x00000100
    260      1.1      uch #define TX39_INTRSTATUS3_CARD1CSHPOSINT		0x00000080
    261      1.1      uch #define TX39_INTRSTATUS3_CARD2CSLPOSINT		0x00000040
    262      1.1      uch #define TX39_INTRSTATUS3_CARD2CSHPOSINT		0x00000020
    263      1.1      uch #define TX39_INTRSTATUS3_CARD1WAITPOSINT	0x00000010
    264      1.1      uch #define TX39_INTRSTATUS3_CARD2WAITPOSINT	0x00000008
    265      1.1      uch #define TX39_INTRSTATUS3_CARDDIRPOSINT		0x00000004
    266      1.1      uch 
    267      1.1      uch /*
    268      1.1      uch  *	Interrupt status/clear 4 register. (Multifunction I/O pin)
    269      1.1      uch  *		  -> Enable 4 register
    270      1.1      uch  */
    271      1.1      uch /* R/W */
    272      1.1      uch #define TX39_INTRSTATUS4_MFIONEGINT(r)	((r) << 1)
    273      1.1      uch 
    274      1.1      uch #define TX39_INTRSTATUS4_CHIFSNEGINT		0x80000000
    275      1.1      uch #define TX39_INTRSTATUS4_CHICLKNEGINT		0x40000000
    276      1.1      uch #define TX39_INTRSTATUS4_CHIDOUTNEGINT		0x20000000
    277      1.1      uch #define TX39_INTRSTATUS4_CHIDINNEGINT		0x10000000
    278      1.1      uch #define TX39_INTRSTATUS4_DREQNEGINT		0x08000000
    279      1.1      uch #define TX39_INTRSTATUS4_DGRINTNEGINT		0x04000000
    280      1.1      uch #define TX39_INTRSTATUS4_BC32KNEGINT		0x02000000
    281      1.1      uch #define TX39_INTRSTATUS4_TXDNEGINT		0x01000000
    282      1.1      uch #define TX39_INTRSTATUS4_RXDNEGINT		0x00800000
    283      1.1      uch #define TX39_INTRSTATUS4_CS1NEGINT		0x00400000
    284      1.1      uch #define TX39_INTRSTATUS4_CS2NEGINT		0x00200000
    285      1.1      uch #define TX39_INTRSTATUS4_CS3NEGINT		0x00100000
    286      1.1      uch #define TX39_INTRSTATUS4_MCS0NEGINT		0x00080000
    287      1.1      uch #define TX39_INTRSTATUS4_MCS1NEGINT		0x00040000
    288      1.1      uch #define TX39_INTRSTATUS4_MCS2NEGINT		0x00020000
    289      1.1      uch #define TX39_INTRSTATUS4_MCS3NEGINT		0x00010000
    290      1.1      uch #define TX39_INTRSTATUS4_SPICLKNEGINT		0x00008000
    291      1.1      uch #define TX39_INTRSTATUS4_SPIOUTNEGINT		0x00004000
    292      1.1      uch #define TX39_INTRSTATUS4_SPINNEGINT		0x00002000
    293      1.1      uch #define TX39_INTRSTATUS4_SIBMCLKNEGINT		0x00001000
    294      1.1      uch #define TX39_INTRSTATUS4_CARDREGNEGINT		0x00000800
    295      1.1      uch #define TX39_INTRSTATUS4_CARDIOWRNEGINT		0x00000400
    296      1.1      uch #define TX39_INTRSTATUS4_CARDIORDNEGINT		0x00000200
    297      1.1      uch #define TX39_INTRSTATUS4_CARD1CSLNEGINT		0x00000100
    298      1.1      uch #define TX39_INTRSTATUS4_CARD1CSHNEGINT		0x00000080
    299      1.1      uch #define TX39_INTRSTATUS4_CARD2CSLNEGINT		0x00000040
    300      1.1      uch #define TX39_INTRSTATUS4_CARD2CSHNEGINT		0x00000020
    301      1.1      uch #define TX39_INTRSTATUS4_CARD1WAITNEGINT	0x00000010
    302      1.1      uch #define TX39_INTRSTATUS4_CARD2WAITNEGINT	0x00000008
    303      1.1      uch #define TX39_INTRSTATUS4_CARDDIRNEGINT		0x00000004
    304      1.1      uch 
    305      1.1      uch /*
    306      1.1      uch  *	Interrupt status/clear 5 register.
    307      1.1      uch  *		  -> Enable 5 register
    308      1.1      uch  */
    309      1.1      uch /* R/W */
    310      1.1      uch #define	TX39_INTRSTATUS5_RTCINT		0x80000000
    311      1.1      uch #define TX39_INTRSTATUS5_ALARMINT	0x40000000
    312      1.1      uch #define TX39_INTRSTATUS5_PERINT		0x20000000
    313      1.1      uch #define TX39_INTRSTATUS5_STPTIMERINT	0x10000000
    314      1.1      uch #define TX39_INTRSTATUS5_POSPWRINT	0x08000000
    315      1.1      uch #define TX39_INTRSTATUS5_NEGPWRINT	0x04000000
    316      1.1      uch #define TX39_INTRSTATUS5_POSPWROKINT	0x02000000
    317      1.1      uch #define TX39_INTRSTATUS5_NEGPWROKINT	0x01000000
    318      1.1      uch #define TX39_INTRSTATUS5_POSONBUTNINT	0x00800000
    319      1.1      uch #define TX39_INTRSTATUS5_NEGONBUTNINT	0x00400000
    320      1.1      uch #define TX39_INTRSTATUS5_SPIBUFAVAILINT	0x00200000
    321      1.1      uch #define TX39_INTRSTATUS5_SPIERRINT	0x00100000
    322      1.1      uch #define TX39_INTRSTATUS5_SPIRCVINT	0x00080000
    323      1.1      uch #define TX39_INTRSTATUS5_SPIEMPTYINT	0x00040000
    324      1.1      uch #define TX39_INTRSTATUS5_IRCONSMINT	0x00020000
    325      1.1      uch #define TX39_INTRSTATUS5_CARSTINT	0x00010000
    326      1.1      uch #define TX39_INTRSTATUS5_POSCARINT	0x00008000
    327      1.1      uch #define TX39_INTRSTATUS5_NEGCARINT	0x00004000
    328      1.1      uch #ifdef TX391X
    329      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT6	0x00002000
    330      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT5	0x00001000
    331      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT4	0x00000800
    332      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT3	0x00000400
    333      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT2	0x00000200
    334      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT1	0x00000100
    335      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT0	0x00000080
    336      1.1      uch #define TX39_INTRSTATUS5_IONEGINT6	0x00000040
    337      1.1      uch #define TX39_INTRSTATUS5_IONEGINT5	0x00000020
    338      1.1      uch #define TX39_INTRSTATUS5_IONEGINT4	0x00000010
    339      1.1      uch #define TX39_INTRSTATUS5_IONEGINT3	0x00000008
    340      1.1      uch #define TX39_INTRSTATUS5_IONEGINT2	0x00000004
    341      1.1      uch #define TX39_INTRSTATUS5_IONEGINT1	0x00000002
    342      1.1      uch #define TX39_INTRSTATUS5_IONEGINT0	0x00000001
    343      1.1      uch #endif /* TX391X */
    344      1.1      uch 
    345      1.1      uch #define TX39_INTRSTATUS5_TIMER		0xe0000000
    346      1.1      uch #define TX39_INTRSTATUS5_POWER		0x1fc00000
    347      1.1      uch #define TX39_INTRSTATUS5_SPI		0x003c0000
    348      1.1      uch #define TX39_INTRSTATUS5_IR		0x0003c000
    349      1.1      uch #ifdef TX391X
    350      1.1      uch #define TX39_INTRSTATUS5_IO		0x00003fff
    351      1.1      uch 
    352      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT_SHIFT 7
    353      1.1      uch #define TX39_INTRSTATUS5_IOPOSINT_MASK	0x7f
    354  1.3.4.1  nathanw #define TX39_INTRSTATUS5_IOPOSINT(cr)					\
    355  1.3.4.1  nathanw 	(((cr) >> TX39_INTRSTATUS5_IOPOSINT_SHIFT) &			\
    356      1.1      uch 	TX39_INTRSTATUS5_IOPOSINT_MASK)
    357  1.3.4.1  nathanw #define TX39_INTRSTATUS5_IOPOSINT_SET(cr, val)				\
    358  1.3.4.1  nathanw 	((cr) | (((val) << TX39_INTRSTATUS5_IOPOSINT_SHIFT) &		\
    359      1.1      uch 	(TX39_INTRSTATUS5_IOPOSINT_MASK << TX39_INTRSTATUS5_IOPOSINT_SHIFT)))
    360      1.1      uch 
    361      1.1      uch #define TX39_INTRSTATUS5_IONEGINT_SHIFT 0
    362      1.1      uch #define TX39_INTRSTATUS5_IONEGINT_MASK	0x7f
    363  1.3.4.1  nathanw #define TX39_INTRSTATUS5_IONEGINT(cr)					\
    364  1.3.4.1  nathanw 	(((cr) >> TX39_INTRSTATUS5_IONEGINT_SHIFT) &			\
    365      1.1      uch 	TX39_INTRSTATUS5_IONEGINT_MASK)
    366  1.3.4.1  nathanw #define TX39_INTRSTATUS5_IONEGINT_SET(cr, val)				\
    367  1.3.4.1  nathanw 	((cr) | (((val) << TX39_INTRSTATUS5_IONEGINT_SHIFT) &		\
    368      1.1      uch 	(TX39_INTRSTATUS5_IONEGINT_MASK << TX39_INTRSTATUS5_IONEGINT_SHIFT)))
    369      1.1      uch #endif /* TX391X */
    370      1.1      uch /*
    371      1.1      uch  *	Interrupt status 6 register.
    372      1.1      uch  */
    373      1.1      uch /* R */
    374      1.1      uch #define	TX39_INTRSTATUS6_IRQHIGH	0x80000000
    375      1.1      uch #define TX39_INTRSTATUS6_IRQLOW		0x40000000
    376      1.1      uch 
    377  1.3.4.1  nathanw #define TX39_INTRSTATUS6_INTVECT_SHIFT	2
    378      1.1      uch #define TX39_INTRSTATUS6_INTVECT_MASK	0xf
    379  1.3.4.1  nathanw #define TX39_INTRSTATUS6_INTVECT(cr)					\
    380  1.3.4.1  nathanw 	(((cr) >> TX39_INTRSTATUS6_INTVECT_SHIFT) &			\
    381      1.1      uch 	TX39_INTRSTATUS6_INTVECT_MASK)
    382      1.1      uch 
    383      1.1      uch /*
    384      1.1      uch  *	Interrupt enable 6 register.
    385      1.1      uch  */
    386      1.1      uch /* R/W */
    387      1.1      uch #define TX39_INTRENABLE6_GLOBALEN	0x00040000
    388      1.1      uch 
    389      1.1      uch #define TX39_INTRENABLE6_PRIORITYMASK_SHIFT	0
    390      1.1      uch #define TX39_INTRENABLE6_PRIORITYMASK_MASK	0xffff
    391  1.3.4.1  nathanw #define TX39_INTRENABLE6_PRIORITYMASK(cr)				\
    392  1.3.4.1  nathanw 	(((cr) >> TX39_INTRENABLE6_PRIORITYMASK_SHIFT) &		\
    393      1.1      uch 	TX39_INTRENABLE6_PRIORITYMASK_MASK)
    394  1.3.4.1  nathanw #define TX39_INTRENABLE6_PRIORITYMASK_SET(cr, val)			\
    395  1.3.4.1  nathanw 	((cr) | (((val) << TX39_INTRENABLE6_PRIORITYMASK_SHIFT) &	\
    396  1.3.4.1  nathanw 	(TX39_INTRENABLE6_PRIORITYMASK_MASK <<				\
    397  1.3.4.1  nathanw 	TX39_INTRENABLE6_PRIORITYMASK_SHIFT)))
    398      1.1      uch 
    399      1.1      uch #ifdef TX392X
    400      1.1      uch /*
    401      1.1      uch  *	Interrupt Status 7 Register
    402      1.1      uch  */
    403      1.1      uch #define TX3922_INTRSTATUS7_IRTXCINT		0x00100000
    404      1.1      uch #define TX3922_INTRSTATUS7_IRRXCINT		0x00080000
    405      1.1      uch #define TX3922_INTRSTATUS7_IRTXEINT		0x00040000
    406      1.1      uch #define TX3922_INTRSTATUS7_IRRXEINT		0x00020000
    407      1.1      uch #define TX3922_INTRSTATUS7_IRSIRPXINT		0x00010000
    408      1.1      uch 
    409      1.1      uch /*
    410      1.1      uch  *	Interrupt Status 8 Register
    411      1.1      uch  */
    412      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT15	0x80000000
    413      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT14	0x40000000
    414      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT13	0x20000000
    415      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT12	0x10000000
    416      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT11	0x08000000
    417      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT10	0x04000000
    418      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT9	0x02000000
    419      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT8	0x01000000
    420      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT7	0x00800000
    421      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT6	0x00400000
    422      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT5	0x00200000
    423      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT4	0x00100000
    424      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT3	0x00080000
    425      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT2	0x00040000
    426      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT1	0x00020000
    427      1.1      uch #define TX39_INTRSTATUS8_IOPOSINT0	0x00010000
    428      1.1      uch #define TX39_INTRSTATUS8_IONEGINT15	0x00008000
    429      1.1      uch #define TX39_INTRSTATUS8_IONEGINT14	0x00004000
    430      1.1      uch #define TX39_INTRSTATUS8_IONEGINT13	0x00002000
    431      1.1      uch #define TX39_INTRSTATUS8_IONEGINT12	0x00001000
    432      1.1      uch #define TX39_INTRSTATUS8_IONEGINT11	0x00000800
    433      1.1      uch #define TX39_INTRSTATUS8_IONEGINT10	0x00000400
    434      1.1      uch #define TX39_INTRSTATUS8_IONEGINT9	0x00000200
    435      1.1      uch #define TX39_INTRSTATUS8_IONEGINT8	0x00000100
    436      1.1      uch #define TX39_INTRSTATUS8_IONEGINT7	0x00000080
    437      1.1      uch #define TX39_INTRSTATUS8_IONEGINT6	0x00000040
    438      1.1      uch #define TX39_INTRSTATUS8_IONEGINT5	0x00000020
    439      1.1      uch #define TX39_INTRSTATUS8_IONEGINT4	0x00000010
    440      1.1      uch #define TX39_INTRSTATUS8_IONEGINT3	0x00000008
    441      1.1      uch #define TX39_INTRSTATUS8_IONEGINT2	0x00000004
    442      1.1      uch #define TX39_INTRSTATUS8_IONEGINT1	0x00000002
    443      1.1      uch #define TX39_INTRSTATUS8_IONEGINT0	0x00000001
    444      1.1      uch 
    445      1.1      uch #define TX3922_INTRSTATUS8_IOPOSINT_SHIFT	16
    446      1.1      uch #define TX3922_INTRSTATUS8_IOPOSINT_MASK	0xffff
    447  1.3.4.1  nathanw #define TX3922_INTRSTATUS8_IOPOSINT(cr)					\
    448  1.3.4.1  nathanw 	(((cr) >> TX3922_INTRSTATUS8_IOPOSINT_SHIFT) &			\
    449      1.1      uch 	TX3922_INTRSTATUS8_IOPOSINT_MASK)
    450  1.3.4.1  nathanw #define TX3922_INTRSTATUS8_IOPOSINT_SET(cr, val)			\
    451  1.3.4.1  nathanw 	((cr) | (((val) << TX3922_INTRSTATUS8_IOPOSINT_SHIFT) &		\
    452  1.3.4.1  nathanw 	(TX3922_INTRSTATUS8_IOPOSINT_MASK <<				\
    453  1.3.4.1  nathanw 	TX3922_INTRSTATUS8_IOPOSINT_SHIFT)))
    454      1.1      uch 
    455      1.1      uch #define TX3922_INTRSTATUS8_IONEGINT_SHIFT	0
    456      1.1      uch #define TX3922_INTRSTATUS8_IONEGINT_MASK	0xffff
    457  1.3.4.1  nathanw #define TX3922_INTRSTATUS8_IONEGINT(cr)					\
    458  1.3.4.1  nathanw 	(((cr) >> TX3922_INTRSTATUS8_IONEGINT_SHIFT) &			\
    459      1.1      uch 	TX3922_INTRSTATUS8_IONEGINT_MASK)
    460  1.3.4.1  nathanw #define TX3922_INTRSTATUS8_IONEGINT_SET(cr, val)			\
    461  1.3.4.1  nathanw 	((cr) | (((val) << TX3922_INTRSTATUS8_IONEGINT_SHIFT) &		\
    462  1.3.4.1  nathanw 	(TX3922_INTRSTATUS8_IONEGINT_MASK <<				\
    463  1.3.4.1  nathanw 	TX3922_INTRSTATUS8_IONEGINT_SHIFT)))
    464      1.1      uch 
    465      1.1      uch #endif /* TX392X */
    466      1.1      uch 
    467      1.1      uch /*
    468      1.1      uch  *	IRQHIGH (Priority level interrupt)
    469      1.1      uch  */
    470      1.1      uch #ifdef TX391X
    471      1.1      uch #define TX39_INTRPRI15_PWROK_BIT		0x00008000
    472      1.1      uch #define TX39_INTRPRI14_TIMER_ALARM_BIT		0x00004000
    473      1.1      uch #define TX39_INTRPRI13_TIMER_PERIODIC_BIT	0x00002000
    474      1.1      uch #define TX39_INTRPRI12_MBUS_BIT			0x00001000
    475      1.1      uch #define TX39_INTRPRI11_UARTARX_BIT		0x00000800
    476      1.1      uch #define TX39_INTRPRI10_UARTBRX_BIT		0x00000400
    477      1.1      uch #define TX39_INTRPRI9_MFIO19_18_17_16POS_BIT	0x00000200
    478      1.1      uch #define TX39_INTRPRI8_MFIO1_0_IO6_5POS_BIT	0x00000100
    479      1.1      uch #define TX39_INTRPRI7_MFIO19_18_17_16NEG_BIT	0x00000080
    480      1.1      uch #define TX39_INTRPRI6_MFIO1_0_IO6_5NEG_BIT	0x00000040
    481      1.1      uch #define TX39_INTRPRI5_MBUSDMAFULL_BIT		0x00000020
    482      1.1      uch #define TX39_INTRPRI4_SNDDMACNT_BIT		0x00000010
    483      1.1      uch #define TX39_INTRPRI3_TELDMACNT_BIT		0x00000008
    484      1.1      uch #define TX39_INTRPRI2_CHIDMACNT_BIT		0x00000004
    485      1.1      uch #define TX39_INTRPRI1_IO0POSNEG_BIT		0x00000002
    486      1.1      uch #define TX39_INTRPRI0_BIT			0x00000001
    487      1.1      uch 
    488      1.1      uch #define TX39_INTRPRI15_PWROK			15
    489      1.1      uch #define TX39_INTRPRI14_TIMER_ALARM		14
    490      1.1      uch #define TX39_INTRPRI13_TIMER_PERIODIC		13
    491      1.1      uch #define TX39_INTRPRI12_MBUS			12
    492      1.1      uch #define TX39_INTRPRI11_UARTARX			11
    493      1.1      uch #define TX39_INTRPRI10_UARTBRX			10
    494      1.1      uch #define TX39_INTRPRI9_MFIO19_18_17_16POS	9
    495      1.1      uch #define TX39_INTRPRI8_MFIO1_0_IO6_5POS		8
    496      1.1      uch #define TX39_INTRPRI7_MFIO19_18_17_16NEG	7
    497      1.1      uch #define TX39_INTRPRI6_MFIO1_0_IO6_5NEG		6
    498      1.1      uch #define TX39_INTRPRI5_MBUSDMAFULL		5
    499      1.1      uch #define TX39_INTRPRI4_SNDDMACNT			4
    500      1.1      uch #define TX39_INTRPRI3_TELDMACNT			3
    501      1.1      uch #define TX39_INTRPRI2_CHIDMACNT			2
    502      1.1      uch #define TX39_INTRPRI1_IO0POSNEG			1
    503      1.1      uch #define TX39_INTRPRI0				0
    504      1.1      uch #endif /* TX391X */
    505      1.1      uch 
    506      1.1      uch #ifdef TX392X
    507      1.1      uch #define TX39_INTRPRI15_PWROK_BIT		0x00008000
    508      1.1      uch #define TX39_INTRPRI14_TIMER_ALARM_BIT		0x00004000
    509      1.1      uch #define TX39_INTRPRI13_TIMER_PERIODIC_BIT	0x00002000
    510      1.1      uch #define TX39_INTRPRI12_UARTABRX_BIT		0x00001000
    511      1.1      uch #define TX39_INTRPRI11_MFIO19_18_17_16POS_BIT	0x00000800
    512      1.1      uch #define TX39_INTRPRI10_MFIO1_0_IO6_5POS_BIT	0x00000400
    513      1.1      uch #define TX39_INTRPRI9_MFIO19_18_17_16NEG_BIT	0x00000200
    514      1.1      uch #define TX39_INTRPRI8_MFIO1_0_IO6_5NEG_BIT	0x00000100
    515      1.1      uch #define TX39_INTRPRI5_MBUSDMAFULL_BIT		0x00000020
    516      1.1      uch #define TX39_INTRPRI4_SNDDMACNT_BIT		0x00000010
    517      1.1      uch #define TX39_INTRPRI3_TELDMACNT_BIT		0x00000008
    518      1.1      uch #define TX39_INTRPRI2_CHIDMACNT_BIT		0x00000004
    519      1.1      uch #define TX39_INTRPRI1_IO0POSNEG_BIT		0x00000002
    520      1.1      uch #define TX39_INTRPRI0_BIT			0x00000001
    521      1.1      uch 
    522      1.1      uch #define TX39_INTRPRI15_PWROK			15
    523      1.1      uch #define TX39_INTRPRI14_TIMER_ALARM		14
    524      1.1      uch #define TX39_INTRPRI13_TIMER_PERIODIC		13
    525      1.1      uch #define TX39_INTRPRI12_UARTABRX			12
    526      1.1      uch #define TX39_INTRPRI11_MFIO19_18_17_16POS	11
    527      1.1      uch #define TX39_INTRPRI10_MFIO1_0_IO6_5POS		10
    528      1.1      uch #define TX39_INTRPRI9_MFIO19_18_17_16NEG	9
    529      1.1      uch #define TX39_INTRPRI8_MFIO1_0_IO6_5NEG		8
    530      1.1      uch #define TX39_INTRPRI5_IRRXCRXE			5
    531      1.1      uch #define TX39_INTRPRI4_SNDDMACNT			4
    532      1.1      uch #define TX39_INTRPRI3_TELDMACNT			3
    533      1.1      uch #define TX39_INTRPRI2_CHIDMACNT			2
    534      1.1      uch #define TX39_INTRPRI1_IO0POSNEG			1
    535      1.1      uch #define TX39_INTRPRI0				0
    536      1.1      uch #endif /* TX392X */
    537      1.1      uch 
    538      1.1      uch /*
    539      1.1      uch  *	CPU connection
    540      1.1      uch  */
    541      1.1      uch #define TX39_INTRIRQHIGH_MIPS_HARD_INT		4
    542      1.1      uch #define TX39_INTRIRQLOW_MIPS_HARD_INT		2
    543