Home | History | Annotate | Line # | Download | only in tx
tx39biureg.h revision 1.2.8.1
      1  1.2.8.1  nathanw /*	$NetBSD: tx39biureg.h,v 1.2.8.1 2001/06/21 19:24:26 nathanw Exp $ */
      2      1.1      uch 
      3  1.2.8.1  nathanw /*-
      4  1.2.8.1  nathanw  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
      5      1.1      uch  * All rights reserved.
      6      1.1      uch  *
      7  1.2.8.1  nathanw  * This code is derived from software contributed to The NetBSD Foundation
      8  1.2.8.1  nathanw  * by UCHIYAMA Yasushi.
      9  1.2.8.1  nathanw  *
     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.2.8.1  nathanw  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.2.8.1  nathanw  *    notice, this list of conditions and the following disclaimer in the
     17  1.2.8.1  nathanw  *    documentation and/or other materials provided with the distribution.
     18  1.2.8.1  nathanw  * 3. All advertising materials mentioning features or use of this software
     19  1.2.8.1  nathanw  *    must display the following acknowledgement:
     20  1.2.8.1  nathanw  *        This product includes software developed by the NetBSD
     21  1.2.8.1  nathanw  *        Foundation, Inc. and its contributors.
     22  1.2.8.1  nathanw  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.2.8.1  nathanw  *    contributors may be used to endorse or promote products derived
     24  1.2.8.1  nathanw  *    from this software without specific prior written permission.
     25      1.1      uch  *
     26  1.2.8.1  nathanw  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.2.8.1  nathanw  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.2.8.1  nathanw  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.2.8.1  nathanw  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.2.8.1  nathanw  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.2.8.1  nathanw  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.2.8.1  nathanw  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.2.8.1  nathanw  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.2.8.1  nathanw  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.2.8.1  nathanw  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.2.8.1  nathanw  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1      uch  */
     38      1.1      uch /*
     39      1.1      uch  * Toshiba TX3912/3922 BIU module (Bus Interface Unit)
     40      1.1      uch  */
     41      1.1      uch 
     42      1.1      uch /*
     43      1.1      uch  * System Address Map
     44      1.1      uch  */
     45      1.1      uch #define TX39_SYSADDR_DRAMBANK0CS1	0x00000000
     46      1.1      uch #define TX39_SYSADDR_DRAMBANK1CS1	0x02000000
     47      1.1      uch #define TX39_SYSADDR_DRAMBANK0		0x04000000
     48      1.1      uch #define TX39_SYSADDR_DRAMBANK1		0x06000000
     49      1.1      uch #define TX39_SYSADDR_DRAMBANK_LEN	0x02000000
     50      1.1      uch 
     51      1.1      uch #define TX39_SYSADDR_CARD1		0x08000000
     52      1.1      uch #define TX39_SYSADDR_CARD2		0x0C000000
     53      1.1      uch /* 64MByte */
     54      1.1      uch #define TX39_SYSADDR_CARD_SIZE		0x04000000
     55      1.1      uch 
     56      1.1      uch #define TX39_SYSADDR_CS1		0x10000000
     57      1.1      uch #define TX39_SYSADDR_CS2		0x10400000
     58      1.1      uch #define TX39_SYSADDR_CS3		0x10800000
     59      1.1      uch /* 4MByte */
     60      1.1      uch #define TX39_SYSADDR_CS_SIZE		0x00400000
     61      1.1      uch 
     62      1.1      uch #define TX39_SYSADDR_CONFIG_REG		0x10c00000
     63      1.1      uch #define TX39_SYSADDR_CONFIG_REG_LEN	0x00200000
     64      1.1      uch 
     65      1.1      uch #define TX39_SYSADDR_SDRAMBANK0MODE_REG	0x10e00000
     66      1.1      uch #define TX39_SYSADDR_SDRAMBANK1MODE_REG	0x10f00000
     67      1.1      uch #define TX39_SYSADDR_CS0		0x11000000
     68      1.1      uch #define TX39_SYSADDR_KUSEG_DRAMBANK0CS1	0x40000000
     69      1.1      uch #define TX39_SYSADDR_KUSEG_DRAMBANK1CS1	0x42000000
     70      1.1      uch #define TX39_SYSADDR_KUSEG_DRAMBANK0	0x44000000
     71      1.1      uch #define TX39_SYSADDR_KUSEG_DRAMBANK1	0x46000000
     72      1.1      uch #define TX39_SYSADDR_KUSEG_CS0		0x50000000
     73      1.1      uch #define TX39_SYSADDR_KUSEG_CS1		0x58000000
     74      1.1      uch #define TX39_SYSADDR_KUSEG_CS2		0x5c000000
     75      1.1      uch #define TX39_SYSADDR_KUSEG_CS3		0x60000000
     76      1.1      uch #define TX39_SYSADDR_CARD1MEM		0x64000000
     77      1.1      uch #define TX39_SYSADDR_CARD2MEM		0x68000000
     78      1.1      uch #define TX39_SYSADDR_MCS0		0x6c000000
     79      1.1      uch #define TX39_SYSADDR_MCS1		0x70000000
     80      1.1      uch #ifdef TX391X
     81      1.1      uch #define TX39_SYSADDR_MCS2		0x74000000
     82      1.2      uch #define TX39_SYSADDR_MCS3		0x78000000
     83      1.1      uch #endif /* TX391X */
     84      1.1      uch /* 64MByte */
     85      1.1      uch #define TX39_SYSADDR_MCS_SIZE		0x04000000
     86      1.1      uch 
     87      1.1      uch /*
     88      1.1      uch  *	BIU module registers.
     89      1.1      uch  */
     90      1.1      uch #define TX39_MEMCONFIG0_REG		0x00
     91      1.1      uch #define TX39_MEMCONFIG1_REG		0x04
     92      1.1      uch #define TX39_MEMCONFIG2_REG		0x08
     93      1.1      uch #define TX39_MEMCONFIG3_REG		0x0C
     94      1.1      uch #define TX39_MEMCONFIG4_REG		0x10
     95      1.1      uch #define TX39_MEMCONFIG5_REG		0x14
     96      1.1      uch #define TX39_MEMCONFIG6_REG		0x18
     97      1.1      uch #define TX39_MEMCONFIG7_REG		0x1C
     98      1.1      uch #define TX39_MEMCONFIG8_REG		0x20
     99      1.1      uch 
    100      1.1      uch /*
    101      1.1      uch  *	Memory Configuration 0 Register
    102      1.1      uch  */
    103      1.1      uch /* R/W */
    104      1.1      uch #define TX39_MEMCONFIG0_ENDCLKOUTTRI	0x40000000
    105      1.1      uch #define TX39_MEMCONFIG0_DISDQMINIT	0x20000000
    106      1.1      uch #define TX39_MEMCONFIG0_ENSDRAMPD	0x10000000
    107      1.1      uch #define TX39_MEMCONFIG0_SHOWDINO	0x08000000
    108      1.1      uch #define TX39_MEMCONFIG0_ENRMAP2		0x04000000
    109      1.1      uch #define TX39_MEMCONFIG0_ENRMAP1		0x02000000
    110      1.1      uch #define TX39_MEMCONFIG0_ENWRINPAGE	0x01000000
    111      1.1      uch #define TX39_MEMCONFIG0_ENCS3USER	0x00800000
    112      1.1      uch #define TX39_MEMCONFIG0_ENCS2USER	0x00400000
    113      1.1      uch #define TX39_MEMCONFIG0_ENCS1USER	0x00200000
    114      1.1      uch #define TX39_MEMCONFIG0_ENCS1DRAM	0x00100000
    115      1.1      uch 
    116      1.1      uch #define TX39_MEMCONFIG0_BANK1CONF_SHIFT 18
    117      1.1      uch #define TX39_MEMCONFIG0_BANK1CONF_MASK	0x3
    118  1.2.8.1  nathanw #define TX39_MEMCONFIG0_BANK1CONF(cr)					\
    119  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_BANK1CONF_SHIFT) &			\
    120      1.1      uch 	TX39_MEMCONFIG0_BANK1CONF_MASK)
    121  1.2.8.1  nathanw #define TX39_MEMCONFIG0_BANK1CONF_SET(cr, val)				\
    122  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_BANK1CONF_SHIFT) &		\
    123      1.1      uch 	(TX39_MEMCONFIG0_BANK1CONF_MASK << TX39_MEMCONFIG0_BANK1CONF_SHIFT)))
    124      1.1      uch #define TX39_MEMCONFIG0_BANK0CONF_SHIFT 16
    125      1.1      uch #define TX39_MEMCONFIG0_BANK0CONF_MASK	0x3
    126  1.2.8.1  nathanw #define TX39_MEMCONFIG0_BANK0CONF(cr)					\
    127  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_BANK0CONF_SHIFT) &			\
    128      1.1      uch 	TX39_MEMCONFIG0_BANK0CONF_MASK)
    129  1.2.8.1  nathanw #define TX39_MEMCONFIG0_BANK0CONF_SET(cr, val)				\
    130  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_BANK0CONF_SHIFT) &		\
    131      1.1      uch 	(TX39_MEMCONFIG0_BANK0CONF_MASK << TX39_MEMCONFIG0_BANK0CONF_SHIFT)))
    132      1.1      uch #define TX39_MEMCONFIG0_BANKCONF_16BITSDRAM	0x3
    133      1.1      uch #define TX39_MEMCONFIG0_BANKCONF_8BITSDRAM	0x2
    134      1.1      uch #define TX39_MEMCONFIG0_BANKCONF_32BITSDHDRAM	0x1
    135      1.1      uch #define TX39_MEMCONFIG0_BANKCONF_16BITSDHDRAM	0x0
    136      1.1      uch 
    137      1.1      uch #define TX39_MEMCONFIG0_ROWSEL1_SHIFT 14
    138      1.1      uch #define TX39_MEMCONFIG0_ROWSEL1_MASK	0x3
    139  1.2.8.1  nathanw #define TX39_MEMCONFIG0_ROWSEL1(cr)					\
    140  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_ROWSEL1_SHIFT) &			\
    141      1.1      uch 	TX39_MEMCONFIG0_ROWSEL1_MASK)
    142  1.2.8.1  nathanw #define TX39_MEMCONFIG0_ROWSEL1_SET(cr, val)				\
    143  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_ROWSEL1_SHIFT) &		\
    144      1.1      uch 	(TX39_MEMCONFIG0_ROWSEL1_MASK << TX39_MEMCONFIG0_ROWSEL1_SHIFT)))
    145      1.1      uch #define TX39_MEMCONFIG0_ROWSEL0_SHIFT 12
    146      1.1      uch #define TX39_MEMCONFIG0_ROWSEL0_MASK	0x3
    147  1.2.8.1  nathanw #define TX39_MEMCONFIG0_ROWSEL0(cr)					\
    148  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_ROWSEL0_SHIFT) &			\
    149      1.1      uch 	TX39_MEMCONFIG0_ROWSEL0_MASK)
    150  1.2.8.1  nathanw #define TX39_MEMCONFIG0_ROWSEL0_SET(cr, val)				\
    151  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_ROWSEL0_SHIFT) &		\
    152      1.1      uch 	(TX39_MEMCONFIG0_ROWSEL0_MASK << TX39_MEMCONFIG0_ROWSEL0_SHIFT)))
    153      1.1      uch 
    154      1.1      uch #define TX39_MEMCONFIG0_COLSEL1_SHIFT 8
    155      1.1      uch #define TX39_MEMCONFIG0_COLSEL1_MASK	0xf
    156  1.2.8.1  nathanw #define TX39_MEMCONFIG0_COLSEL1(cr)					\
    157  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_COLSEL1_SHIFT) &			\
    158      1.1      uch 	TX39_MEMCONFIG0_COLSEL1_MASK)
    159  1.2.8.1  nathanw #define TX39_MEMCONFIG0_COLSEL1_SET(cr, val)				\
    160  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_COLSEL1_SHIFT) &		\
    161      1.1      uch 	(TX39_MEMCONFIG0_COLSEL1_MASK << TX39_MEMCONFIG0_COLSEL1_SHIFT)))
    162      1.1      uch #define TX39_MEMCONFIG0_COLSEL0_SHIFT 4
    163      1.1      uch #define TX39_MEMCONFIG0_COLSEL0_MASK	0xf
    164  1.2.8.1  nathanw #define TX39_MEMCONFIG0_COLSEL0(cr)					\
    165  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG0_COLSEL0_SHIFT) &			\
    166      1.1      uch 	TX39_MEMCONFIG0_COLSEL0_MASK)
    167  1.2.8.1  nathanw #define TX39_MEMCONFIG0_COLSEL0_SET(cr, val)				\
    168  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG0_COLSEL0_SHIFT) &		\
    169      1.1      uch 	(TX39_MEMCONFIG0_COLSEL0_MASK << TX39_MEMCONFIG0_COLSEL0_SHIFT)))
    170      1.1      uch 
    171      1.1      uch #define TX39_MEMCONFIG0_CS3SIZE		0x00000008
    172      1.1      uch #define TX39_MEMCONFIG0_CS2SIZE		0x00000004
    173      1.1      uch #define TX39_MEMCONFIG0_CS1SIZE		0x00000002
    174      1.1      uch #define TX39_MEMCONFIG0_CS0SIZE		0x00000001
    175      1.1      uch 
    176      1.1      uch /*
    177      1.1      uch  *	Memory Configuration 1 Register
    178      1.1      uch  */
    179      1.1      uch #ifdef TX391X
    180      1.1      uch #define TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT	28
    181      1.1      uch #define TX39_MEMCONFIG1_MCS3ACCVAL1_MASK	0xf
    182  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS3ACCVAL1(cr)					\
    183  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT) &			\
    184      1.1      uch 	TX39_MEMCONFIG1_MCS3ACCVAL1_MASK)
    185  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS3ACCVAL1_SET(cr, val)			\
    186  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT) &		\
    187  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS3ACCVAL1_MASK <<				\
    188  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS3ACCVAL1_SHIFT)))
    189      1.1      uch 
    190      1.1      uch #define TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT	24
    191      1.1      uch #define TX39_MEMCONFIG1_MCS3ACCVAL2_MASK	0xf
    192  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS3ACCVAL2(cr)					\
    193  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT) &			\
    194      1.1      uch 	TX39_MEMCONFIG1_MCS3ACCVAL2_MASK)
    195  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS3ACCVAL2_SET(cr, val)			\
    196  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT) &		\
    197  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS3ACCVAL2_MASK <<				\
    198  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS3ACCVAL2_SHIFT)))
    199      1.1      uch 
    200      1.1      uch #define TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT	20
    201      1.1      uch #define TX39_MEMCONFIG1_MCS2ACCVAL1_MASK	0xf
    202  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS2ACCVAL1(cr)					\
    203  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT) &			\
    204      1.1      uch 	TX39_MEMCONFIG1_MCS2ACCVAL1_MASK)
    205  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS2ACCVAL1_SET(cr, val)			\
    206  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT) &		\
    207  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS2ACCVAL1_MASK <<				\
    208  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS2ACCVAL1_SHIFT)))
    209      1.1      uch 
    210      1.1      uch #define TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT	16
    211      1.1      uch #define TX39_MEMCONFIG1_MCS2ACCVAL2_MASK	0xf
    212  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS2ACCVAL2(cr)					\
    213  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT) &			\
    214      1.1      uch 	TX39_MEMCONFIG1_MCS2ACCVAL2_MASK)
    215  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS2ACCVAL2_SET(cr, val)			\
    216  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT) &		\
    217  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS2ACCVAL2_MASK <<				\
    218  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS2ACCVAL2_SHIFT)))
    219      1.1      uch #endif /* TX391X */
    220      1.1      uch #ifdef TX392X
    221      1.1      uch #define	TX39_MEMCONFIG1_C48MPLLON	0x40000000
    222      1.1      uch #define	TX39_MEMCONFIG1_ENMCS1BE	0x20000000
    223      1.1      uch #define	TX39_MEMCONFIG1_ENMCS0BE	0x10000000
    224      1.1      uch #define	TX39_MEMCONFIG1_ENMCS1ACC	0x08000000
    225      1.1      uch #define	TX39_MEMCONFIG1_ENMCS0ACC	0x04000000
    226      1.1      uch #define TX39_MEMCONFIG1_BCLKDIV_SHIFT	23
    227      1.1      uch #define TX39_MEMCONFIG1_BCLKDIV_MASK	0x7
    228  1.2.8.1  nathanw #define TX39_MEMCONFIG1_BCLKDIV(cr)					\
    229  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_BCLKDIV_SHIFT) &			\
    230      1.1      uch 	TX39_MEMCONFIG1_BCLKDIV_MASK)
    231  1.2.8.1  nathanw #define TX39_MEMCONFIG1_BCLKDIV_SET(cr, val)				\
    232  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_BCLKDIV_SHIFT) &		\
    233      1.1      uch 	(TX39_MEMCONFIG1_BCLKDIV_MASK << TX39_MEMCONFIG1_BCLKDIV_SHIFT)))
    234      1.1      uch #define	TX39_MEMCONFIG1_ENBCLK		0x00400000
    235      1.1      uch #define	TX39_MEMCONFIG1_ENMCS1PAGE	0x00200000
    236      1.1      uch #define	TX39_MEMCONFIG1_ENMCS0PAGE	0x00100000
    237      1.1      uch #define	TX39_MEMCONFIG1_ENMCS1WAIT	0x00080000
    238      1.1      uch #define	TX39_MEMCONFIG1_ENMCS0WAIT	0x00040000
    239      1.1      uch #define	TX39_MEMCONFIG1_MCS1_32		0x00020000
    240      1.1      uch #define	TX39_MEMCONFIG1_MCS0_32		0x00010000
    241      1.1      uch #endif /* TX392X */
    242      1.1      uch 
    243      1.1      uch #define TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT	12
    244      1.1      uch #define TX39_MEMCONFIG1_MCS1ACCVAL1_MASK	0xf
    245  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS1ACCVAL1(cr)					\
    246  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT) &			\
    247      1.1      uch 	TX39_MEMCONFIG1_MCS1ACCVAL1_MASK)
    248  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS1ACCVAL1_SET(cr, val)			\
    249  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT) &		\
    250  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS1ACCVAL1_MASK <<				\
    251  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS1ACCVAL1_SHIFT)))
    252      1.1      uch 
    253      1.1      uch #define TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT	8
    254      1.1      uch #define TX39_MEMCONFIG1_MCS1ACCVAL2_MASK	0xf
    255  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS1ACCVAL2(cr)					\
    256  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT) &			\
    257      1.1      uch 	TX39_MEMCONFIG1_MCS1ACCVAL2_MASK)
    258  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS1ACCVAL2_SET(cr, val)			\
    259  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT) &		\
    260  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS1ACCVAL2_MASK <<				\
    261  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS1ACCVAL2_SHIFT)))
    262      1.1      uch 
    263      1.1      uch #define TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT	4
    264      1.1      uch #define TX39_MEMCONFIG1_MCS0ACCVAL1_MASK	0xf
    265  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS0ACCVAL1(cr)					\
    266  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT) &			\
    267      1.1      uch 	TX39_MEMCONFIG1_MCS0ACCVAL1_MASK)
    268  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS0ACCVAL1_SET(cr, val)			\
    269  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT) &		\
    270  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS0ACCVAL1_MASK <<				\
    271  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS0ACCVAL1_SHIFT)))
    272      1.1      uch 
    273      1.1      uch #define TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT	0
    274      1.1      uch #define TX39_MEMCONFIG1_MCS0ACCVAL2_MASK	0xf
    275  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS0ACCVAL2(cr)					\
    276  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT) &			\
    277      1.1      uch 	TX39_MEMCONFIG1_MCS0ACCVAL2_MASK)
    278  1.2.8.1  nathanw #define TX39_MEMCONFIG1_MCS0ACCVAL2_SET(cr, val)			\
    279  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT) &		\
    280  1.2.8.1  nathanw 	(TX39_MEMCONFIG1_MCS0ACCVAL2_MASK <<				\
    281  1.2.8.1  nathanw 	TX39_MEMCONFIG1_MCS0ACCVAL2_SHIFT)))
    282      1.1      uch 
    283      1.1      uch /*
    284      1.1      uch  *	Memory Configuration 2 Register
    285      1.1      uch  */
    286      1.1      uch /* Define access timing. not required yet */
    287      1.1      uch #define TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT	28
    288  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL1_MASK		0xf
    289  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL1(cr)					\
    290  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT) &			\
    291      1.1      uch 	TX39_MEMCONFIG2_CS3ACCVAL1_MASK)
    292  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL1_SET(cr, val)				\
    293  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT) &		\
    294      1.1      uch 	(TX39_MEMCONFIG2_CS3ACCVAL1_MASK << TX39_MEMCONFIG2_CS3ACCVAL1_SHIFT)))
    295      1.1      uch 
    296      1.1      uch #define TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT	24
    297  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL2_MASK		0xf
    298  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL2(cr)					\
    299  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT) &			\
    300      1.1      uch 	TX39_MEMCONFIG2_CS3ACCVAL2_MASK)
    301  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS3ACCVAL2_SET(cr, val)				\
    302  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT) &		\
    303      1.1      uch 	(TX39_MEMCONFIG2_CS3ACCVAL2_MASK << TX39_MEMCONFIG2_CS3ACCVAL2_SHIFT)))
    304      1.1      uch 
    305      1.1      uch #define TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT	20
    306  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL1_MASK		0xf
    307  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL1(cr)					\
    308  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT) &			\
    309      1.1      uch 	TX39_MEMCONFIG2_CS2ACCVAL1_MASK)
    310  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL1_SET(cr, val)				\
    311  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT) &		\
    312      1.1      uch 	(TX39_MEMCONFIG2_CS2ACCVAL1_MASK << TX39_MEMCONFIG2_CS2ACCVAL1_SHIFT)))
    313      1.1      uch 
    314      1.1      uch #define TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT	16
    315  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL2_MASK		0xf
    316  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL2(cr)					\
    317  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT) &			\
    318      1.1      uch 	TX39_MEMCONFIG2_CS2ACCVAL2_MASK)
    319  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS2ACCVAL2_SET(cr, val)				\
    320  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT) &		\
    321      1.1      uch 	(TX39_MEMCONFIG2_CS2ACCVAL2_MASK << TX39_MEMCONFIG2_CS2ACCVAL2_SHIFT)))
    322      1.1      uch 
    323      1.1      uch #define TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT	12
    324  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL1_MASK		0xf
    325  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL1(cr)					\
    326  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT) &			\
    327      1.1      uch 	TX39_MEMCONFIG2_CS1ACCVAL1_MASK)
    328  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL1_SET(cr, val)				\
    329  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT) &		\
    330      1.1      uch 	(TX39_MEMCONFIG2_CS1ACCVAL1_MASK << TX39_MEMCONFIG2_CS1ACCVAL1_SHIFT)))
    331      1.1      uch 
    332      1.1      uch #define TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT	8
    333  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL2_MASK		0xf
    334  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL2(cr)					\
    335  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT) &			\
    336      1.1      uch 	TX39_MEMCONFIG2_CS1ACCVAL2_MASK)
    337  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS1ACCVAL2_SET(cr, val)				\
    338  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT) &		\
    339      1.1      uch 	(TX39_MEMCONFIG2_CS1ACCVAL2_MASK << TX39_MEMCONFIG2_CS1ACCVAL2_SHIFT)))
    340      1.1      uch 
    341      1.1      uch #define TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT	4
    342  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL1_MASK		0xf
    343  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL1(cr)					\
    344  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT) &			\
    345      1.1      uch 	TX39_MEMCONFIG2_CS0ACCVAL1_MASK)
    346  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL1_SET(cr, val)				\
    347  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT) &		\
    348      1.1      uch 	(TX39_MEMCONFIG2_CS0ACCVAL1_MASK << TX39_MEMCONFIG2_CS0ACCVAL1_SHIFT)))
    349      1.1      uch 
    350      1.1      uch #define TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT	0
    351  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL2_MASK		0xf
    352  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL2(cr)					\
    353  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT) &			\
    354      1.1      uch 	TX39_MEMCONFIG2_CS0ACCVAL2_MASK)
    355  1.2.8.1  nathanw #define TX39_MEMCONFIG2_CS0ACCVAL2_SET(cr, val)				\
    356  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT) &		\
    357      1.1      uch 	(TX39_MEMCONFIG2_CS0ACCVAL2_MASK << TX39_MEMCONFIG2_CS0ACCVAL2_SHIFT)))
    358      1.1      uch 
    359      1.1      uch /*
    360      1.1      uch  *	Memory Configuration 3 Register
    361      1.1      uch  */
    362      1.1      uch /* Define access timing, enable read page mode, PC-Card. */
    363      1.1      uch #define TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT	28
    364      1.1      uch #define TX39_MEMCONFIG3_CARD2ACCVAL_MASK	0xf
    365  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2ACCVAL(cr)					\
    366  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT) &			\
    367      1.1      uch 	TX39_MEMCONFIG3_CARD2ACCVAL_MASK)
    368  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2ACCVAL_SET(cr, val)			\
    369  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT) &		\
    370  1.2.8.1  nathanw 	(TX39_MEMCONFIG3_CARD2ACCVAL_MASK <<				\
    371  1.2.8.1  nathanw 	TX39_MEMCONFIG3_CARD2ACCVAL_SHIFT)))
    372      1.1      uch 
    373      1.1      uch #define TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT	24
    374      1.1      uch #define TX39_MEMCONFIG3_CARD1ACCVAL_MASK	0xf
    375  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1ACCVAL(cr)					\
    376  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT) &			\
    377      1.1      uch 	TX39_MEMCONFIG3_CARD1ACCVAL_MASK)
    378  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1ACCVAL_SET(cr, val)			\
    379  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT) &		\
    380  1.2.8.1  nathanw 	(TX39_MEMCONFIG3_CARD1ACCVAL_MASK <<				\
    381  1.2.8.1  nathanw 	TX39_MEMCONFIG3_CARD1ACCVAL_SHIFT)))
    382      1.1      uch 
    383      1.1      uch #define TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT	20
    384      1.1      uch #define TX39_MEMCONFIG3_CARD2IOACCVAL_MASK	0xf
    385  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2IOACCVAL(cr)				\
    386  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT) &		\
    387      1.1      uch 	TX39_MEMCONFIG3_CARD2IOACCVAL_MASK)
    388  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2IOACCVAL_SET(cr, val)			\
    389  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT) &	\
    390  1.2.8.1  nathanw 	(TX39_MEMCONFIG3_CARD2IOACCVAL_MASK <<				\
    391  1.2.8.1  nathanw 	TX39_MEMCONFIG3_CARD2IOACCVAL_SHIFT)))
    392      1.1      uch 
    393      1.1      uch #define TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT	16
    394      1.1      uch #define TX39_MEMCONFIG3_CARD1IOACCVAL_MASK	0xf
    395  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1IOACCVAL(cr)				\
    396  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT) &		\
    397      1.1      uch 	TX39_MEMCONFIG3_CARD1IOACCVAL_MASK)
    398  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1IOACCVAL_SET(cr, val)			\
    399  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT) &	\
    400  1.2.8.1  nathanw 	(TX39_MEMCONFIG3_CARD1IOACCVAL_MASK <<				\
    401  1.2.8.1  nathanw 	TX39_MEMCONFIG3_CARD1IOACCVAL_SHIFT)))
    402      1.1      uch #ifdef TX391X
    403  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENMCS3PAGE		0x00008000
    404  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENMCS2PAGE		0x00004000
    405  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENMCS1PAGE		0x00002000
    406  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENMCS0PAGE		0x00001000
    407      1.1      uch #endif /* TX391X */
    408  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENCS3PAGE		0x00000800
    409  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENCS2PAGE		0x00000400
    410  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENCS1PAGE		0x00000200
    411  1.2.8.1  nathanw #define TX39_MEMCONFIG3_ENCS0PAGE		0x00000100
    412  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2WAITEN		0x00000080
    413  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1WAITEN		0x00000040
    414  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2IOEN		0x00000020
    415  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1IOEN		0x00000010
    416      1.1      uch #ifdef TX391X
    417  1.2.8.1  nathanw #define TX39_MEMCONFIG3_PORT8SEL		0x00000008
    418      1.1      uch #endif /* TX391X */
    419      1.1      uch #ifdef TX392X
    420  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD2_8SEL		0x00000008
    421  1.2.8.1  nathanw #define TX39_MEMCONFIG3_CARD1_8SEL		0x00000004
    422      1.1      uch #endif /* TX392X */
    423      1.1      uch /*
    424      1.1      uch  *	Memory Configuration 4 Register
    425      1.1      uch  */
    426      1.1      uch /* DMA */
    427      1.1      uch #define TX39_MEMCONFIG4_ENBANK1HDRAM		0x80000000
    428      1.1      uch #define TX39_MEMCONFIG4_ENBANK0HDRAM		0x40000000
    429      1.1      uch #define TX39_MEMCONFIG4_ENARB			0x20000000
    430      1.1      uch #define TX39_MEMCONFIG4_DISSNOOP		0x10000000
    431      1.1      uch #define TX39_MEMCONFIG4_CLRWRBUSERRINT		0x08000000
    432      1.1      uch #define TX39_MEMCONFIG4_ENBANK1OPT		0x04000000
    433      1.1      uch #define TX39_MEMCONFIG4_ENBANK0OPT		0x02000000
    434      1.1      uch #define TX39_MEMCONFIG4_ENWATCH			0x01000000
    435      1.1      uch 
    436      1.1      uch /*
    437      1.1      uch  * WatchDogTimerRate = (WATCHTIME[3:0] + 1) * 64 / 36.864MHz
    438      1.1      uch  */
    439      1.1      uch #define TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT	20
    440      1.1      uch #define TX39_MEMCONFIG4_WATCHTIMEVAL_MASK	0xf
    441  1.2.8.1  nathanw #define TX39_MEMCONFIG4_WATCHTIMEVAL(cr)				\
    442  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT) &			\
    443      1.1      uch 	TX39_MEMCONFIG4_WATCHTIMEVAL_MASK)
    444  1.2.8.1  nathanw #define TX39_MEMCONFIG4_WATCHTIMEVAL_SET(cr, val)			\
    445  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT) &	\
    446  1.2.8.1  nathanw 	(TX39_MEMCONFIG4_WATCHTIMEVAL_MASK <<				\
    447  1.2.8.1  nathanw 	TX39_MEMCONFIG4_WATCHTIMEVAL_SHIFT)))
    448      1.1      uch 
    449      1.1      uch 
    450      1.1      uch #define TX39_MEMCONFIG4_MEMPOWERDOWN		0x00010000
    451      1.1      uch #define TX39_MEMCONFIG4_ENRFSH1			0x00008000
    452      1.1      uch #define TX39_MEMCONFIG4_ENRFSH0			0x00004000
    453      1.1      uch 
    454      1.1      uch #define TX39_MEMCONFIG4_RFSHVAL1_SHIFT	8
    455      1.1      uch #define TX39_MEMCONFIG4_RFSHVAL1_MASK	0x3f
    456  1.2.8.1  nathanw #define TX39_MEMCONFIG4_RFSHVAL1(cr)					\
    457  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG4_RFSHVAL1_SHIFT) &			\
    458      1.1      uch 	TX39_MEMCONFIG4_RFSHVAL1_MASK)
    459  1.2.8.1  nathanw #define TX39_MEMCONFIG4_RFSHVAL1_SET(cr, val)				\
    460  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG4_RFSHVAL1_SHIFT) &		\
    461      1.1      uch 	(TX39_MEMCONFIG4_RFSHVAL1_MASK << TX39_MEMCONFIG4_RFSHVAL1_SHIFT)))
    462      1.1      uch 
    463      1.1      uch #define TX39_MEMCONFIG4_RFSHVAL0_SHIFT	0
    464      1.1      uch #define TX39_MEMCONFIG4_RFSHVAL0_MASK	0x3f
    465  1.2.8.1  nathanw #define TX39_MEMCONFIG4_RFSHVAL0(cr)					\
    466  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG4_RFSHVAL0_SHIFT) &			\
    467      1.1      uch 	TX39_MEMCONFIG4_RFSHVAL0_MASK)
    468  1.2.8.1  nathanw #define TX39_MEMCONFIG4_RFSHVAL0_SET(cr, val)				\
    469  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG4_RFSHVAL0_SHIFT) &		\
    470      1.1      uch 	(TX39_MEMCONFIG4_RFSHVAL0_MASK << TX39_MEMCONFIG4_RFSHVAL0_SHIFT)))
    471      1.1      uch 
    472      1.1      uch /*
    473      1.1      uch  *	Memory Configuration 5 Register
    474      1.1      uch  */
    475      1.1      uch /* Address remap region 2 */
    476      1.1      uch #define TX39_MEMCONFIG5_STARTVAL2_SHIFT	9
    477      1.1      uch #define TX39_MEMCONFIG5_STARTVAL2_MASK	0x007fffff
    478  1.2.8.1  nathanw #define TX39_MEMCONFIG5_STARTVAL2(cr)					\
    479  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG5_STARTVAL2_SHIFT) &			\
    480      1.1      uch 	TX39_MEMCONFIG5_STARTVAL2_MASK)
    481  1.2.8.1  nathanw #define TX39_MEMCONFIG5_STARTVAL2_SET(cr, val)				\
    482  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG5_STARTVAL2_SHIFT) &		\
    483      1.1      uch 	(TX39_MEMCONFIG5_STARTVAL2_MASK << TX39_MEMCONFIG5_STARTVAL2_SHIFT)))
    484      1.1      uch 
    485      1.1      uch #define TX39_MEMCONFIG5_MASK2_SHIFT	0
    486      1.1      uch #define TX39_MEMCONFIG5_MASK2_MASK	0xf
    487  1.2.8.1  nathanw #define TX39_MEMCONFIG5_MASK2(cr)					\
    488  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG5_MASK2_SHIFT) &			\
    489      1.1      uch 	TX39_MEMCONFIG5_MASK2_MASK)
    490  1.2.8.1  nathanw #define TX39_MEMCONFIG5_MASK2_SET(cr, val)				\
    491  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG5_MASK2_SHIFT) &		\
    492      1.1      uch 	(TX39_MEMCONFIG5_MASK2_MASK << TX39_MEMCONFIG5_MASK2_SHIFT)))
    493      1.1      uch 
    494      1.1      uch /*
    495      1.1      uch  *	Memory Configuration 6 Register
    496      1.1      uch  */
    497      1.1      uch /* Address remap region 1 */
    498      1.1      uch #define TX39_MEMCONFIG6_STARTVAL1_SHIFT	9
    499      1.1      uch #define TX39_MEMCONFIG6_STARTVAL1_MASK	0x007fffff
    500  1.2.8.1  nathanw #define TX39_MEMCONFIG6_STARTVAL1(cr)					\
    501  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG6_STARTVAL1_SHIFT) &			\
    502      1.1      uch 	TX39_MEMCONFIG6_STARTVAL1_MASK)
    503  1.2.8.1  nathanw #define TX39_MEMCONFIG6_STARTVAL1_SET(cr, val)				\
    504  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG6_STARTVAL1_SHIFT) &		\
    505      1.1      uch 	(TX39_MEMCONFIG6_STARTVAL1_MASK << TX39_MEMCONFIG6_STARTVAL1_SHIFT)))
    506      1.1      uch 
    507      1.1      uch #define TX39_MEMCONFIG6_MASK1_SHIFT	0
    508      1.1      uch #define TX39_MEMCONFIG6_MASK1_MASK	0xf
    509  1.2.8.1  nathanw #define TX39_MEMCONFIG6_MASK1(cr)					\
    510  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG6_MASK1_SHIFT) &			\
    511      1.1      uch 	TX39_MEMCONFIG6_MASK1_MASK)
    512  1.2.8.1  nathanw #define TX39_MEMCONFIG6_MASK1_SET(cr, val)				\
    513  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG6_MASK1_SHIFT) &		\
    514      1.1      uch 	(TX39_MEMCONFIG6_MASK1_MASK << TX39_MEMCONFIG6_MASK1_SHIFT)))
    515      1.1      uch 
    516      1.1      uch /*
    517      1.1      uch  *	Memory Configuration 7 Register
    518      1.1      uch  */
    519      1.1      uch /* Address remap region 2 */
    520      1.1      uch #define TX39_MEMCONFIG7_RMAPADD2_SHIFT	9
    521      1.1      uch #define TX39_MEMCONFIG7_RMAPADD2_MASK	0x007fffff
    522  1.2.8.1  nathanw #define TX39_MEMCONFIG7_RMAPADD2(cr)					\
    523  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG7_RMAPADD2_SHIFT) &			\
    524      1.1      uch 	TX39_MEMCONFIG7_RMAPADD2_MASK)
    525  1.2.8.1  nathanw #define TX39_MEMCONFIG7_RMAPADD2_SET(cr, val)				\
    526  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG7_RMAPADD2_SHIFT) &		\
    527      1.1      uch 	(TX39_MEMCONFIG7_RMAPADD2_MASK << TX39_MEMCONFIG7_RMAPADD2_SHIFT)))
    528      1.1      uch 
    529      1.1      uch /*
    530      1.1      uch  *	Memory Configuration 8 Register
    531      1.1      uch  */
    532      1.1      uch /* Address remap region 1 */
    533      1.1      uch #define TX39_MEMCONFIG8_RMAPADD1_SHIFT	9
    534      1.1      uch #define TX39_MEMCONFIG8_RMAPADD1_MASK	0x007fffff
    535  1.2.8.1  nathanw #define TX39_MEMCONFIG8_RMAPADD1(cr)					\
    536  1.2.8.1  nathanw 	(((cr) >> TX39_MEMCONFIG8_RMAPADD1_SHIFT) &			\
    537      1.1      uch 	TX39_MEMCONFIG8_RMAPADD1_MASK)
    538  1.2.8.1  nathanw #define TX39_MEMCONFIG8_RMAPADD1_SET(cr, val)				\
    539  1.2.8.1  nathanw 	((cr) | (((val) << TX39_MEMCONFIG8_RMAPADD1_SHIFT) &		\
    540      1.1      uch 	(TX39_MEMCONFIG8_RMAPADD1_MASK << TX39_MEMCONFIG8_RMAPADD1_SHIFT)))
    541