18c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_FSP_DCR_H_
28c2ecf20Sopenharmony_ci#define _ASM_POWERPC_FSP_DCR_H_
38c2ecf20Sopenharmony_ci#ifdef __KERNEL__
48c2ecf20Sopenharmony_ci#include <asm/dcr.h>
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci#define DCRN_CMU_ADDR		0x00C	/* Chip management unic addr */
78c2ecf20Sopenharmony_ci#define DCRN_CMU_DATA		0x00D	/* Chip management unic data */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/* PLB4 Arbiter */
108c2ecf20Sopenharmony_ci#define DCRN_PLB4_PCBI		0x010	/* PLB Crossbar ID/Rev Register */
118c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0ACR		0x011	/* PLB0 Arbiter Control Register */
128c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0ESRL	0x012	/* PLB0 Error Status Register Low */
138c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0ESRH	0x013	/* PLB0 Error Status Register High */
148c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0EARL	0x014	/* PLB0 Error Address Register Low */
158c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0EARH	0x015	/* PLB0 Error Address Register High */
168c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0ESRLS	0x016	/* PLB0 Error Status Register Low Set*/
178c2ecf20Sopenharmony_ci#define DCRN_PLB4_P0ESRHS	0x017	/* PLB0 Error Status Register High */
188c2ecf20Sopenharmony_ci#define DCRN_PLB4_PCBC		0x018	/* PLB Crossbar Control Register */
198c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1ACR		0x019	/* PLB1 Arbiter Control Register */
208c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1ESRL	0x01A	/* PLB1 Error Status Register Low */
218c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1ESRH	0x01B	/* PLB1 Error Status Register High */
228c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1EARL	0x01C	/* PLB1 Error Address Register Low */
238c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1EARH	0x01D	/* PLB1 Error Address Register High */
248c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1ESRLS	0x01E	/* PLB1 Error Status Register Low Set*/
258c2ecf20Sopenharmony_ci#define DCRN_PLB4_P1ESRHS	0x01F	/*PLB1 Error Status Register High Set*/
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/* PLB4/OPB bridge 0, 1, 2, 3 */
288c2ecf20Sopenharmony_ci#define DCRN_PLB4OPB0_BASE	0x020
298c2ecf20Sopenharmony_ci#define DCRN_PLB4OPB1_BASE	0x030
308c2ecf20Sopenharmony_ci#define DCRN_PLB4OPB2_BASE	0x040
318c2ecf20Sopenharmony_ci#define DCRN_PLB4OPB3_BASE	0x050
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define PLB4OPB_GESR0		0x0	/* Error status 0: Master Dev 0-3 */
348c2ecf20Sopenharmony_ci#define PLB4OPB_GEAR		0x2	/* Error Address Register */
358c2ecf20Sopenharmony_ci#define PLB4OPB_GEARU		0x3	/* Error Upper Address Register */
368c2ecf20Sopenharmony_ci#define PLB4OPB_GESR1		0x4	/* Error Status 1: Master Dev 4-7 */
378c2ecf20Sopenharmony_ci#define PLB4OPB_GESR2		0xC	/* Error Status 2: Master Dev 8-11 */
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci/* PLB4-to-AHB Bridge */
408c2ecf20Sopenharmony_ci#define DCRN_PLB4AHB_BASE	0x400
418c2ecf20Sopenharmony_ci#define DCRN_PLB4AHB_SEUAR	(DCRN_PLB4AHB_BASE + 1)
428c2ecf20Sopenharmony_ci#define DCRN_PLB4AHB_SELAR	(DCRN_PLB4AHB_BASE + 2)
438c2ecf20Sopenharmony_ci#define DCRN_PLB4AHB_ESR	(DCRN_PLB4AHB_BASE + 3)
448c2ecf20Sopenharmony_ci#define DCRN_AHBPLB4_ESR	(DCRN_PLB4AHB_BASE + 8)
458c2ecf20Sopenharmony_ci#define DCRN_AHBPLB4_EAR	(DCRN_PLB4AHB_BASE + 9)
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci/* PLB6 Controller */
488c2ecf20Sopenharmony_ci#define DCRN_PLB6_BASE		0x11111300
498c2ecf20Sopenharmony_ci#define DCRN_PLB6_CR0		(DCRN_PLB6_BASE)
508c2ecf20Sopenharmony_ci#define DCRN_PLB6_ERR		(DCRN_PLB6_BASE + 0x0B)
518c2ecf20Sopenharmony_ci#define DCRN_PLB6_HD		(DCRN_PLB6_BASE + 0x0E)
528c2ecf20Sopenharmony_ci#define DCRN_PLB6_SHD		(DCRN_PLB6_BASE + 0x10)
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci/* PLB4-to-PLB6 Bridge */
558c2ecf20Sopenharmony_ci#define DCRN_PLB4PLB6_BASE	0x11111320
568c2ecf20Sopenharmony_ci#define DCRN_PLB4PLB6_ESR	(DCRN_PLB4PLB6_BASE + 1)
578c2ecf20Sopenharmony_ci#define DCRN_PLB4PLB6_EARH	(DCRN_PLB4PLB6_BASE + 3)
588c2ecf20Sopenharmony_ci#define DCRN_PLB4PLB6_EARL	(DCRN_PLB4PLB6_BASE + 4)
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci/* PLB6-to-PLB4 Bridge */
618c2ecf20Sopenharmony_ci#define DCRN_PLB6PLB4_BASE	0x11111350
628c2ecf20Sopenharmony_ci#define DCRN_PLB6PLB4_ESR	(DCRN_PLB6PLB4_BASE + 1)
638c2ecf20Sopenharmony_ci#define DCRN_PLB6PLB4_EARH	(DCRN_PLB6PLB4_BASE + 3)
648c2ecf20Sopenharmony_ci#define DCRN_PLB6PLB4_EARL	(DCRN_PLB6PLB4_BASE + 4)
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci/* PLB6-to-MCIF Bridge */
678c2ecf20Sopenharmony_ci#define DCRN_PLB6MCIF_BASE	0x11111380
688c2ecf20Sopenharmony_ci#define DCRN_PLB6MCIF_BESR0	(DCRN_PLB6MCIF_BASE + 0)
698c2ecf20Sopenharmony_ci#define DCRN_PLB6MCIF_BESR1	(DCRN_PLB6MCIF_BASE + 1)
708c2ecf20Sopenharmony_ci#define DCRN_PLB6MCIF_BEARL	(DCRN_PLB6MCIF_BASE + 2)
718c2ecf20Sopenharmony_ci#define DCRN_PLB6MCIF_BEARH	(DCRN_PLB6MCIF_BASE + 3)
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci/* Configuration Logic Registers */
748c2ecf20Sopenharmony_ci#define DCRN_CONF_BASE		0x11111400
758c2ecf20Sopenharmony_ci#define DCRN_CONF_FIR_RWC	(DCRN_CONF_BASE + 0x3A)
768c2ecf20Sopenharmony_ci#define DCRN_CONF_EIR_RS	(DCRN_CONF_BASE + 0x3E)
778c2ecf20Sopenharmony_ci#define DCRN_CONF_RPERR0	(DCRN_CONF_BASE + 0x4D)
788c2ecf20Sopenharmony_ci#define DCRN_CONF_RPERR1	(DCRN_CONF_BASE + 0x4E)
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci#define DCRN_L2CDCRAI		0x11111100
818c2ecf20Sopenharmony_ci#define DCRN_L2CDCRDI		0x11111104
828c2ecf20Sopenharmony_ci/* L2 indirect addresses */
838c2ecf20Sopenharmony_ci#define L2MCK		0x120
848c2ecf20Sopenharmony_ci#define L2MCKEN		0x130
858c2ecf20Sopenharmony_ci#define L2INT		0x150
868c2ecf20Sopenharmony_ci#define L2INTEN		0x160
878c2ecf20Sopenharmony_ci#define L2LOG0		0x180
888c2ecf20Sopenharmony_ci#define L2LOG1		0x184
898c2ecf20Sopenharmony_ci#define L2LOG2		0x188
908c2ecf20Sopenharmony_ci#define L2LOG3		0x18C
918c2ecf20Sopenharmony_ci#define L2LOG4		0x190
928c2ecf20Sopenharmony_ci#define L2LOG5		0x194
938c2ecf20Sopenharmony_ci#define L2PLBSTAT0	0x300
948c2ecf20Sopenharmony_ci#define L2PLBSTAT1	0x304
958c2ecf20Sopenharmony_ci#define L2PLBMCKEN0	0x330
968c2ecf20Sopenharmony_ci#define L2PLBMCKEN1	0x334
978c2ecf20Sopenharmony_ci#define L2PLBINTEN0	0x360
988c2ecf20Sopenharmony_ci#define L2PLBINTEN1	0x364
998c2ecf20Sopenharmony_ci#define L2ARRSTAT0	0x500
1008c2ecf20Sopenharmony_ci#define L2ARRSTAT1	0x504
1018c2ecf20Sopenharmony_ci#define L2ARRSTAT2	0x508
1028c2ecf20Sopenharmony_ci#define L2ARRMCKEN0	0x530
1038c2ecf20Sopenharmony_ci#define L2ARRMCKEN1	0x534
1048c2ecf20Sopenharmony_ci#define L2ARRMCKEN2	0x538
1058c2ecf20Sopenharmony_ci#define L2ARRINTEN0	0x560
1068c2ecf20Sopenharmony_ci#define L2ARRINTEN1	0x564
1078c2ecf20Sopenharmony_ci#define L2ARRINTEN2	0x568
1088c2ecf20Sopenharmony_ci#define L2CPUSTAT	0x700
1098c2ecf20Sopenharmony_ci#define L2CPUMCKEN	0x730
1108c2ecf20Sopenharmony_ci#define L2CPUINTEN	0x760
1118c2ecf20Sopenharmony_ci#define L2RACSTAT0	0x900
1128c2ecf20Sopenharmony_ci#define L2RACMCKEN0	0x930
1138c2ecf20Sopenharmony_ci#define L2RACINTEN0	0x960
1148c2ecf20Sopenharmony_ci#define L2WACSTAT0	0xD00
1158c2ecf20Sopenharmony_ci#define L2WACSTAT1	0xD04
1168c2ecf20Sopenharmony_ci#define L2WACSTAT2	0xD08
1178c2ecf20Sopenharmony_ci#define L2WACMCKEN0	0xD30
1188c2ecf20Sopenharmony_ci#define L2WACMCKEN1	0xD34
1198c2ecf20Sopenharmony_ci#define L2WACMCKEN2	0xD38
1208c2ecf20Sopenharmony_ci#define L2WACINTEN0	0xD60
1218c2ecf20Sopenharmony_ci#define L2WACINTEN1	0xD64
1228c2ecf20Sopenharmony_ci#define L2WACINTEN2	0xD68
1238c2ecf20Sopenharmony_ci#define L2WDFSTAT	0xF00
1248c2ecf20Sopenharmony_ci#define L2WDFMCKEN	0xF30
1258c2ecf20Sopenharmony_ci#define L2WDFINTEN	0xF60
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ci/* DDR3/4 Memory Controller */
1288c2ecf20Sopenharmony_ci#define DCRN_DDR34_BASE			0x11120000
1298c2ecf20Sopenharmony_ci#define DCRN_DDR34_MCSTAT		0x10
1308c2ecf20Sopenharmony_ci#define DCRN_DDR34_MCOPT1		0x20
1318c2ecf20Sopenharmony_ci#define DCRN_DDR34_MCOPT2		0x21
1328c2ecf20Sopenharmony_ci#define DCRN_DDR34_PHYSTAT		0x32
1338c2ecf20Sopenharmony_ci#define DCRN_DDR34_CFGR0		0x40
1348c2ecf20Sopenharmony_ci#define DCRN_DDR34_CFGR1		0x41
1358c2ecf20Sopenharmony_ci#define DCRN_DDR34_CFGR2		0x42
1368c2ecf20Sopenharmony_ci#define DCRN_DDR34_CFGR3		0x43
1378c2ecf20Sopenharmony_ci#define DCRN_DDR34_SCRUB_CNTL		0xAA
1388c2ecf20Sopenharmony_ci#define DCRN_DDR34_SCRUB_INT		0xAB
1398c2ecf20Sopenharmony_ci#define DCRN_DDR34_SCRUB_START_ADDR	0xB0
1408c2ecf20Sopenharmony_ci#define DCRN_DDR34_SCRUB_END_ADDR	0xD0
1418c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT0	0xE0
1428c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT1	0xE1
1438c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT2	0xE2
1448c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT3	0xE3
1458c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT0	0xE4
1468c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT1	0xE5
1478c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT2	0xE6
1488c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT3	0xE7
1498c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT0		0xF0
1508c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT1		0xF2
1518c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT2		0xF4
1528c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT3		0xF6
1538c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT0	0xF8
1548c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT1	0xF9
1558c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT2	0xF9
1568c2ecf20Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT3	0xFB
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ci#define DDR34_SCRUB_CNTL_STOP		0x00000000
1598c2ecf20Sopenharmony_ci#define DDR34_SCRUB_CNTL_SCRUB		0x80000000
1608c2ecf20Sopenharmony_ci#define DDR34_SCRUB_CNTL_UE_STOP	0x20000000
1618c2ecf20Sopenharmony_ci#define DDR34_SCRUB_CNTL_CE_STOP	0x10000000
1628c2ecf20Sopenharmony_ci#define DDR34_SCRUB_CNTL_RANK_EN	0x00008000
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ci/* PLB-Attached DDR3/4 Core Wrapper */
1658c2ecf20Sopenharmony_ci#define DCRN_CW_BASE			0x11111800
1668c2ecf20Sopenharmony_ci#define DCRN_CW_MCER0			0x00
1678c2ecf20Sopenharmony_ci#define DCRN_CW_MCER1			0x01
1688c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_AND0		0x02
1698c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_AND1		0x03
1708c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_OR0		0x04
1718c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_OR1		0x05
1728c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK0		0x06
1738c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK1		0x07
1748c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK_AND0		0x08
1758c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK_AND1		0x09
1768c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK_OR0		0x0A
1778c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_MASK_OR1		0x0B
1788c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_ACTION0		0x0C
1798c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_ACTION1		0x0D
1808c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_WOF0		0x0E
1818c2ecf20Sopenharmony_ci#define DCRN_CW_MCER_WOF1		0x0F
1828c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR			0x10
1838c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR_AND		0x11
1848c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR_OR			0x12
1858c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR_MASK		0x13
1868c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR_MASK_AND		0x14
1878c2ecf20Sopenharmony_ci#define DCRN_CW_LFIR_MASK_OR		0x15
1888c2ecf20Sopenharmony_ci
1898c2ecf20Sopenharmony_ci#define CW_MCER0_MEM_CE			0x00020000
1908c2ecf20Sopenharmony_ci/* CMU addresses */
1918c2ecf20Sopenharmony_ci#define CMUN_CRCS		0x00 /* Chip Reset Control/Status */
1928c2ecf20Sopenharmony_ci#define CMUN_CONFFIR0		0x20 /* Config Reg Parity FIR 0 */
1938c2ecf20Sopenharmony_ci#define CMUN_CONFFIR1		0x21 /* Config Reg Parity FIR 1 */
1948c2ecf20Sopenharmony_ci#define CMUN_CONFFIR2		0x22 /* Config Reg Parity FIR 2 */
1958c2ecf20Sopenharmony_ci#define CMUN_CONFFIR3		0x23 /* Config Reg Parity FIR 3 */
1968c2ecf20Sopenharmony_ci#define CMUN_URCR3_RS		0x24 /* Unit Reset Control Reg 3 Set */
1978c2ecf20Sopenharmony_ci#define CMUN_URCR3_C		0x25 /* Unit Reset Control Reg 3 Clear */
1988c2ecf20Sopenharmony_ci#define CMUN_URCR3_P		0x26 /* Unit Reset Control Reg 3 Pulse */
1998c2ecf20Sopenharmony_ci#define CMUN_PW0		0x2C /* Pulse Width Register */
2008c2ecf20Sopenharmony_ci#define CMUN_URCR0_P		0x2D /* Unit Reset Control Reg 0 Pulse */
2018c2ecf20Sopenharmony_ci#define CMUN_URCR1_P		0x2E /* Unit Reset Control Reg 1 Pulse */
2028c2ecf20Sopenharmony_ci#define CMUN_URCR2_P		0x2F /* Unit Reset Control Reg 2 Pulse */
2038c2ecf20Sopenharmony_ci#define CMUN_CLS_RW		0x30 /* Code Load Status (Read/Write) */
2048c2ecf20Sopenharmony_ci#define CMUN_CLS_S		0x31 /* Code Load Status (Set) */
2058c2ecf20Sopenharmony_ci#define CMUN_CLS_C		0x32 /* Code Load Status (Clear */
2068c2ecf20Sopenharmony_ci#define CMUN_URCR2_RS		0x33 /* Unit Reset Control Reg 2 Set */
2078c2ecf20Sopenharmony_ci#define CMUN_URCR2_C		0x34 /* Unit Reset Control Reg 2 Clear */
2088c2ecf20Sopenharmony_ci#define CMUN_CLKEN0		0x35 /* Clock Enable 0 */
2098c2ecf20Sopenharmony_ci#define CMUN_CLKEN1		0x36 /* Clock Enable 1 */
2108c2ecf20Sopenharmony_ci#define CMUN_PCD0		0x37 /* PSI clock divider 0 */
2118c2ecf20Sopenharmony_ci#define CMUN_PCD1		0x38 /* PSI clock divider 1 */
2128c2ecf20Sopenharmony_ci#define CMUN_TMR0		0x39 /* Reset Timer */
2138c2ecf20Sopenharmony_ci#define CMUN_TVS0		0x3A /* TV Sense Reg 0 */
2148c2ecf20Sopenharmony_ci#define CMUN_TVS1		0x3B /* TV Sense Reg 1 */
2158c2ecf20Sopenharmony_ci#define CMUN_MCCR		0x3C /* DRAM Configuration Reg */
2168c2ecf20Sopenharmony_ci#define CMUN_FIR0		0x3D /* Fault Isolation Reg 0 */
2178c2ecf20Sopenharmony_ci#define CMUN_FMR0		0x3E /* FIR Mask Reg 0 */
2188c2ecf20Sopenharmony_ci#define CMUN_ETDRB		0x3F /* ETDR Backdoor */
2198c2ecf20Sopenharmony_ci
2208c2ecf20Sopenharmony_ci/* CRCS bit fields */
2218c2ecf20Sopenharmony_ci#define CRCS_STAT_MASK		0xF0000000
2228c2ecf20Sopenharmony_ci#define CRCS_STAT_POR		0x10000000
2238c2ecf20Sopenharmony_ci#define CRCS_STAT_PHR		0x20000000
2248c2ecf20Sopenharmony_ci#define CRCS_STAT_PCIE		0x30000000
2258c2ecf20Sopenharmony_ci#define CRCS_STAT_CRCS_SYS	0x40000000
2268c2ecf20Sopenharmony_ci#define CRCS_STAT_DBCR_SYS	0x50000000
2278c2ecf20Sopenharmony_ci#define CRCS_STAT_HOST_SYS	0x60000000
2288c2ecf20Sopenharmony_ci#define CRCS_STAT_CHIP_RST_B	0x70000000
2298c2ecf20Sopenharmony_ci#define CRCS_STAT_CRCS_CHIP	0x80000000
2308c2ecf20Sopenharmony_ci#define CRCS_STAT_DBCR_CHIP	0x90000000
2318c2ecf20Sopenharmony_ci#define CRCS_STAT_HOST_CHIP	0xA0000000
2328c2ecf20Sopenharmony_ci#define CRCS_STAT_PSI_CHIP	0xB0000000
2338c2ecf20Sopenharmony_ci#define CRCS_STAT_CRCS_CORE	0xC0000000
2348c2ecf20Sopenharmony_ci#define CRCS_STAT_DBCR_CORE	0xD0000000
2358c2ecf20Sopenharmony_ci#define CRCS_STAT_HOST_CORE	0xE0000000
2368c2ecf20Sopenharmony_ci#define CRCS_STAT_PCIE_HOT	0xF0000000
2378c2ecf20Sopenharmony_ci#define CRCS_STAT_SELF_CORE	0x40000000
2388c2ecf20Sopenharmony_ci#define CRCS_STAT_SELF_CHIP	0x50000000
2398c2ecf20Sopenharmony_ci#define CRCS_WATCHE		0x08000000
2408c2ecf20Sopenharmony_ci#define CRCS_CORE		0x04000000 /* Reset PPC440 core */
2418c2ecf20Sopenharmony_ci#define CRCS_CHIP		0x02000000 /* Chip Reset */
2428c2ecf20Sopenharmony_ci#define CRCS_SYS		0x01000000 /* System Reset */
2438c2ecf20Sopenharmony_ci#define CRCS_WRCR		0x00800000 /* Watchdog reset on core reset */
2448c2ecf20Sopenharmony_ci#define CRCS_EXTCR		0x00080000 /* CHIP_RST_B triggers chip reset */
2458c2ecf20Sopenharmony_ci#define CRCS_PLOCK		0x00000002 /* PLL Locked */
2468c2ecf20Sopenharmony_ci
2478c2ecf20Sopenharmony_ci#define mtcmu(reg, data)		\
2488c2ecf20Sopenharmony_cido {					\
2498c2ecf20Sopenharmony_ci	mtdcr(DCRN_CMU_ADDR, reg);	\
2508c2ecf20Sopenharmony_ci	mtdcr(DCRN_CMU_DATA, data);	\
2518c2ecf20Sopenharmony_ci} while (0)
2528c2ecf20Sopenharmony_ci
2538c2ecf20Sopenharmony_ci#define mfcmu(reg)\
2548c2ecf20Sopenharmony_ci	({u32 data;			\
2558c2ecf20Sopenharmony_ci	mtdcr(DCRN_CMU_ADDR, reg);	\
2568c2ecf20Sopenharmony_ci	data = mfdcr(DCRN_CMU_DATA);	\
2578c2ecf20Sopenharmony_ci	data; })
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci#define mtl2(reg, data)			\
2608c2ecf20Sopenharmony_cido {					\
2618c2ecf20Sopenharmony_ci	mtdcr(DCRN_L2CDCRAI, reg);	\
2628c2ecf20Sopenharmony_ci	mtdcr(DCRN_L2CDCRDI, data);	\
2638c2ecf20Sopenharmony_ci} while (0)
2648c2ecf20Sopenharmony_ci
2658c2ecf20Sopenharmony_ci#define mfl2(reg)			\
2668c2ecf20Sopenharmony_ci	({u32 data;			\
2678c2ecf20Sopenharmony_ci	mtdcr(DCRN_L2CDCRAI, reg);	\
2688c2ecf20Sopenharmony_ci	data = mfdcr(DCRN_L2CDCRDI);	\
2698c2ecf20Sopenharmony_ci	data; })
2708c2ecf20Sopenharmony_ci
2718c2ecf20Sopenharmony_ci#endif /* __KERNEL__ */
2728c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_FSP2_DCR_H_ */
273