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