162306a36Sopenharmony_ci#ifndef _ASM_POWERPC_FSP_DCR_H_ 262306a36Sopenharmony_ci#define _ASM_POWERPC_FSP_DCR_H_ 362306a36Sopenharmony_ci#ifdef __KERNEL__ 462306a36Sopenharmony_ci#include <asm/dcr.h> 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#define DCRN_CMU_ADDR 0x00C /* Chip management unic addr */ 762306a36Sopenharmony_ci#define DCRN_CMU_DATA 0x00D /* Chip management unic data */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/* PLB4 Arbiter */ 1062306a36Sopenharmony_ci#define DCRN_PLB4_PCBI 0x010 /* PLB Crossbar ID/Rev Register */ 1162306a36Sopenharmony_ci#define DCRN_PLB4_P0ACR 0x011 /* PLB0 Arbiter Control Register */ 1262306a36Sopenharmony_ci#define DCRN_PLB4_P0ESRL 0x012 /* PLB0 Error Status Register Low */ 1362306a36Sopenharmony_ci#define DCRN_PLB4_P0ESRH 0x013 /* PLB0 Error Status Register High */ 1462306a36Sopenharmony_ci#define DCRN_PLB4_P0EARL 0x014 /* PLB0 Error Address Register Low */ 1562306a36Sopenharmony_ci#define DCRN_PLB4_P0EARH 0x015 /* PLB0 Error Address Register High */ 1662306a36Sopenharmony_ci#define DCRN_PLB4_P0ESRLS 0x016 /* PLB0 Error Status Register Low Set*/ 1762306a36Sopenharmony_ci#define DCRN_PLB4_P0ESRHS 0x017 /* PLB0 Error Status Register High */ 1862306a36Sopenharmony_ci#define DCRN_PLB4_PCBC 0x018 /* PLB Crossbar Control Register */ 1962306a36Sopenharmony_ci#define DCRN_PLB4_P1ACR 0x019 /* PLB1 Arbiter Control Register */ 2062306a36Sopenharmony_ci#define DCRN_PLB4_P1ESRL 0x01A /* PLB1 Error Status Register Low */ 2162306a36Sopenharmony_ci#define DCRN_PLB4_P1ESRH 0x01B /* PLB1 Error Status Register High */ 2262306a36Sopenharmony_ci#define DCRN_PLB4_P1EARL 0x01C /* PLB1 Error Address Register Low */ 2362306a36Sopenharmony_ci#define DCRN_PLB4_P1EARH 0x01D /* PLB1 Error Address Register High */ 2462306a36Sopenharmony_ci#define DCRN_PLB4_P1ESRLS 0x01E /* PLB1 Error Status Register Low Set*/ 2562306a36Sopenharmony_ci#define DCRN_PLB4_P1ESRHS 0x01F /*PLB1 Error Status Register High Set*/ 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci/* PLB4/OPB bridge 0, 1, 2, 3 */ 2862306a36Sopenharmony_ci#define DCRN_PLB4OPB0_BASE 0x020 2962306a36Sopenharmony_ci#define DCRN_PLB4OPB1_BASE 0x030 3062306a36Sopenharmony_ci#define DCRN_PLB4OPB2_BASE 0x040 3162306a36Sopenharmony_ci#define DCRN_PLB4OPB3_BASE 0x050 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#define PLB4OPB_GESR0 0x0 /* Error status 0: Master Dev 0-3 */ 3462306a36Sopenharmony_ci#define PLB4OPB_GEAR 0x2 /* Error Address Register */ 3562306a36Sopenharmony_ci#define PLB4OPB_GEARU 0x3 /* Error Upper Address Register */ 3662306a36Sopenharmony_ci#define PLB4OPB_GESR1 0x4 /* Error Status 1: Master Dev 4-7 */ 3762306a36Sopenharmony_ci#define PLB4OPB_GESR2 0xC /* Error Status 2: Master Dev 8-11 */ 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci/* PLB4-to-AHB Bridge */ 4062306a36Sopenharmony_ci#define DCRN_PLB4AHB_BASE 0x400 4162306a36Sopenharmony_ci#define DCRN_PLB4AHB_SEUAR (DCRN_PLB4AHB_BASE + 1) 4262306a36Sopenharmony_ci#define DCRN_PLB4AHB_SELAR (DCRN_PLB4AHB_BASE + 2) 4362306a36Sopenharmony_ci#define DCRN_PLB4AHB_ESR (DCRN_PLB4AHB_BASE + 3) 4462306a36Sopenharmony_ci#define DCRN_AHBPLB4_ESR (DCRN_PLB4AHB_BASE + 8) 4562306a36Sopenharmony_ci#define DCRN_AHBPLB4_EAR (DCRN_PLB4AHB_BASE + 9) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* PLB6 Controller */ 4862306a36Sopenharmony_ci#define DCRN_PLB6_BASE 0x11111300 4962306a36Sopenharmony_ci#define DCRN_PLB6_CR0 (DCRN_PLB6_BASE) 5062306a36Sopenharmony_ci#define DCRN_PLB6_ERR (DCRN_PLB6_BASE + 0x0B) 5162306a36Sopenharmony_ci#define DCRN_PLB6_HD (DCRN_PLB6_BASE + 0x0E) 5262306a36Sopenharmony_ci#define DCRN_PLB6_SHD (DCRN_PLB6_BASE + 0x10) 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci/* PLB4-to-PLB6 Bridge */ 5562306a36Sopenharmony_ci#define DCRN_PLB4PLB6_BASE 0x11111320 5662306a36Sopenharmony_ci#define DCRN_PLB4PLB6_ESR (DCRN_PLB4PLB6_BASE + 1) 5762306a36Sopenharmony_ci#define DCRN_PLB4PLB6_EARH (DCRN_PLB4PLB6_BASE + 3) 5862306a36Sopenharmony_ci#define DCRN_PLB4PLB6_EARL (DCRN_PLB4PLB6_BASE + 4) 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci/* PLB6-to-PLB4 Bridge */ 6162306a36Sopenharmony_ci#define DCRN_PLB6PLB4_BASE 0x11111350 6262306a36Sopenharmony_ci#define DCRN_PLB6PLB4_ESR (DCRN_PLB6PLB4_BASE + 1) 6362306a36Sopenharmony_ci#define DCRN_PLB6PLB4_EARH (DCRN_PLB6PLB4_BASE + 3) 6462306a36Sopenharmony_ci#define DCRN_PLB6PLB4_EARL (DCRN_PLB6PLB4_BASE + 4) 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci/* PLB6-to-MCIF Bridge */ 6762306a36Sopenharmony_ci#define DCRN_PLB6MCIF_BASE 0x11111380 6862306a36Sopenharmony_ci#define DCRN_PLB6MCIF_BESR0 (DCRN_PLB6MCIF_BASE + 0) 6962306a36Sopenharmony_ci#define DCRN_PLB6MCIF_BESR1 (DCRN_PLB6MCIF_BASE + 1) 7062306a36Sopenharmony_ci#define DCRN_PLB6MCIF_BEARL (DCRN_PLB6MCIF_BASE + 2) 7162306a36Sopenharmony_ci#define DCRN_PLB6MCIF_BEARH (DCRN_PLB6MCIF_BASE + 3) 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci/* Configuration Logic Registers */ 7462306a36Sopenharmony_ci#define DCRN_CONF_BASE 0x11111400 7562306a36Sopenharmony_ci#define DCRN_CONF_FIR_RWC (DCRN_CONF_BASE + 0x3A) 7662306a36Sopenharmony_ci#define DCRN_CONF_EIR_RS (DCRN_CONF_BASE + 0x3E) 7762306a36Sopenharmony_ci#define DCRN_CONF_RPERR0 (DCRN_CONF_BASE + 0x4D) 7862306a36Sopenharmony_ci#define DCRN_CONF_RPERR1 (DCRN_CONF_BASE + 0x4E) 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci#define DCRN_L2CDCRAI 0x11111100 8162306a36Sopenharmony_ci#define DCRN_L2CDCRDI 0x11111104 8262306a36Sopenharmony_ci/* L2 indirect addresses */ 8362306a36Sopenharmony_ci#define L2MCK 0x120 8462306a36Sopenharmony_ci#define L2MCKEN 0x130 8562306a36Sopenharmony_ci#define L2INT 0x150 8662306a36Sopenharmony_ci#define L2INTEN 0x160 8762306a36Sopenharmony_ci#define L2LOG0 0x180 8862306a36Sopenharmony_ci#define L2LOG1 0x184 8962306a36Sopenharmony_ci#define L2LOG2 0x188 9062306a36Sopenharmony_ci#define L2LOG3 0x18C 9162306a36Sopenharmony_ci#define L2LOG4 0x190 9262306a36Sopenharmony_ci#define L2LOG5 0x194 9362306a36Sopenharmony_ci#define L2PLBSTAT0 0x300 9462306a36Sopenharmony_ci#define L2PLBSTAT1 0x304 9562306a36Sopenharmony_ci#define L2PLBMCKEN0 0x330 9662306a36Sopenharmony_ci#define L2PLBMCKEN1 0x334 9762306a36Sopenharmony_ci#define L2PLBINTEN0 0x360 9862306a36Sopenharmony_ci#define L2PLBINTEN1 0x364 9962306a36Sopenharmony_ci#define L2ARRSTAT0 0x500 10062306a36Sopenharmony_ci#define L2ARRSTAT1 0x504 10162306a36Sopenharmony_ci#define L2ARRSTAT2 0x508 10262306a36Sopenharmony_ci#define L2ARRMCKEN0 0x530 10362306a36Sopenharmony_ci#define L2ARRMCKEN1 0x534 10462306a36Sopenharmony_ci#define L2ARRMCKEN2 0x538 10562306a36Sopenharmony_ci#define L2ARRINTEN0 0x560 10662306a36Sopenharmony_ci#define L2ARRINTEN1 0x564 10762306a36Sopenharmony_ci#define L2ARRINTEN2 0x568 10862306a36Sopenharmony_ci#define L2CPUSTAT 0x700 10962306a36Sopenharmony_ci#define L2CPUMCKEN 0x730 11062306a36Sopenharmony_ci#define L2CPUINTEN 0x760 11162306a36Sopenharmony_ci#define L2RACSTAT0 0x900 11262306a36Sopenharmony_ci#define L2RACMCKEN0 0x930 11362306a36Sopenharmony_ci#define L2RACINTEN0 0x960 11462306a36Sopenharmony_ci#define L2WACSTAT0 0xD00 11562306a36Sopenharmony_ci#define L2WACSTAT1 0xD04 11662306a36Sopenharmony_ci#define L2WACSTAT2 0xD08 11762306a36Sopenharmony_ci#define L2WACMCKEN0 0xD30 11862306a36Sopenharmony_ci#define L2WACMCKEN1 0xD34 11962306a36Sopenharmony_ci#define L2WACMCKEN2 0xD38 12062306a36Sopenharmony_ci#define L2WACINTEN0 0xD60 12162306a36Sopenharmony_ci#define L2WACINTEN1 0xD64 12262306a36Sopenharmony_ci#define L2WACINTEN2 0xD68 12362306a36Sopenharmony_ci#define L2WDFSTAT 0xF00 12462306a36Sopenharmony_ci#define L2WDFMCKEN 0xF30 12562306a36Sopenharmony_ci#define L2WDFINTEN 0xF60 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_ci/* DDR3/4 Memory Controller */ 12862306a36Sopenharmony_ci#define DCRN_DDR34_BASE 0x11120000 12962306a36Sopenharmony_ci#define DCRN_DDR34_MCSTAT 0x10 13062306a36Sopenharmony_ci#define DCRN_DDR34_MCOPT1 0x20 13162306a36Sopenharmony_ci#define DCRN_DDR34_MCOPT2 0x21 13262306a36Sopenharmony_ci#define DCRN_DDR34_PHYSTAT 0x32 13362306a36Sopenharmony_ci#define DCRN_DDR34_CFGR0 0x40 13462306a36Sopenharmony_ci#define DCRN_DDR34_CFGR1 0x41 13562306a36Sopenharmony_ci#define DCRN_DDR34_CFGR2 0x42 13662306a36Sopenharmony_ci#define DCRN_DDR34_CFGR3 0x43 13762306a36Sopenharmony_ci#define DCRN_DDR34_SCRUB_CNTL 0xAA 13862306a36Sopenharmony_ci#define DCRN_DDR34_SCRUB_INT 0xAB 13962306a36Sopenharmony_ci#define DCRN_DDR34_SCRUB_START_ADDR 0xB0 14062306a36Sopenharmony_ci#define DCRN_DDR34_SCRUB_END_ADDR 0xD0 14162306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT0 0xE0 14262306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT1 0xE1 14362306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT2 0xE2 14462306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_ADDR_PORT3 0xE3 14562306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT0 0xE4 14662306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT1 0xE5 14762306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT2 0xE6 14862306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_COUNT_PORT3 0xE7 14962306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT0 0xF0 15062306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT1 0xF2 15162306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT2 0xF4 15262306a36Sopenharmony_ci#define DCRN_DDR34_ECCERR_PORT3 0xF6 15362306a36Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT0 0xF8 15462306a36Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT1 0xF9 15562306a36Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT2 0xF9 15662306a36Sopenharmony_ci#define DCRN_DDR34_ECC_CHECK_PORT3 0xFB 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci#define DDR34_SCRUB_CNTL_STOP 0x00000000 15962306a36Sopenharmony_ci#define DDR34_SCRUB_CNTL_SCRUB 0x80000000 16062306a36Sopenharmony_ci#define DDR34_SCRUB_CNTL_UE_STOP 0x20000000 16162306a36Sopenharmony_ci#define DDR34_SCRUB_CNTL_CE_STOP 0x10000000 16262306a36Sopenharmony_ci#define DDR34_SCRUB_CNTL_RANK_EN 0x00008000 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci/* PLB-Attached DDR3/4 Core Wrapper */ 16562306a36Sopenharmony_ci#define DCRN_CW_BASE 0x11111800 16662306a36Sopenharmony_ci#define DCRN_CW_MCER0 0x00 16762306a36Sopenharmony_ci#define DCRN_CW_MCER1 0x01 16862306a36Sopenharmony_ci#define DCRN_CW_MCER_AND0 0x02 16962306a36Sopenharmony_ci#define DCRN_CW_MCER_AND1 0x03 17062306a36Sopenharmony_ci#define DCRN_CW_MCER_OR0 0x04 17162306a36Sopenharmony_ci#define DCRN_CW_MCER_OR1 0x05 17262306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK0 0x06 17362306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK1 0x07 17462306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK_AND0 0x08 17562306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK_AND1 0x09 17662306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK_OR0 0x0A 17762306a36Sopenharmony_ci#define DCRN_CW_MCER_MASK_OR1 0x0B 17862306a36Sopenharmony_ci#define DCRN_CW_MCER_ACTION0 0x0C 17962306a36Sopenharmony_ci#define DCRN_CW_MCER_ACTION1 0x0D 18062306a36Sopenharmony_ci#define DCRN_CW_MCER_WOF0 0x0E 18162306a36Sopenharmony_ci#define DCRN_CW_MCER_WOF1 0x0F 18262306a36Sopenharmony_ci#define DCRN_CW_LFIR 0x10 18362306a36Sopenharmony_ci#define DCRN_CW_LFIR_AND 0x11 18462306a36Sopenharmony_ci#define DCRN_CW_LFIR_OR 0x12 18562306a36Sopenharmony_ci#define DCRN_CW_LFIR_MASK 0x13 18662306a36Sopenharmony_ci#define DCRN_CW_LFIR_MASK_AND 0x14 18762306a36Sopenharmony_ci#define DCRN_CW_LFIR_MASK_OR 0x15 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci#define CW_MCER0_MEM_CE 0x00020000 19062306a36Sopenharmony_ci/* CMU addresses */ 19162306a36Sopenharmony_ci#define CMUN_CRCS 0x00 /* Chip Reset Control/Status */ 19262306a36Sopenharmony_ci#define CMUN_CONFFIR0 0x20 /* Config Reg Parity FIR 0 */ 19362306a36Sopenharmony_ci#define CMUN_CONFFIR1 0x21 /* Config Reg Parity FIR 1 */ 19462306a36Sopenharmony_ci#define CMUN_CONFFIR2 0x22 /* Config Reg Parity FIR 2 */ 19562306a36Sopenharmony_ci#define CMUN_CONFFIR3 0x23 /* Config Reg Parity FIR 3 */ 19662306a36Sopenharmony_ci#define CMUN_URCR3_RS 0x24 /* Unit Reset Control Reg 3 Set */ 19762306a36Sopenharmony_ci#define CMUN_URCR3_C 0x25 /* Unit Reset Control Reg 3 Clear */ 19862306a36Sopenharmony_ci#define CMUN_URCR3_P 0x26 /* Unit Reset Control Reg 3 Pulse */ 19962306a36Sopenharmony_ci#define CMUN_PW0 0x2C /* Pulse Width Register */ 20062306a36Sopenharmony_ci#define CMUN_URCR0_P 0x2D /* Unit Reset Control Reg 0 Pulse */ 20162306a36Sopenharmony_ci#define CMUN_URCR1_P 0x2E /* Unit Reset Control Reg 1 Pulse */ 20262306a36Sopenharmony_ci#define CMUN_URCR2_P 0x2F /* Unit Reset Control Reg 2 Pulse */ 20362306a36Sopenharmony_ci#define CMUN_CLS_RW 0x30 /* Code Load Status (Read/Write) */ 20462306a36Sopenharmony_ci#define CMUN_CLS_S 0x31 /* Code Load Status (Set) */ 20562306a36Sopenharmony_ci#define CMUN_CLS_C 0x32 /* Code Load Status (Clear */ 20662306a36Sopenharmony_ci#define CMUN_URCR2_RS 0x33 /* Unit Reset Control Reg 2 Set */ 20762306a36Sopenharmony_ci#define CMUN_URCR2_C 0x34 /* Unit Reset Control Reg 2 Clear */ 20862306a36Sopenharmony_ci#define CMUN_CLKEN0 0x35 /* Clock Enable 0 */ 20962306a36Sopenharmony_ci#define CMUN_CLKEN1 0x36 /* Clock Enable 1 */ 21062306a36Sopenharmony_ci#define CMUN_PCD0 0x37 /* PSI clock divider 0 */ 21162306a36Sopenharmony_ci#define CMUN_PCD1 0x38 /* PSI clock divider 1 */ 21262306a36Sopenharmony_ci#define CMUN_TMR0 0x39 /* Reset Timer */ 21362306a36Sopenharmony_ci#define CMUN_TVS0 0x3A /* TV Sense Reg 0 */ 21462306a36Sopenharmony_ci#define CMUN_TVS1 0x3B /* TV Sense Reg 1 */ 21562306a36Sopenharmony_ci#define CMUN_MCCR 0x3C /* DRAM Configuration Reg */ 21662306a36Sopenharmony_ci#define CMUN_FIR0 0x3D /* Fault Isolation Reg 0 */ 21762306a36Sopenharmony_ci#define CMUN_FMR0 0x3E /* FIR Mask Reg 0 */ 21862306a36Sopenharmony_ci#define CMUN_ETDRB 0x3F /* ETDR Backdoor */ 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci/* CRCS bit fields */ 22162306a36Sopenharmony_ci#define CRCS_STAT_MASK 0xF0000000 22262306a36Sopenharmony_ci#define CRCS_STAT_POR 0x10000000 22362306a36Sopenharmony_ci#define CRCS_STAT_PHR 0x20000000 22462306a36Sopenharmony_ci#define CRCS_STAT_PCIE 0x30000000 22562306a36Sopenharmony_ci#define CRCS_STAT_CRCS_SYS 0x40000000 22662306a36Sopenharmony_ci#define CRCS_STAT_DBCR_SYS 0x50000000 22762306a36Sopenharmony_ci#define CRCS_STAT_HOST_SYS 0x60000000 22862306a36Sopenharmony_ci#define CRCS_STAT_CHIP_RST_B 0x70000000 22962306a36Sopenharmony_ci#define CRCS_STAT_CRCS_CHIP 0x80000000 23062306a36Sopenharmony_ci#define CRCS_STAT_DBCR_CHIP 0x90000000 23162306a36Sopenharmony_ci#define CRCS_STAT_HOST_CHIP 0xA0000000 23262306a36Sopenharmony_ci#define CRCS_STAT_PSI_CHIP 0xB0000000 23362306a36Sopenharmony_ci#define CRCS_STAT_CRCS_CORE 0xC0000000 23462306a36Sopenharmony_ci#define CRCS_STAT_DBCR_CORE 0xD0000000 23562306a36Sopenharmony_ci#define CRCS_STAT_HOST_CORE 0xE0000000 23662306a36Sopenharmony_ci#define CRCS_STAT_PCIE_HOT 0xF0000000 23762306a36Sopenharmony_ci#define CRCS_STAT_SELF_CORE 0x40000000 23862306a36Sopenharmony_ci#define CRCS_STAT_SELF_CHIP 0x50000000 23962306a36Sopenharmony_ci#define CRCS_WATCHE 0x08000000 24062306a36Sopenharmony_ci#define CRCS_CORE 0x04000000 /* Reset PPC440 core */ 24162306a36Sopenharmony_ci#define CRCS_CHIP 0x02000000 /* Chip Reset */ 24262306a36Sopenharmony_ci#define CRCS_SYS 0x01000000 /* System Reset */ 24362306a36Sopenharmony_ci#define CRCS_WRCR 0x00800000 /* Watchdog reset on core reset */ 24462306a36Sopenharmony_ci#define CRCS_EXTCR 0x00080000 /* CHIP_RST_B triggers chip reset */ 24562306a36Sopenharmony_ci#define CRCS_PLOCK 0x00000002 /* PLL Locked */ 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci#define mtcmu(reg, data) \ 24862306a36Sopenharmony_cido { \ 24962306a36Sopenharmony_ci mtdcr(DCRN_CMU_ADDR, reg); \ 25062306a36Sopenharmony_ci mtdcr(DCRN_CMU_DATA, data); \ 25162306a36Sopenharmony_ci} while (0) 25262306a36Sopenharmony_ci 25362306a36Sopenharmony_ci#define mfcmu(reg)\ 25462306a36Sopenharmony_ci ({u32 data; \ 25562306a36Sopenharmony_ci mtdcr(DCRN_CMU_ADDR, reg); \ 25662306a36Sopenharmony_ci data = mfdcr(DCRN_CMU_DATA); \ 25762306a36Sopenharmony_ci data; }) 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci#define mtl2(reg, data) \ 26062306a36Sopenharmony_cido { \ 26162306a36Sopenharmony_ci mtdcr(DCRN_L2CDCRAI, reg); \ 26262306a36Sopenharmony_ci mtdcr(DCRN_L2CDCRDI, data); \ 26362306a36Sopenharmony_ci} while (0) 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define mfl2(reg) \ 26662306a36Sopenharmony_ci ({u32 data; \ 26762306a36Sopenharmony_ci mtdcr(DCRN_L2CDCRAI, reg); \ 26862306a36Sopenharmony_ci data = mfdcr(DCRN_L2CDCRDI); \ 26962306a36Sopenharmony_ci data; }) 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci#endif /* __KERNEL__ */ 27262306a36Sopenharmony_ci#endif /* _ASM_POWERPC_FSP2_DCR_H_ */ 273