0001 #ifndef _ASM_POWERPC_FSP_DCR_H_
0002 #define _ASM_POWERPC_FSP_DCR_H_
0003 #ifdef __KERNEL__
0004 #include <asm/dcr.h>
0005
0006 #define DCRN_CMU_ADDR 0x00C
0007 #define DCRN_CMU_DATA 0x00D
0008
0009
0010 #define DCRN_PLB4_PCBI 0x010
0011 #define DCRN_PLB4_P0ACR 0x011
0012 #define DCRN_PLB4_P0ESRL 0x012
0013 #define DCRN_PLB4_P0ESRH 0x013
0014 #define DCRN_PLB4_P0EARL 0x014
0015 #define DCRN_PLB4_P0EARH 0x015
0016 #define DCRN_PLB4_P0ESRLS 0x016
0017 #define DCRN_PLB4_P0ESRHS 0x017
0018 #define DCRN_PLB4_PCBC 0x018
0019 #define DCRN_PLB4_P1ACR 0x019
0020 #define DCRN_PLB4_P1ESRL 0x01A
0021 #define DCRN_PLB4_P1ESRH 0x01B
0022 #define DCRN_PLB4_P1EARL 0x01C
0023 #define DCRN_PLB4_P1EARH 0x01D
0024 #define DCRN_PLB4_P1ESRLS 0x01E
0025 #define DCRN_PLB4_P1ESRHS 0x01F
0026
0027
0028 #define DCRN_PLB4OPB0_BASE 0x020
0029 #define DCRN_PLB4OPB1_BASE 0x030
0030 #define DCRN_PLB4OPB2_BASE 0x040
0031 #define DCRN_PLB4OPB3_BASE 0x050
0032
0033 #define PLB4OPB_GESR0 0x0
0034 #define PLB4OPB_GEAR 0x2
0035 #define PLB4OPB_GEARU 0x3
0036 #define PLB4OPB_GESR1 0x4
0037 #define PLB4OPB_GESR2 0xC
0038
0039
0040 #define DCRN_PLB4AHB_BASE 0x400
0041 #define DCRN_PLB4AHB_SEUAR (DCRN_PLB4AHB_BASE + 1)
0042 #define DCRN_PLB4AHB_SELAR (DCRN_PLB4AHB_BASE + 2)
0043 #define DCRN_PLB4AHB_ESR (DCRN_PLB4AHB_BASE + 3)
0044 #define DCRN_AHBPLB4_ESR (DCRN_PLB4AHB_BASE + 8)
0045 #define DCRN_AHBPLB4_EAR (DCRN_PLB4AHB_BASE + 9)
0046
0047
0048 #define DCRN_PLB6_BASE 0x11111300
0049 #define DCRN_PLB6_CR0 (DCRN_PLB6_BASE)
0050 #define DCRN_PLB6_ERR (DCRN_PLB6_BASE + 0x0B)
0051 #define DCRN_PLB6_HD (DCRN_PLB6_BASE + 0x0E)
0052 #define DCRN_PLB6_SHD (DCRN_PLB6_BASE + 0x10)
0053
0054
0055 #define DCRN_PLB4PLB6_BASE 0x11111320
0056 #define DCRN_PLB4PLB6_ESR (DCRN_PLB4PLB6_BASE + 1)
0057 #define DCRN_PLB4PLB6_EARH (DCRN_PLB4PLB6_BASE + 3)
0058 #define DCRN_PLB4PLB6_EARL (DCRN_PLB4PLB6_BASE + 4)
0059
0060
0061 #define DCRN_PLB6PLB4_BASE 0x11111350
0062 #define DCRN_PLB6PLB4_ESR (DCRN_PLB6PLB4_BASE + 1)
0063 #define DCRN_PLB6PLB4_EARH (DCRN_PLB6PLB4_BASE + 3)
0064 #define DCRN_PLB6PLB4_EARL (DCRN_PLB6PLB4_BASE + 4)
0065
0066
0067 #define DCRN_PLB6MCIF_BASE 0x11111380
0068 #define DCRN_PLB6MCIF_BESR0 (DCRN_PLB6MCIF_BASE + 0)
0069 #define DCRN_PLB6MCIF_BESR1 (DCRN_PLB6MCIF_BASE + 1)
0070 #define DCRN_PLB6MCIF_BEARL (DCRN_PLB6MCIF_BASE + 2)
0071 #define DCRN_PLB6MCIF_BEARH (DCRN_PLB6MCIF_BASE + 3)
0072
0073
0074 #define DCRN_CONF_BASE 0x11111400
0075 #define DCRN_CONF_FIR_RWC (DCRN_CONF_BASE + 0x3A)
0076 #define DCRN_CONF_EIR_RS (DCRN_CONF_BASE + 0x3E)
0077 #define DCRN_CONF_RPERR0 (DCRN_CONF_BASE + 0x4D)
0078 #define DCRN_CONF_RPERR1 (DCRN_CONF_BASE + 0x4E)
0079
0080 #define DCRN_L2CDCRAI 0x11111100
0081 #define DCRN_L2CDCRDI 0x11111104
0082
0083 #define L2MCK 0x120
0084 #define L2MCKEN 0x130
0085 #define L2INT 0x150
0086 #define L2INTEN 0x160
0087 #define L2LOG0 0x180
0088 #define L2LOG1 0x184
0089 #define L2LOG2 0x188
0090 #define L2LOG3 0x18C
0091 #define L2LOG4 0x190
0092 #define L2LOG5 0x194
0093 #define L2PLBSTAT0 0x300
0094 #define L2PLBSTAT1 0x304
0095 #define L2PLBMCKEN0 0x330
0096 #define L2PLBMCKEN1 0x334
0097 #define L2PLBINTEN0 0x360
0098 #define L2PLBINTEN1 0x364
0099 #define L2ARRSTAT0 0x500
0100 #define L2ARRSTAT1 0x504
0101 #define L2ARRSTAT2 0x508
0102 #define L2ARRMCKEN0 0x530
0103 #define L2ARRMCKEN1 0x534
0104 #define L2ARRMCKEN2 0x538
0105 #define L2ARRINTEN0 0x560
0106 #define L2ARRINTEN1 0x564
0107 #define L2ARRINTEN2 0x568
0108 #define L2CPUSTAT 0x700
0109 #define L2CPUMCKEN 0x730
0110 #define L2CPUINTEN 0x760
0111 #define L2RACSTAT0 0x900
0112 #define L2RACMCKEN0 0x930
0113 #define L2RACINTEN0 0x960
0114 #define L2WACSTAT0 0xD00
0115 #define L2WACSTAT1 0xD04
0116 #define L2WACSTAT2 0xD08
0117 #define L2WACMCKEN0 0xD30
0118 #define L2WACMCKEN1 0xD34
0119 #define L2WACMCKEN2 0xD38
0120 #define L2WACINTEN0 0xD60
0121 #define L2WACINTEN1 0xD64
0122 #define L2WACINTEN2 0xD68
0123 #define L2WDFSTAT 0xF00
0124 #define L2WDFMCKEN 0xF30
0125 #define L2WDFINTEN 0xF60
0126
0127
0128 #define DCRN_DDR34_BASE 0x11120000
0129 #define DCRN_DDR34_MCSTAT 0x10
0130 #define DCRN_DDR34_MCOPT1 0x20
0131 #define DCRN_DDR34_MCOPT2 0x21
0132 #define DCRN_DDR34_PHYSTAT 0x32
0133 #define DCRN_DDR34_CFGR0 0x40
0134 #define DCRN_DDR34_CFGR1 0x41
0135 #define DCRN_DDR34_CFGR2 0x42
0136 #define DCRN_DDR34_CFGR3 0x43
0137 #define DCRN_DDR34_SCRUB_CNTL 0xAA
0138 #define DCRN_DDR34_SCRUB_INT 0xAB
0139 #define DCRN_DDR34_SCRUB_START_ADDR 0xB0
0140 #define DCRN_DDR34_SCRUB_END_ADDR 0xD0
0141 #define DCRN_DDR34_ECCERR_ADDR_PORT0 0xE0
0142 #define DCRN_DDR34_ECCERR_ADDR_PORT1 0xE1
0143 #define DCRN_DDR34_ECCERR_ADDR_PORT2 0xE2
0144 #define DCRN_DDR34_ECCERR_ADDR_PORT3 0xE3
0145 #define DCRN_DDR34_ECCERR_COUNT_PORT0 0xE4
0146 #define DCRN_DDR34_ECCERR_COUNT_PORT1 0xE5
0147 #define DCRN_DDR34_ECCERR_COUNT_PORT2 0xE6
0148 #define DCRN_DDR34_ECCERR_COUNT_PORT3 0xE7
0149 #define DCRN_DDR34_ECCERR_PORT0 0xF0
0150 #define DCRN_DDR34_ECCERR_PORT1 0xF2
0151 #define DCRN_DDR34_ECCERR_PORT2 0xF4
0152 #define DCRN_DDR34_ECCERR_PORT3 0xF6
0153 #define DCRN_DDR34_ECC_CHECK_PORT0 0xF8
0154 #define DCRN_DDR34_ECC_CHECK_PORT1 0xF9
0155 #define DCRN_DDR34_ECC_CHECK_PORT2 0xF9
0156 #define DCRN_DDR34_ECC_CHECK_PORT3 0xFB
0157
0158 #define DDR34_SCRUB_CNTL_STOP 0x00000000
0159 #define DDR34_SCRUB_CNTL_SCRUB 0x80000000
0160 #define DDR34_SCRUB_CNTL_UE_STOP 0x20000000
0161 #define DDR34_SCRUB_CNTL_CE_STOP 0x10000000
0162 #define DDR34_SCRUB_CNTL_RANK_EN 0x00008000
0163
0164
0165 #define DCRN_CW_BASE 0x11111800
0166 #define DCRN_CW_MCER0 0x00
0167 #define DCRN_CW_MCER1 0x01
0168 #define DCRN_CW_MCER_AND0 0x02
0169 #define DCRN_CW_MCER_AND1 0x03
0170 #define DCRN_CW_MCER_OR0 0x04
0171 #define DCRN_CW_MCER_OR1 0x05
0172 #define DCRN_CW_MCER_MASK0 0x06
0173 #define DCRN_CW_MCER_MASK1 0x07
0174 #define DCRN_CW_MCER_MASK_AND0 0x08
0175 #define DCRN_CW_MCER_MASK_AND1 0x09
0176 #define DCRN_CW_MCER_MASK_OR0 0x0A
0177 #define DCRN_CW_MCER_MASK_OR1 0x0B
0178 #define DCRN_CW_MCER_ACTION0 0x0C
0179 #define DCRN_CW_MCER_ACTION1 0x0D
0180 #define DCRN_CW_MCER_WOF0 0x0E
0181 #define DCRN_CW_MCER_WOF1 0x0F
0182 #define DCRN_CW_LFIR 0x10
0183 #define DCRN_CW_LFIR_AND 0x11
0184 #define DCRN_CW_LFIR_OR 0x12
0185 #define DCRN_CW_LFIR_MASK 0x13
0186 #define DCRN_CW_LFIR_MASK_AND 0x14
0187 #define DCRN_CW_LFIR_MASK_OR 0x15
0188
0189 #define CW_MCER0_MEM_CE 0x00020000
0190
0191 #define CMUN_CRCS 0x00
0192 #define CMUN_CONFFIR0 0x20
0193 #define CMUN_CONFFIR1 0x21
0194 #define CMUN_CONFFIR2 0x22
0195 #define CMUN_CONFFIR3 0x23
0196 #define CMUN_URCR3_RS 0x24
0197 #define CMUN_URCR3_C 0x25
0198 #define CMUN_URCR3_P 0x26
0199 #define CMUN_PW0 0x2C
0200 #define CMUN_URCR0_P 0x2D
0201 #define CMUN_URCR1_P 0x2E
0202 #define CMUN_URCR2_P 0x2F
0203 #define CMUN_CLS_RW 0x30
0204 #define CMUN_CLS_S 0x31
0205 #define CMUN_CLS_C 0x32
0206 #define CMUN_URCR2_RS 0x33
0207 #define CMUN_URCR2_C 0x34
0208 #define CMUN_CLKEN0 0x35
0209 #define CMUN_CLKEN1 0x36
0210 #define CMUN_PCD0 0x37
0211 #define CMUN_PCD1 0x38
0212 #define CMUN_TMR0 0x39
0213 #define CMUN_TVS0 0x3A
0214 #define CMUN_TVS1 0x3B
0215 #define CMUN_MCCR 0x3C
0216 #define CMUN_FIR0 0x3D
0217 #define CMUN_FMR0 0x3E
0218 #define CMUN_ETDRB 0x3F
0219
0220
0221 #define CRCS_STAT_MASK 0xF0000000
0222 #define CRCS_STAT_POR 0x10000000
0223 #define CRCS_STAT_PHR 0x20000000
0224 #define CRCS_STAT_PCIE 0x30000000
0225 #define CRCS_STAT_CRCS_SYS 0x40000000
0226 #define CRCS_STAT_DBCR_SYS 0x50000000
0227 #define CRCS_STAT_HOST_SYS 0x60000000
0228 #define CRCS_STAT_CHIP_RST_B 0x70000000
0229 #define CRCS_STAT_CRCS_CHIP 0x80000000
0230 #define CRCS_STAT_DBCR_CHIP 0x90000000
0231 #define CRCS_STAT_HOST_CHIP 0xA0000000
0232 #define CRCS_STAT_PSI_CHIP 0xB0000000
0233 #define CRCS_STAT_CRCS_CORE 0xC0000000
0234 #define CRCS_STAT_DBCR_CORE 0xD0000000
0235 #define CRCS_STAT_HOST_CORE 0xE0000000
0236 #define CRCS_STAT_PCIE_HOT 0xF0000000
0237 #define CRCS_STAT_SELF_CORE 0x40000000
0238 #define CRCS_STAT_SELF_CHIP 0x50000000
0239 #define CRCS_WATCHE 0x08000000
0240 #define CRCS_CORE 0x04000000
0241 #define CRCS_CHIP 0x02000000
0242 #define CRCS_SYS 0x01000000
0243 #define CRCS_WRCR 0x00800000
0244 #define CRCS_EXTCR 0x00080000
0245 #define CRCS_PLOCK 0x00000002
0246
0247 #define mtcmu(reg, data) \
0248 do { \
0249 mtdcr(DCRN_CMU_ADDR, reg); \
0250 mtdcr(DCRN_CMU_DATA, data); \
0251 } while (0)
0252
0253 #define mfcmu(reg)\
0254 ({u32 data; \
0255 mtdcr(DCRN_CMU_ADDR, reg); \
0256 data = mfdcr(DCRN_CMU_DATA); \
0257 data; })
0258
0259 #define mtl2(reg, data) \
0260 do { \
0261 mtdcr(DCRN_L2CDCRAI, reg); \
0262 mtdcr(DCRN_L2CDCRDI, data); \
0263 } while (0)
0264
0265 #define mfl2(reg) \
0266 ({u32 data; \
0267 mtdcr(DCRN_L2CDCRAI, reg); \
0268 data = mfdcr(DCRN_L2CDCRDI); \
0269 data; })
0270
0271 #endif
0272 #endif