Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * mv643xx.h - MV-643XX Internal registers definition file.
0004  *
0005  * Copyright 2002 Momentum Computer, Inc.
0006  *  Author: Matthew Dharm <mdharm@momenco.com>
0007  * Copyright 2002 GALILEO TECHNOLOGY, LTD. 
0008  */
0009 #ifndef __ASM_MV643XX_H
0010 #define __ASM_MV643XX_H
0011 
0012 #include <asm/types.h>
0013 #include <linux/mv643xx_eth.h>
0014 #include <linux/mv643xx_i2c.h>
0015 
0016 /****************************************/
0017 /* Processor Address Space              */
0018 /****************************************/
0019 
0020 /* DDR SDRAM BAR and size registers */
0021 
0022 #define MV64340_CS_0_BASE_ADDR                                      0x008
0023 #define MV64340_CS_0_SIZE                                           0x010
0024 #define MV64340_CS_1_BASE_ADDR                                      0x208
0025 #define MV64340_CS_1_SIZE                                           0x210
0026 #define MV64340_CS_2_BASE_ADDR                                      0x018
0027 #define MV64340_CS_2_SIZE                                           0x020
0028 #define MV64340_CS_3_BASE_ADDR                                      0x218
0029 #define MV64340_CS_3_SIZE                                           0x220
0030 
0031 /* Devices BAR and size registers */
0032 
0033 #define MV64340_DEV_CS0_BASE_ADDR                                   0x028
0034 #define MV64340_DEV_CS0_SIZE                                        0x030
0035 #define MV64340_DEV_CS1_BASE_ADDR                                   0x228
0036 #define MV64340_DEV_CS1_SIZE                                        0x230
0037 #define MV64340_DEV_CS2_BASE_ADDR                                   0x248
0038 #define MV64340_DEV_CS2_SIZE                                        0x250
0039 #define MV64340_DEV_CS3_BASE_ADDR                                   0x038
0040 #define MV64340_DEV_CS3_SIZE                                        0x040
0041 #define MV64340_BOOTCS_BASE_ADDR                                    0x238
0042 #define MV64340_BOOTCS_SIZE                                         0x240
0043 
0044 /* PCI 0 BAR and size registers */
0045 
0046 #define MV64340_PCI_0_IO_BASE_ADDR                                  0x048
0047 #define MV64340_PCI_0_IO_SIZE                                       0x050
0048 #define MV64340_PCI_0_MEMORY0_BASE_ADDR                             0x058
0049 #define MV64340_PCI_0_MEMORY0_SIZE                                  0x060
0050 #define MV64340_PCI_0_MEMORY1_BASE_ADDR                             0x080
0051 #define MV64340_PCI_0_MEMORY1_SIZE                                  0x088
0052 #define MV64340_PCI_0_MEMORY2_BASE_ADDR                             0x258
0053 #define MV64340_PCI_0_MEMORY2_SIZE                                  0x260
0054 #define MV64340_PCI_0_MEMORY3_BASE_ADDR                             0x280
0055 #define MV64340_PCI_0_MEMORY3_SIZE                                  0x288
0056 
0057 /* PCI 1 BAR and size registers */
0058 #define MV64340_PCI_1_IO_BASE_ADDR                                  0x090
0059 #define MV64340_PCI_1_IO_SIZE                                       0x098
0060 #define MV64340_PCI_1_MEMORY0_BASE_ADDR                             0x0a0
0061 #define MV64340_PCI_1_MEMORY0_SIZE                                  0x0a8
0062 #define MV64340_PCI_1_MEMORY1_BASE_ADDR                             0x0b0
0063 #define MV64340_PCI_1_MEMORY1_SIZE                                  0x0b8
0064 #define MV64340_PCI_1_MEMORY2_BASE_ADDR                             0x2a0
0065 #define MV64340_PCI_1_MEMORY2_SIZE                                  0x2a8
0066 #define MV64340_PCI_1_MEMORY3_BASE_ADDR                             0x2b0
0067 #define MV64340_PCI_1_MEMORY3_SIZE                                  0x2b8
0068 
0069 /* SRAM base address */
0070 #define MV64340_INTEGRATED_SRAM_BASE_ADDR                           0x268
0071 
0072 /* internal registers space base address */
0073 #define MV64340_INTERNAL_SPACE_BASE_ADDR                            0x068
0074 
0075 /* Enables the CS , DEV_CS , PCI 0 and PCI 1 
0076    windows above */
0077 #define MV64340_BASE_ADDR_ENABLE                                    0x278
0078 
0079 /****************************************/
0080 /* PCI remap registers                  */
0081 /****************************************/
0082       /* PCI 0 */
0083 #define MV64340_PCI_0_IO_ADDR_REMAP                                 0x0f0
0084 #define MV64340_PCI_0_MEMORY0_LOW_ADDR_REMAP                        0x0f8
0085 #define MV64340_PCI_0_MEMORY0_HIGH_ADDR_REMAP                       0x320
0086 #define MV64340_PCI_0_MEMORY1_LOW_ADDR_REMAP                        0x100
0087 #define MV64340_PCI_0_MEMORY1_HIGH_ADDR_REMAP                       0x328
0088 #define MV64340_PCI_0_MEMORY2_LOW_ADDR_REMAP                        0x2f8
0089 #define MV64340_PCI_0_MEMORY2_HIGH_ADDR_REMAP                       0x330
0090 #define MV64340_PCI_0_MEMORY3_LOW_ADDR_REMAP                        0x300
0091 #define MV64340_PCI_0_MEMORY3_HIGH_ADDR_REMAP                       0x338
0092       /* PCI 1 */
0093 #define MV64340_PCI_1_IO_ADDR_REMAP                                 0x108
0094 #define MV64340_PCI_1_MEMORY0_LOW_ADDR_REMAP                        0x110
0095 #define MV64340_PCI_1_MEMORY0_HIGH_ADDR_REMAP                       0x340
0096 #define MV64340_PCI_1_MEMORY1_LOW_ADDR_REMAP                        0x118
0097 #define MV64340_PCI_1_MEMORY1_HIGH_ADDR_REMAP                       0x348
0098 #define MV64340_PCI_1_MEMORY2_LOW_ADDR_REMAP                        0x310
0099 #define MV64340_PCI_1_MEMORY2_HIGH_ADDR_REMAP                       0x350
0100 #define MV64340_PCI_1_MEMORY3_LOW_ADDR_REMAP                        0x318
0101 #define MV64340_PCI_1_MEMORY3_HIGH_ADDR_REMAP                       0x358
0102  
0103 #define MV64340_CPU_PCI_0_HEADERS_RETARGET_CONTROL                  0x3b0
0104 #define MV64340_CPU_PCI_0_HEADERS_RETARGET_BASE                     0x3b8
0105 #define MV64340_CPU_PCI_1_HEADERS_RETARGET_CONTROL                  0x3c0
0106 #define MV64340_CPU_PCI_1_HEADERS_RETARGET_BASE                     0x3c8
0107 #define MV64340_CPU_GE_HEADERS_RETARGET_CONTROL                     0x3d0
0108 #define MV64340_CPU_GE_HEADERS_RETARGET_BASE                        0x3d8
0109 #define MV64340_CPU_IDMA_HEADERS_RETARGET_CONTROL                   0x3e0
0110 #define MV64340_CPU_IDMA_HEADERS_RETARGET_BASE                      0x3e8
0111 
0112 /****************************************/
0113 /*         CPU Control Registers        */
0114 /****************************************/
0115 
0116 #define MV64340_CPU_CONFIG                                          0x000
0117 #define MV64340_CPU_MODE                                            0x120
0118 #define MV64340_CPU_MASTER_CONTROL                                  0x160
0119 #define MV64340_CPU_CROSS_BAR_CONTROL_LOW                           0x150
0120 #define MV64340_CPU_CROSS_BAR_CONTROL_HIGH                          0x158
0121 #define MV64340_CPU_CROSS_BAR_TIMEOUT                               0x168
0122 
0123 /****************************************/
0124 /* SMP RegisterS                        */
0125 /****************************************/
0126 
0127 #define MV64340_SMP_WHO_AM_I                                        0x200
0128 #define MV64340_SMP_CPU0_DOORBELL                                   0x214
0129 #define MV64340_SMP_CPU0_DOORBELL_CLEAR                             0x21C
0130 #define MV64340_SMP_CPU1_DOORBELL                                   0x224
0131 #define MV64340_SMP_CPU1_DOORBELL_CLEAR                             0x22C
0132 #define MV64340_SMP_CPU0_DOORBELL_MASK                              0x234
0133 #define MV64340_SMP_CPU1_DOORBELL_MASK                              0x23C
0134 #define MV64340_SMP_SEMAPHOR0                                       0x244
0135 #define MV64340_SMP_SEMAPHOR1                                       0x24c
0136 #define MV64340_SMP_SEMAPHOR2                                       0x254
0137 #define MV64340_SMP_SEMAPHOR3                                       0x25c
0138 #define MV64340_SMP_SEMAPHOR4                                       0x264
0139 #define MV64340_SMP_SEMAPHOR5                                       0x26c
0140 #define MV64340_SMP_SEMAPHOR6                                       0x274
0141 #define MV64340_SMP_SEMAPHOR7                                       0x27c
0142 
0143 /****************************************/
0144 /*  CPU Sync Barrier Register           */
0145 /****************************************/
0146 
0147 #define MV64340_CPU_0_SYNC_BARRIER_TRIGGER                          0x0c0
0148 #define MV64340_CPU_0_SYNC_BARRIER_VIRTUAL                          0x0c8
0149 #define MV64340_CPU_1_SYNC_BARRIER_TRIGGER                          0x0d0
0150 #define MV64340_CPU_1_SYNC_BARRIER_VIRTUAL                          0x0d8
0151 
0152 /****************************************/
0153 /* CPU Access Protect                   */
0154 /****************************************/
0155 
0156 #define MV64340_CPU_PROTECT_WINDOW_0_BASE_ADDR                      0x180
0157 #define MV64340_CPU_PROTECT_WINDOW_0_SIZE                           0x188
0158 #define MV64340_CPU_PROTECT_WINDOW_1_BASE_ADDR                      0x190
0159 #define MV64340_CPU_PROTECT_WINDOW_1_SIZE                           0x198
0160 #define MV64340_CPU_PROTECT_WINDOW_2_BASE_ADDR                      0x1a0
0161 #define MV64340_CPU_PROTECT_WINDOW_2_SIZE                           0x1a8
0162 #define MV64340_CPU_PROTECT_WINDOW_3_BASE_ADDR                      0x1b0
0163 #define MV64340_CPU_PROTECT_WINDOW_3_SIZE                           0x1b8
0164 
0165 
0166 /****************************************/
0167 /*          CPU Error Report            */
0168 /****************************************/
0169 
0170 #define MV64340_CPU_ERROR_ADDR_LOW                                  0x070
0171 #define MV64340_CPU_ERROR_ADDR_HIGH                                 0x078
0172 #define MV64340_CPU_ERROR_DATA_LOW                                  0x128
0173 #define MV64340_CPU_ERROR_DATA_HIGH                                 0x130
0174 #define MV64340_CPU_ERROR_PARITY                                    0x138
0175 #define MV64340_CPU_ERROR_CAUSE                                     0x140
0176 #define MV64340_CPU_ERROR_MASK                                      0x148
0177 
0178 /****************************************/
0179 /*      CPU Interface Debug Registers   */
0180 /****************************************/
0181 
0182 #define MV64340_PUNIT_SLAVE_DEBUG_LOW                               0x360
0183 #define MV64340_PUNIT_SLAVE_DEBUG_HIGH                              0x368
0184 #define MV64340_PUNIT_MASTER_DEBUG_LOW                              0x370
0185 #define MV64340_PUNIT_MASTER_DEBUG_HIGH                             0x378
0186 #define MV64340_PUNIT_MMASK                                         0x3e4
0187 
0188 /****************************************/
0189 /*  Integrated SRAM Registers           */
0190 /****************************************/
0191 
0192 #define MV64340_SRAM_CONFIG                                         0x380
0193 #define MV64340_SRAM_TEST_MODE                                      0X3F4
0194 #define MV64340_SRAM_ERROR_CAUSE                                    0x388
0195 #define MV64340_SRAM_ERROR_ADDR                                     0x390
0196 #define MV64340_SRAM_ERROR_ADDR_HIGH                                0X3F8
0197 #define MV64340_SRAM_ERROR_DATA_LOW                                 0x398
0198 #define MV64340_SRAM_ERROR_DATA_HIGH                                0x3a0
0199 #define MV64340_SRAM_ERROR_DATA_PARITY                              0x3a8
0200 
0201 /****************************************/
0202 /* SDRAM Configuration                  */
0203 /****************************************/
0204 
0205 #define MV64340_SDRAM_CONFIG                                        0x1400
0206 #define MV64340_D_UNIT_CONTROL_LOW                                  0x1404
0207 #define MV64340_D_UNIT_CONTROL_HIGH                                 0x1424
0208 #define MV64340_SDRAM_TIMING_CONTROL_LOW                            0x1408
0209 #define MV64340_SDRAM_TIMING_CONTROL_HIGH                           0x140c
0210 #define MV64340_SDRAM_ADDR_CONTROL                                  0x1410
0211 #define MV64340_SDRAM_OPEN_PAGES_CONTROL                            0x1414
0212 #define MV64340_SDRAM_OPERATION                                     0x1418
0213 #define MV64340_SDRAM_MODE                                          0x141c
0214 #define MV64340_EXTENDED_DRAM_MODE                                  0x1420
0215 #define MV64340_SDRAM_CROSS_BAR_CONTROL_LOW                         0x1430
0216 #define MV64340_SDRAM_CROSS_BAR_CONTROL_HIGH                        0x1434
0217 #define MV64340_SDRAM_CROSS_BAR_TIMEOUT                             0x1438
0218 #define MV64340_SDRAM_ADDR_CTRL_PADS_CALIBRATION                    0x14c0
0219 #define MV64340_SDRAM_DATA_PADS_CALIBRATION                         0x14c4
0220 
0221 /****************************************/
0222 /* SDRAM Error Report                   */
0223 /****************************************/
0224 
0225 #define MV64340_SDRAM_ERROR_DATA_LOW                                0x1444
0226 #define MV64340_SDRAM_ERROR_DATA_HIGH                               0x1440
0227 #define MV64340_SDRAM_ERROR_ADDR                                    0x1450
0228 #define MV64340_SDRAM_RECEIVED_ECC                                  0x1448
0229 #define MV64340_SDRAM_CALCULATED_ECC                                0x144c
0230 #define MV64340_SDRAM_ECC_CONTROL                                   0x1454
0231 #define MV64340_SDRAM_ECC_ERROR_COUNTER                             0x1458
0232 
0233 /******************************************/
0234 /*  Controlled Delay Line (CDL) Registers */
0235 /******************************************/
0236 
0237 #define MV64340_DFCDL_CONFIG0                                       0x1480
0238 #define MV64340_DFCDL_CONFIG1                                       0x1484
0239 #define MV64340_DLL_WRITE                                           0x1488
0240 #define MV64340_DLL_READ                                            0x148c
0241 #define MV64340_SRAM_ADDR                                           0x1490
0242 #define MV64340_SRAM_DATA0                                          0x1494
0243 #define MV64340_SRAM_DATA1                                          0x1498
0244 #define MV64340_SRAM_DATA2                                          0x149c
0245 #define MV64340_DFCL_PROBE                                          0x14a0
0246 
0247 /******************************************/
0248 /*   Debug Registers                      */
0249 /******************************************/
0250 
0251 #define MV64340_DUNIT_DEBUG_LOW                                     0x1460
0252 #define MV64340_DUNIT_DEBUG_HIGH                                    0x1464
0253 #define MV64340_DUNIT_MMASK                                         0X1b40
0254 
0255 /****************************************/
0256 /* Device Parameters            */
0257 /****************************************/
0258 
0259 #define MV64340_DEVICE_BANK0_PARAMETERS                 0x45c
0260 #define MV64340_DEVICE_BANK1_PARAMETERS                 0x460
0261 #define MV64340_DEVICE_BANK2_PARAMETERS                 0x464
0262 #define MV64340_DEVICE_BANK3_PARAMETERS                 0x468
0263 #define MV64340_DEVICE_BOOT_BANK_PARAMETERS             0x46c
0264 #define MV64340_DEVICE_INTERFACE_CONTROL                            0x4c0
0265 #define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_LOW              0x4c8
0266 #define MV64340_DEVICE_INTERFACE_CROSS_BAR_CONTROL_HIGH             0x4cc
0267 #define MV64340_DEVICE_INTERFACE_CROSS_BAR_TIMEOUT                  0x4c4
0268 
0269 /****************************************/
0270 /* Device interrupt registers       */
0271 /****************************************/
0272 
0273 #define MV64340_DEVICE_INTERRUPT_CAUSE                  0x4d0
0274 #define MV64340_DEVICE_INTERRUPT_MASK                   0x4d4
0275 #define MV64340_DEVICE_ERROR_ADDR                   0x4d8
0276 #define MV64340_DEVICE_ERROR_DATA                       0x4dc
0277 #define MV64340_DEVICE_ERROR_PARITY                     0x4e0
0278 
0279 /****************************************/
0280 /* Device debug registers           */
0281 /****************************************/
0282 
0283 #define MV64340_DEVICE_DEBUG_LOW                        0x4e4
0284 #define MV64340_DEVICE_DEBUG_HIGH                       0x4e8
0285 #define MV64340_RUNIT_MMASK                                         0x4f0
0286 
0287 /****************************************/
0288 /* PCI Slave Address Decoding registers */
0289 /****************************************/
0290 
0291 #define MV64340_PCI_0_CS_0_BANK_SIZE                                0xc08
0292 #define MV64340_PCI_1_CS_0_BANK_SIZE                                0xc88
0293 #define MV64340_PCI_0_CS_1_BANK_SIZE                                0xd08
0294 #define MV64340_PCI_1_CS_1_BANK_SIZE                                0xd88
0295 #define MV64340_PCI_0_CS_2_BANK_SIZE                                0xc0c
0296 #define MV64340_PCI_1_CS_2_BANK_SIZE                                0xc8c
0297 #define MV64340_PCI_0_CS_3_BANK_SIZE                                0xd0c
0298 #define MV64340_PCI_1_CS_3_BANK_SIZE                                0xd8c
0299 #define MV64340_PCI_0_DEVCS_0_BANK_SIZE                             0xc10
0300 #define MV64340_PCI_1_DEVCS_0_BANK_SIZE                             0xc90
0301 #define MV64340_PCI_0_DEVCS_1_BANK_SIZE                             0xd10
0302 #define MV64340_PCI_1_DEVCS_1_BANK_SIZE                             0xd90
0303 #define MV64340_PCI_0_DEVCS_2_BANK_SIZE                             0xd18
0304 #define MV64340_PCI_1_DEVCS_2_BANK_SIZE                             0xd98
0305 #define MV64340_PCI_0_DEVCS_3_BANK_SIZE                             0xc14
0306 #define MV64340_PCI_1_DEVCS_3_BANK_SIZE                             0xc94
0307 #define MV64340_PCI_0_DEVCS_BOOT_BANK_SIZE                          0xd14
0308 #define MV64340_PCI_1_DEVCS_BOOT_BANK_SIZE                          0xd94
0309 #define MV64340_PCI_0_P2P_MEM0_BAR_SIZE                             0xd1c
0310 #define MV64340_PCI_1_P2P_MEM0_BAR_SIZE                             0xd9c
0311 #define MV64340_PCI_0_P2P_MEM1_BAR_SIZE                             0xd20
0312 #define MV64340_PCI_1_P2P_MEM1_BAR_SIZE                             0xda0
0313 #define MV64340_PCI_0_P2P_I_O_BAR_SIZE                              0xd24
0314 #define MV64340_PCI_1_P2P_I_O_BAR_SIZE                              0xda4
0315 #define MV64340_PCI_0_CPU_BAR_SIZE                                  0xd28
0316 #define MV64340_PCI_1_CPU_BAR_SIZE                                  0xda8
0317 #define MV64340_PCI_0_INTERNAL_SRAM_BAR_SIZE                        0xe00
0318 #define MV64340_PCI_1_INTERNAL_SRAM_BAR_SIZE                        0xe80
0319 #define MV64340_PCI_0_EXPANSION_ROM_BAR_SIZE                        0xd2c
0320 #define MV64340_PCI_1_EXPANSION_ROM_BAR_SIZE                        0xd9c
0321 #define MV64340_PCI_0_BASE_ADDR_REG_ENABLE                          0xc3c
0322 #define MV64340_PCI_1_BASE_ADDR_REG_ENABLE                          0xcbc
0323 #define MV64340_PCI_0_CS_0_BASE_ADDR_REMAP              0xc48
0324 #define MV64340_PCI_1_CS_0_BASE_ADDR_REMAP              0xcc8
0325 #define MV64340_PCI_0_CS_1_BASE_ADDR_REMAP              0xd48
0326 #define MV64340_PCI_1_CS_1_BASE_ADDR_REMAP              0xdc8
0327 #define MV64340_PCI_0_CS_2_BASE_ADDR_REMAP              0xc4c
0328 #define MV64340_PCI_1_CS_2_BASE_ADDR_REMAP              0xccc
0329 #define MV64340_PCI_0_CS_3_BASE_ADDR_REMAP              0xd4c
0330 #define MV64340_PCI_1_CS_3_BASE_ADDR_REMAP              0xdcc
0331 #define MV64340_PCI_0_CS_0_BASE_HIGH_ADDR_REMAP             0xF04
0332 #define MV64340_PCI_1_CS_0_BASE_HIGH_ADDR_REMAP             0xF84
0333 #define MV64340_PCI_0_CS_1_BASE_HIGH_ADDR_REMAP             0xF08
0334 #define MV64340_PCI_1_CS_1_BASE_HIGH_ADDR_REMAP             0xF88
0335 #define MV64340_PCI_0_CS_2_BASE_HIGH_ADDR_REMAP             0xF0C
0336 #define MV64340_PCI_1_CS_2_BASE_HIGH_ADDR_REMAP             0xF8C
0337 #define MV64340_PCI_0_CS_3_BASE_HIGH_ADDR_REMAP             0xF10
0338 #define MV64340_PCI_1_CS_3_BASE_HIGH_ADDR_REMAP             0xF90
0339 #define MV64340_PCI_0_DEVCS_0_BASE_ADDR_REMAP               0xc50
0340 #define MV64340_PCI_1_DEVCS_0_BASE_ADDR_REMAP               0xcd0
0341 #define MV64340_PCI_0_DEVCS_1_BASE_ADDR_REMAP               0xd50
0342 #define MV64340_PCI_1_DEVCS_1_BASE_ADDR_REMAP               0xdd0
0343 #define MV64340_PCI_0_DEVCS_2_BASE_ADDR_REMAP               0xd58
0344 #define MV64340_PCI_1_DEVCS_2_BASE_ADDR_REMAP               0xdd8
0345 #define MV64340_PCI_0_DEVCS_3_BASE_ADDR_REMAP                   0xc54
0346 #define MV64340_PCI_1_DEVCS_3_BASE_ADDR_REMAP                   0xcd4
0347 #define MV64340_PCI_0_DEVCS_BOOTCS_BASE_ADDR_REMAP              0xd54
0348 #define MV64340_PCI_1_DEVCS_BOOTCS_BASE_ADDR_REMAP              0xdd4
0349 #define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xd5c
0350 #define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_LOW                  0xddc
0351 #define MV64340_PCI_0_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xd60
0352 #define MV64340_PCI_1_P2P_MEM0_BASE_ADDR_REMAP_HIGH                 0xde0
0353 #define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xd64
0354 #define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_LOW                  0xde4
0355 #define MV64340_PCI_0_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xd68
0356 #define MV64340_PCI_1_P2P_MEM1_BASE_ADDR_REMAP_HIGH                 0xde8
0357 #define MV64340_PCI_0_P2P_I_O_BASE_ADDR_REMAP                       0xd6c
0358 #define MV64340_PCI_1_P2P_I_O_BASE_ADDR_REMAP                       0xdec 
0359 #define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_LOW                       0xd70
0360 #define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_LOW                       0xdf0
0361 #define MV64340_PCI_0_CPU_BASE_ADDR_REMAP_HIGH                      0xd74
0362 #define MV64340_PCI_1_CPU_BASE_ADDR_REMAP_HIGH                      0xdf4
0363 #define MV64340_PCI_0_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf00
0364 #define MV64340_PCI_1_INTEGRATED_SRAM_BASE_ADDR_REMAP               0xf80
0365 #define MV64340_PCI_0_EXPANSION_ROM_BASE_ADDR_REMAP                 0xf38
0366 #define MV64340_PCI_1_EXPANSION_ROM_BASE_ADDR_REMAP                 0xfb8
0367 #define MV64340_PCI_0_ADDR_DECODE_CONTROL                           0xd3c
0368 #define MV64340_PCI_1_ADDR_DECODE_CONTROL                           0xdbc
0369 #define MV64340_PCI_0_HEADERS_RETARGET_CONTROL                      0xF40
0370 #define MV64340_PCI_1_HEADERS_RETARGET_CONTROL                      0xFc0
0371 #define MV64340_PCI_0_HEADERS_RETARGET_BASE                         0xF44
0372 #define MV64340_PCI_1_HEADERS_RETARGET_BASE                         0xFc4
0373 #define MV64340_PCI_0_HEADERS_RETARGET_HIGH                         0xF48
0374 #define MV64340_PCI_1_HEADERS_RETARGET_HIGH                         0xFc8
0375 
0376 /***********************************/
0377 /*   PCI Control Register Map      */
0378 /***********************************/
0379 
0380 #define MV64340_PCI_0_DLL_STATUS_AND_COMMAND                        0x1d20
0381 #define MV64340_PCI_1_DLL_STATUS_AND_COMMAND                        0x1da0
0382 #define MV64340_PCI_0_MPP_PADS_DRIVE_CONTROL                        0x1d1C
0383 #define MV64340_PCI_1_MPP_PADS_DRIVE_CONTROL                        0x1d9C
0384 #define MV64340_PCI_0_COMMAND                           0xc00
0385 #define MV64340_PCI_1_COMMAND                       0xc80
0386 #define MV64340_PCI_0_MODE                                          0xd00
0387 #define MV64340_PCI_1_MODE                                          0xd80
0388 #define MV64340_PCI_0_RETRY                         0xc04
0389 #define MV64340_PCI_1_RETRY                         0xc84
0390 #define MV64340_PCI_0_READ_BUFFER_DISCARD_TIMER                     0xd04
0391 #define MV64340_PCI_1_READ_BUFFER_DISCARD_TIMER                     0xd84
0392 #define MV64340_PCI_0_MSI_TRIGGER_TIMER                             0xc38
0393 #define MV64340_PCI_1_MSI_TRIGGER_TIMER                             0xcb8
0394 #define MV64340_PCI_0_ARBITER_CONTROL                               0x1d00
0395 #define MV64340_PCI_1_ARBITER_CONTROL                               0x1d80
0396 #define MV64340_PCI_0_CROSS_BAR_CONTROL_LOW                         0x1d08
0397 #define MV64340_PCI_1_CROSS_BAR_CONTROL_LOW                         0x1d88
0398 #define MV64340_PCI_0_CROSS_BAR_CONTROL_HIGH                        0x1d0c
0399 #define MV64340_PCI_1_CROSS_BAR_CONTROL_HIGH                        0x1d8c
0400 #define MV64340_PCI_0_CROSS_BAR_TIMEOUT                             0x1d04
0401 #define MV64340_PCI_1_CROSS_BAR_TIMEOUT                             0x1d84
0402 #define MV64340_PCI_0_SYNC_BARRIER_TRIGGER_REG                      0x1D18
0403 #define MV64340_PCI_1_SYNC_BARRIER_TRIGGER_REG                      0x1D98
0404 #define MV64340_PCI_0_SYNC_BARRIER_VIRTUAL_REG                      0x1d10
0405 #define MV64340_PCI_1_SYNC_BARRIER_VIRTUAL_REG                      0x1d90
0406 #define MV64340_PCI_0_P2P_CONFIG                                    0x1d14
0407 #define MV64340_PCI_1_P2P_CONFIG                                    0x1d94
0408 
0409 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_LOW                     0x1e00
0410 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_0_HIGH                    0x1e04
0411 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_0                         0x1e08
0412 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_LOW                     0x1e10
0413 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_1_HIGH                    0x1e14
0414 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_1                         0x1e18
0415 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_LOW                     0x1e20
0416 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_2_HIGH                    0x1e24
0417 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_2                         0x1e28
0418 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_LOW                     0x1e30
0419 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_3_HIGH                    0x1e34
0420 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_3                         0x1e38
0421 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_LOW                     0x1e40
0422 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_4_HIGH                    0x1e44
0423 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_4                         0x1e48
0424 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_LOW                     0x1e50
0425 #define MV64340_PCI_0_ACCESS_CONTROL_BASE_5_HIGH                    0x1e54
0426 #define MV64340_PCI_0_ACCESS_CONTROL_SIZE_5                         0x1e58
0427 
0428 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_LOW                     0x1e80
0429 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_0_HIGH                    0x1e84
0430 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_0                         0x1e88
0431 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_LOW                     0x1e90
0432 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_1_HIGH                    0x1e94
0433 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_1                         0x1e98
0434 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_LOW                     0x1ea0
0435 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_2_HIGH                    0x1ea4
0436 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_2                         0x1ea8
0437 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_LOW                     0x1eb0
0438 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_3_HIGH                    0x1eb4
0439 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_3                         0x1eb8
0440 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_LOW                     0x1ec0
0441 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_4_HIGH                    0x1ec4
0442 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_4                         0x1ec8
0443 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_LOW                     0x1ed0
0444 #define MV64340_PCI_1_ACCESS_CONTROL_BASE_5_HIGH                    0x1ed4
0445 #define MV64340_PCI_1_ACCESS_CONTROL_SIZE_5                         0x1ed8
0446 
0447 /****************************************/
0448 /*   PCI Configuration Access Registers */
0449 /****************************************/
0450 
0451 #define MV64340_PCI_0_CONFIG_ADDR                   0xcf8
0452 #define MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG                       0xcfc
0453 #define MV64340_PCI_1_CONFIG_ADDR                   0xc78
0454 #define MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG                       0xc7c
0455 #define MV64340_PCI_0_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG             0xc34
0456 #define MV64340_PCI_1_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG             0xcb4
0457 
0458 /****************************************/
0459 /*   PCI Error Report Registers         */
0460 /****************************************/
0461 
0462 #define MV64340_PCI_0_SERR_MASK                     0xc28
0463 #define MV64340_PCI_1_SERR_MASK                     0xca8
0464 #define MV64340_PCI_0_ERROR_ADDR_LOW                                0x1d40
0465 #define MV64340_PCI_1_ERROR_ADDR_LOW                                0x1dc0
0466 #define MV64340_PCI_0_ERROR_ADDR_HIGH                               0x1d44
0467 #define MV64340_PCI_1_ERROR_ADDR_HIGH                               0x1dc4
0468 #define MV64340_PCI_0_ERROR_ATTRIBUTE                               0x1d48
0469 #define MV64340_PCI_1_ERROR_ATTRIBUTE                               0x1dc8
0470 #define MV64340_PCI_0_ERROR_COMMAND                                 0x1d50
0471 #define MV64340_PCI_1_ERROR_COMMAND                                 0x1dd0
0472 #define MV64340_PCI_0_ERROR_CAUSE                                   0x1d58
0473 #define MV64340_PCI_1_ERROR_CAUSE                                   0x1dd8
0474 #define MV64340_PCI_0_ERROR_MASK                                    0x1d5c
0475 #define MV64340_PCI_1_ERROR_MASK                                    0x1ddc
0476 
0477 /****************************************/
0478 /*   PCI Debug Registers                */
0479 /****************************************/
0480 
0481 #define MV64340_PCI_0_MMASK                                         0X1D24
0482 #define MV64340_PCI_1_MMASK                                         0X1DA4
0483 
0484 /*********************************************/
0485 /* PCI Configuration, Function 0, Registers  */
0486 /*********************************************/
0487 
0488 #define MV64340_PCI_DEVICE_AND_VENDOR_ID                0x000
0489 #define MV64340_PCI_STATUS_AND_COMMAND                  0x004
0490 #define MV64340_PCI_CLASS_CODE_AND_REVISION_ID              0x008
0491 #define MV64340_PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE       0x00C
0492 
0493 #define MV64340_PCI_SCS_0_BASE_ADDR_LOW                     0x010
0494 #define MV64340_PCI_SCS_0_BASE_ADDR_HIGH                    0x014
0495 #define MV64340_PCI_SCS_1_BASE_ADDR_LOW                         0x018
0496 #define MV64340_PCI_SCS_1_BASE_ADDR_HIGH                    0x01C
0497 #define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_LOW           0x020
0498 #define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_HIGH          0x024
0499 #define MV64340_PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID        0x02c
0500 #define MV64340_PCI_EXPANSION_ROM_BASE_ADDR_REG                     0x030
0501 #define MV64340_PCI_CAPABILTY_LIST_POINTER                          0x034
0502 #define MV64340_PCI_INTERRUPT_PIN_AND_LINE              0x03C
0503        /* capability list */
0504 #define MV64340_PCI_POWER_MANAGEMENT_CAPABILITY                     0x040
0505 #define MV64340_PCI_POWER_MANAGEMENT_STATUS_AND_CONTROL             0x044
0506 #define MV64340_PCI_VPD_ADDR                                        0x048
0507 #define MV64340_PCI_VPD_DATA                                        0x04c
0508 #define MV64340_PCI_MSI_MESSAGE_CONTROL                             0x050
0509 #define MV64340_PCI_MSI_MESSAGE_ADDR                                0x054
0510 #define MV64340_PCI_MSI_MESSAGE_UPPER_ADDR                          0x058
0511 #define MV64340_PCI_MSI_MESSAGE_DATA                                0x05c
0512 #define MV64340_PCI_X_COMMAND                                       0x060
0513 #define MV64340_PCI_X_STATUS                                        0x064
0514 #define MV64340_PCI_COMPACT_PCI_HOT_SWAP                            0x068
0515 
0516 /***********************************************/
0517 /*   PCI Configuration, Function 1, Registers  */
0518 /***********************************************/
0519 
0520 #define MV64340_PCI_SCS_2_BASE_ADDR_LOW                 0x110
0521 #define MV64340_PCI_SCS_2_BASE_ADDR_HIGH                0x114
0522 #define MV64340_PCI_SCS_3_BASE_ADDR_LOW                 0x118
0523 #define MV64340_PCI_SCS_3_BASE_ADDR_HIGH                0x11c
0524 #define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_LOW                 0x120
0525 #define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_HIGH                0x124
0526 
0527 /***********************************************/
0528 /*  PCI Configuration, Function 2, Registers   */
0529 /***********************************************/
0530 
0531 #define MV64340_PCI_DEVCS_0_BASE_ADDR_LOW                   0x210
0532 #define MV64340_PCI_DEVCS_0_BASE_ADDR_HIGH              0x214
0533 #define MV64340_PCI_DEVCS_1_BASE_ADDR_LOW               0x218
0534 #define MV64340_PCI_DEVCS_1_BASE_ADDR_HIGH                  0x21c
0535 #define MV64340_PCI_DEVCS_2_BASE_ADDR_LOW               0x220
0536 #define MV64340_PCI_DEVCS_2_BASE_ADDR_HIGH                  0x224
0537 
0538 /***********************************************/
0539 /*  PCI Configuration, Function 3, Registers   */
0540 /***********************************************/
0541 
0542 #define MV64340_PCI_DEVCS_3_BASE_ADDR_LOW                   0x310
0543 #define MV64340_PCI_DEVCS_3_BASE_ADDR_HIGH              0x314
0544 #define MV64340_PCI_BOOT_CS_BASE_ADDR_LOW               0x318
0545 #define MV64340_PCI_BOOT_CS_BASE_ADDR_HIGH                  0x31c
0546 #define MV64340_PCI_CPU_BASE_ADDR_LOW                   0x220
0547 #define MV64340_PCI_CPU_BASE_ADDR_HIGH                      0x224
0548 
0549 /***********************************************/
0550 /*  PCI Configuration, Function 4, Registers   */
0551 /***********************************************/
0552 
0553 #define MV64340_PCI_P2P_MEM0_BASE_ADDR_LOW                  0x410
0554 #define MV64340_PCI_P2P_MEM0_BASE_ADDR_HIGH                 0x414
0555 #define MV64340_PCI_P2P_MEM1_BASE_ADDR_LOW                  0x418
0556 #define MV64340_PCI_P2P_MEM1_BASE_ADDR_HIGH                 0x41c
0557 #define MV64340_PCI_P2P_I_O_BASE_ADDR                               0x420
0558 #define MV64340_PCI_INTERNAL_REGS_I_O_MAPPED_BASE_ADDR              0x424
0559 
0560 /****************************************/
0561 /* Messaging Unit Registers (I20)       */
0562 /****************************************/
0563 
0564 #define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_0_SIDE         0x010
0565 #define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_0_SIDE             0x014
0566 #define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_0_SIDE            0x018
0567 #define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_0_SIDE            0x01C
0568 #define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_0_SIDE             0x020
0569 #define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE          0x024
0570 #define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE       0x028
0571 #define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_0_SIDE            0x02C
0572 #define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_0_SIDE         0x030
0573 #define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE          0x034
0574 #define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE       0x040
0575 #define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_0_SIDE      0x044
0576 #define MV64340_I2O_QUEUE_CONTROL_REG_PCI_0_SIDE            0x050
0577 #define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_0_SIDE          0x054
0578 #define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE        0x060
0579 #define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE        0x064
0580 #define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE        0x068
0581 #define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE        0x06C
0582 #define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_0_SIDE       0x070
0583 #define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_0_SIDE       0x074
0584 #define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_0_SIDE       0x0F8
0585 #define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_0_SIDE       0x0FC
0586 
0587 #define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_1_SIDE         0x090
0588 #define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_1_SIDE             0x094
0589 #define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_1_SIDE            0x098
0590 #define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_1_SIDE            0x09C
0591 #define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_1_SIDE             0x0A0
0592 #define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE          0x0A4
0593 #define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE       0x0A8
0594 #define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_1_SIDE            0x0AC
0595 #define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_PCI_1_SIDE         0x0B0
0596 #define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE          0x0B4
0597 #define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE       0x0C0
0598 #define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_PCI_1_SIDE      0x0C4
0599 #define MV64340_I2O_QUEUE_CONTROL_REG_PCI_1_SIDE            0x0D0
0600 #define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_1_SIDE          0x0D4
0601 #define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE        0x0E0
0602 #define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE        0x0E4
0603 #define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE        0x0E8
0604 #define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE        0x0EC
0605 #define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_PCI_1_SIDE       0x0F0
0606 #define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_PCI_1_SIDE       0x0F4
0607 #define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_PCI_1_SIDE       0x078
0608 #define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_PCI_1_SIDE       0x07C
0609 
0610 #define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU0_SIDE          0x1C10
0611 #define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU0_SIDE              0x1C14
0612 #define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU0_SIDE             0x1C18
0613 #define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU0_SIDE             0x1C1C
0614 #define MV64340_I2O_INBOUND_DOORBELL_REG_CPU0_SIDE              0x1C20
0615 #define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE       0x1C24
0616 #define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU0_SIDE        0x1C28
0617 #define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU0_SIDE             0x1C2C
0618 #define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE          0x1C30
0619 #define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU0_SIDE           0x1C34
0620 #define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE        0x1C40
0621 #define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU0_SIDE       0x1C44
0622 #define MV64340_I2O_QUEUE_CONTROL_REG_CPU0_SIDE             0x1C50
0623 #define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU0_SIDE           0x1C54
0624 #define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE         0x1C60
0625 #define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE         0x1C64
0626 #define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE         0x1C68
0627 #define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE         0x1C6C
0628 #define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU0_SIDE        0x1C70
0629 #define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU0_SIDE        0x1C74
0630 #define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU0_SIDE        0x1CF8
0631 #define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU0_SIDE        0x1CFC
0632 #define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU1_SIDE          0x1C90
0633 #define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU1_SIDE              0x1C94
0634 #define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU1_SIDE             0x1C98
0635 #define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU1_SIDE             0x1C9C
0636 #define MV64340_I2O_INBOUND_DOORBELL_REG_CPU1_SIDE              0x1CA0
0637 #define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE       0x1CA4
0638 #define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU1_SIDE        0x1CA8
0639 #define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU1_SIDE             0x1CAC
0640 #define MV64340_I2O_OUTBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE          0x1CB0
0641 #define MV64340_I2O_OUTBOUND_INTERRUPT_MASK_REG_CPU1_SIDE           0x1CB4
0642 #define MV64340_I2O_INBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE        0x1CC0
0643 #define MV64340_I2O_OUTBOUND_QUEUE_PORT_VIRTUAL_REG_CPU1_SIDE       0x1CC4
0644 #define MV64340_I2O_QUEUE_CONTROL_REG_CPU1_SIDE             0x1CD0
0645 #define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU1_SIDE           0x1CD4
0646 #define MV64340_I2O_INBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE         0x1CE0
0647 #define MV64340_I2O_INBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE         0x1CE4
0648 #define MV64340_I2O_INBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE         0x1CE8
0649 #define MV64340_I2O_INBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE         0x1CEC
0650 #define MV64340_I2O_OUTBOUND_FREE_HEAD_POINTER_REG_CPU1_SIDE        0x1CF0
0651 #define MV64340_I2O_OUTBOUND_FREE_TAIL_POINTER_REG_CPU1_SIDE        0x1CF4
0652 #define MV64340_I2O_OUTBOUND_POST_HEAD_POINTER_REG_CPU1_SIDE        0x1C78
0653 #define MV64340_I2O_OUTBOUND_POST_TAIL_POINTER_REG_CPU1_SIDE        0x1C7C
0654 
0655 /****************************************/
0656 /*        Ethernet Unit Registers       */
0657 /****************************************/
0658 
0659 /*******************************************/
0660 /*          CUNIT  Registers               */
0661 /*******************************************/
0662 
0663          /* Address Decoding Register Map */
0664            
0665 #define MV64340_CUNIT_BASE_ADDR_REG0                                0xf200
0666 #define MV64340_CUNIT_BASE_ADDR_REG1                                0xf208
0667 #define MV64340_CUNIT_BASE_ADDR_REG2                                0xf210
0668 #define MV64340_CUNIT_BASE_ADDR_REG3                                0xf218
0669 #define MV64340_CUNIT_SIZE0                                         0xf204
0670 #define MV64340_CUNIT_SIZE1                                         0xf20c
0671 #define MV64340_CUNIT_SIZE2                                         0xf214
0672 #define MV64340_CUNIT_SIZE3                                         0xf21c
0673 #define MV64340_CUNIT_HIGH_ADDR_REMAP_REG0                          0xf240
0674 #define MV64340_CUNIT_HIGH_ADDR_REMAP_REG1                          0xf244
0675 #define MV64340_CUNIT_BASE_ADDR_ENABLE_REG                          0xf250
0676 #define MV64340_MPSC0_ACCESS_PROTECTION_REG                         0xf254
0677 #define MV64340_MPSC1_ACCESS_PROTECTION_REG                         0xf258
0678 #define MV64340_CUNIT_INTERNAL_SPACE_BASE_ADDR_REG                  0xf25C
0679 
0680         /*  Error Report Registers  */
0681 
0682 #define MV64340_CUNIT_INTERRUPT_CAUSE_REG                           0xf310
0683 #define MV64340_CUNIT_INTERRUPT_MASK_REG                            0xf314
0684 #define MV64340_CUNIT_ERROR_ADDR                                    0xf318
0685 
0686         /*  Cunit Control Registers */
0687 
0688 #define MV64340_CUNIT_ARBITER_CONTROL_REG                           0xf300
0689 #define MV64340_CUNIT_CONFIG_REG                                    0xb40c
0690 #define MV64340_CUNIT_CRROSBAR_TIMEOUT_REG                          0xf304
0691 
0692         /*  Cunit Debug Registers   */
0693 
0694 #define MV64340_CUNIT_DEBUG_LOW                                     0xf340
0695 #define MV64340_CUNIT_DEBUG_HIGH                                    0xf344
0696 #define MV64340_CUNIT_MMASK                                         0xf380
0697 
0698         /*  MPSCs Clocks Routing Registers  */
0699 
0700 #define MV64340_MPSC_ROUTING_REG                                    0xb400
0701 #define MV64340_MPSC_RX_CLOCK_ROUTING_REG                           0xb404
0702 #define MV64340_MPSC_TX_CLOCK_ROUTING_REG                           0xb408
0703 
0704         /*  MPSCs Interrupts Registers    */
0705 
0706 #define MV64340_MPSC_CAUSE_REG(port)                               (0xb804 + (port<<3))
0707 #define MV64340_MPSC_MASK_REG(port)                                (0xb884 + (port<<3))
0708  
0709 #define MV64340_MPSC_MAIN_CONFIG_LOW(port)                         (0x8000 + (port<<12))
0710 #define MV64340_MPSC_MAIN_CONFIG_HIGH(port)                        (0x8004 + (port<<12))    
0711 #define MV64340_MPSC_PROTOCOL_CONFIG(port)                         (0x8008 + (port<<12))    
0712 #define MV64340_MPSC_CHANNEL_REG1(port)                            (0x800c + (port<<12))    
0713 #define MV64340_MPSC_CHANNEL_REG2(port)                            (0x8010 + (port<<12))    
0714 #define MV64340_MPSC_CHANNEL_REG3(port)                            (0x8014 + (port<<12))    
0715 #define MV64340_MPSC_CHANNEL_REG4(port)                            (0x8018 + (port<<12))    
0716 #define MV64340_MPSC_CHANNEL_REG5(port)                            (0x801c + (port<<12))    
0717 #define MV64340_MPSC_CHANNEL_REG6(port)                            (0x8020 + (port<<12))    
0718 #define MV64340_MPSC_CHANNEL_REG7(port)                            (0x8024 + (port<<12))    
0719 #define MV64340_MPSC_CHANNEL_REG8(port)                            (0x8028 + (port<<12))    
0720 #define MV64340_MPSC_CHANNEL_REG9(port)                            (0x802c + (port<<12))    
0721 #define MV64340_MPSC_CHANNEL_REG10(port)                           (0x8030 + (port<<12))    
0722         
0723         /*  MPSC0 Registers      */
0724 
0725 
0726 /***************************************/
0727 /*          SDMA Registers             */
0728 /***************************************/
0729 
0730 #define MV64340_SDMA_CONFIG_REG(channel)                        (0x4000 + (channel<<13))        
0731 #define MV64340_SDMA_COMMAND_REG(channel)                       (0x4008 + (channel<<13))        
0732 #define MV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel)     (0x4810 + (channel<<13))        
0733 #define MV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel)     (0x4c10 + (channel<<13))        
0734 #define MV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel)       (0x4c14 + (channel<<13)) 
0735 
0736 #define MV64340_SDMA_CAUSE_REG                                      0xb800
0737 #define MV64340_SDMA_MASK_REG                                       0xb880
0738          
0739 /* BRG Interrupts */
0740 
0741 #define MV64340_BRG_CONFIG_REG(brg)                              (0xb200 + (brg<<3))
0742 #define MV64340_BRG_BAUDE_TUNING_REG(brg)                        (0xb208 + (brg<<3))
0743 #define MV64340_BRG_CAUSE_REG                                       0xb834
0744 #define MV64340_BRG_MASK_REG                                        0xb8b4
0745 
0746 /****************************************/
0747 /* DMA Channel Control          */
0748 /****************************************/
0749 
0750 #define MV64340_DMA_CHANNEL0_CONTROL                    0x840
0751 #define MV64340_DMA_CHANNEL0_CONTROL_HIGH               0x880
0752 #define MV64340_DMA_CHANNEL1_CONTROL                    0x844
0753 #define MV64340_DMA_CHANNEL1_CONTROL_HIGH               0x884
0754 #define MV64340_DMA_CHANNEL2_CONTROL                    0x848
0755 #define MV64340_DMA_CHANNEL2_CONTROL_HIGH               0x888
0756 #define MV64340_DMA_CHANNEL3_CONTROL                    0x84C
0757 #define MV64340_DMA_CHANNEL3_CONTROL_HIGH               0x88C
0758 
0759 
0760 /****************************************/
0761 /*           IDMA Registers             */
0762 /****************************************/
0763 
0764 #define MV64340_DMA_CHANNEL0_BYTE_COUNT                             0x800
0765 #define MV64340_DMA_CHANNEL1_BYTE_COUNT                             0x804
0766 #define MV64340_DMA_CHANNEL2_BYTE_COUNT                             0x808
0767 #define MV64340_DMA_CHANNEL3_BYTE_COUNT                             0x80C
0768 #define MV64340_DMA_CHANNEL0_SOURCE_ADDR                            0x810
0769 #define MV64340_DMA_CHANNEL1_SOURCE_ADDR                            0x814
0770 #define MV64340_DMA_CHANNEL2_SOURCE_ADDR                            0x818
0771 #define MV64340_DMA_CHANNEL3_SOURCE_ADDR                            0x81c
0772 #define MV64340_DMA_CHANNEL0_DESTINATION_ADDR                       0x820
0773 #define MV64340_DMA_CHANNEL1_DESTINATION_ADDR                       0x824
0774 #define MV64340_DMA_CHANNEL2_DESTINATION_ADDR                       0x828
0775 #define MV64340_DMA_CHANNEL3_DESTINATION_ADDR                       0x82C
0776 #define MV64340_DMA_CHANNEL0_NEXT_DESCRIPTOR_POINTER                0x830
0777 #define MV64340_DMA_CHANNEL1_NEXT_DESCRIPTOR_POINTER                0x834
0778 #define MV64340_DMA_CHANNEL2_NEXT_DESCRIPTOR_POINTER                0x838
0779 #define MV64340_DMA_CHANNEL3_NEXT_DESCRIPTOR_POINTER                0x83C
0780 #define MV64340_DMA_CHANNEL0_CURRENT_DESCRIPTOR_POINTER             0x870
0781 #define MV64340_DMA_CHANNEL1_CURRENT_DESCRIPTOR_POINTER             0x874
0782 #define MV64340_DMA_CHANNEL2_CURRENT_DESCRIPTOR_POINTER             0x878
0783 #define MV64340_DMA_CHANNEL3_CURRENT_DESCRIPTOR_POINTER             0x87C
0784 
0785  /*  IDMA Address Decoding Base Address Registers  */
0786  
0787 #define MV64340_DMA_BASE_ADDR_REG0                                  0xa00
0788 #define MV64340_DMA_BASE_ADDR_REG1                                  0xa08
0789 #define MV64340_DMA_BASE_ADDR_REG2                                  0xa10
0790 #define MV64340_DMA_BASE_ADDR_REG3                                  0xa18
0791 #define MV64340_DMA_BASE_ADDR_REG4                                  0xa20
0792 #define MV64340_DMA_BASE_ADDR_REG5                                  0xa28
0793 #define MV64340_DMA_BASE_ADDR_REG6                                  0xa30
0794 #define MV64340_DMA_BASE_ADDR_REG7                                  0xa38
0795  
0796  /*  IDMA Address Decoding Size Address Register   */
0797  
0798 #define MV64340_DMA_SIZE_REG0                                       0xa04
0799 #define MV64340_DMA_SIZE_REG1                                       0xa0c
0800 #define MV64340_DMA_SIZE_REG2                                       0xa14
0801 #define MV64340_DMA_SIZE_REG3                                       0xa1c
0802 #define MV64340_DMA_SIZE_REG4                                       0xa24
0803 #define MV64340_DMA_SIZE_REG5                                       0xa2c
0804 #define MV64340_DMA_SIZE_REG6                                       0xa34
0805 #define MV64340_DMA_SIZE_REG7                                       0xa3C
0806 
0807  /* IDMA Address Decoding High Address Remap and Access 
0808                   Protection Registers                    */
0809                   
0810 #define MV64340_DMA_HIGH_ADDR_REMAP_REG0                            0xa60
0811 #define MV64340_DMA_HIGH_ADDR_REMAP_REG1                            0xa64
0812 #define MV64340_DMA_HIGH_ADDR_REMAP_REG2                            0xa68
0813 #define MV64340_DMA_HIGH_ADDR_REMAP_REG3                            0xa6C
0814 #define MV64340_DMA_BASE_ADDR_ENABLE_REG                            0xa80
0815 #define MV64340_DMA_CHANNEL0_ACCESS_PROTECTION_REG                  0xa70
0816 #define MV64340_DMA_CHANNEL1_ACCESS_PROTECTION_REG                  0xa74
0817 #define MV64340_DMA_CHANNEL2_ACCESS_PROTECTION_REG                  0xa78
0818 #define MV64340_DMA_CHANNEL3_ACCESS_PROTECTION_REG                  0xa7c
0819 #define MV64340_DMA_ARBITER_CONTROL                                 0x860
0820 #define MV64340_DMA_CROSS_BAR_TIMEOUT                               0x8d0
0821 
0822  /*  IDMA Headers Retarget Registers   */
0823 
0824 #define MV64340_DMA_HEADERS_RETARGET_CONTROL                        0xa84
0825 #define MV64340_DMA_HEADERS_RETARGET_BASE                           0xa88
0826 
0827  /*  IDMA Interrupt Register  */
0828 
0829 #define MV64340_DMA_INTERRUPT_CAUSE_REG                             0x8c0
0830 #define MV64340_DMA_INTERRUPT_CAUSE_MASK                            0x8c4
0831 #define MV64340_DMA_ERROR_ADDR                                      0x8c8
0832 #define MV64340_DMA_ERROR_SELECT                                    0x8cc
0833 
0834  /*  IDMA Debug Register ( for internal use )    */
0835 
0836 #define MV64340_DMA_DEBUG_LOW                                       0x8e0
0837 #define MV64340_DMA_DEBUG_HIGH                                      0x8e4
0838 #define MV64340_DMA_SPARE                                           0xA8C
0839 
0840 /****************************************/
0841 /* Timer_Counter            */
0842 /****************************************/
0843 
0844 #define MV64340_TIMER_COUNTER0                      0x850
0845 #define MV64340_TIMER_COUNTER1                      0x854
0846 #define MV64340_TIMER_COUNTER2                      0x858
0847 #define MV64340_TIMER_COUNTER3                      0x85C
0848 #define MV64340_TIMER_COUNTER_0_3_CONTROL               0x864
0849 #define MV64340_TIMER_COUNTER_0_3_INTERRUPT_CAUSE           0x868
0850 #define MV64340_TIMER_COUNTER_0_3_INTERRUPT_MASK                0x86c
0851 
0852 /****************************************/
0853 /*         Watchdog registers           */
0854 /****************************************/
0855 
0856 #define MV64340_WATCHDOG_CONFIG_REG                                 0xb410
0857 #define MV64340_WATCHDOG_VALUE_REG                                  0xb414
0858 
0859 /****************************************/
0860 /* I2C Registers                        */
0861 /****************************************/
0862 
0863 #define MV64XXX_I2C_OFFSET                                          0xc000
0864 #define MV64XXX_I2C_REG_BLOCK_SIZE                                  0x0020
0865 
0866 /****************************************/
0867 /* GPP Interface Registers              */
0868 /****************************************/
0869 
0870 #define MV64340_GPP_IO_CONTROL                                      0xf100
0871 #define MV64340_GPP_LEVEL_CONTROL                                   0xf110
0872 #define MV64340_GPP_VALUE                                           0xf104
0873 #define MV64340_GPP_INTERRUPT_CAUSE                                 0xf108
0874 #define MV64340_GPP_INTERRUPT_MASK0                                 0xf10c
0875 #define MV64340_GPP_INTERRUPT_MASK1                                 0xf114
0876 #define MV64340_GPP_VALUE_SET                                       0xf118
0877 #define MV64340_GPP_VALUE_CLEAR                                     0xf11c
0878 
0879 /****************************************/
0880 /* Interrupt Controller Registers       */
0881 /****************************************/
0882 
0883 /****************************************/
0884 /* Interrupts               */
0885 /****************************************/
0886 
0887 #define MV64340_MAIN_INTERRUPT_CAUSE_LOW                            0x004
0888 #define MV64340_MAIN_INTERRUPT_CAUSE_HIGH                           0x00c
0889 #define MV64340_CPU_INTERRUPT0_MASK_LOW                             0x014
0890 #define MV64340_CPU_INTERRUPT0_MASK_HIGH                            0x01c
0891 #define MV64340_CPU_INTERRUPT0_SELECT_CAUSE                         0x024
0892 #define MV64340_CPU_INTERRUPT1_MASK_LOW                             0x034
0893 #define MV64340_CPU_INTERRUPT1_MASK_HIGH                            0x03c
0894 #define MV64340_CPU_INTERRUPT1_SELECT_CAUSE                         0x044
0895 #define MV64340_INTERRUPT0_MASK_0_LOW                               0x054
0896 #define MV64340_INTERRUPT0_MASK_0_HIGH                              0x05c
0897 #define MV64340_INTERRUPT0_SELECT_CAUSE                             0x064
0898 #define MV64340_INTERRUPT1_MASK_0_LOW                               0x074
0899 #define MV64340_INTERRUPT1_MASK_0_HIGH                              0x07c
0900 #define MV64340_INTERRUPT1_SELECT_CAUSE                             0x084
0901 
0902 /****************************************/
0903 /*      MPP Interface Registers         */
0904 /****************************************/
0905 
0906 #define MV64340_MPP_CONTROL0                                        0xf000
0907 #define MV64340_MPP_CONTROL1                                        0xf004
0908 #define MV64340_MPP_CONTROL2                                        0xf008
0909 #define MV64340_MPP_CONTROL3                                        0xf00c
0910 
0911 /****************************************/
0912 /*    Serial Initialization registers   */
0913 /****************************************/
0914 
0915 #define MV64340_SERIAL_INIT_LAST_DATA                               0xf324
0916 #define MV64340_SERIAL_INIT_CONTROL                                 0xf328
0917 #define MV64340_SERIAL_INIT_STATUS                                  0xf32c
0918 
0919 extern void mv64340_irq_init(unsigned int base);
0920 
0921 #endif /* __ASM_MV643XX_H */