18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Contains register definitions common to PowerPC 8xx CPUs. Notice 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_REG_8xx_H 68c2ecf20Sopenharmony_ci#define _ASM_POWERPC_REG_8xx_H 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* Cache control on the MPC8xx is provided through some additional 98c2ecf20Sopenharmony_ci * special purpose registers. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#define SPRN_IC_CST 560 /* Instruction cache control/status */ 128c2ecf20Sopenharmony_ci#define SPRN_IC_ADR 561 /* Address needed for some commands */ 138c2ecf20Sopenharmony_ci#define SPRN_IC_DAT 562 /* Read-only data register */ 148c2ecf20Sopenharmony_ci#define SPRN_DC_CST 568 /* Data cache control/status */ 158c2ecf20Sopenharmony_ci#define SPRN_DC_ADR 569 /* Address needed for some commands */ 168c2ecf20Sopenharmony_ci#define SPRN_DC_DAT 570 /* Read-only data register */ 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* Misc Debug */ 198c2ecf20Sopenharmony_ci#define SPRN_DPDR 630 208c2ecf20Sopenharmony_ci#define SPRN_MI_CAM 816 218c2ecf20Sopenharmony_ci#define SPRN_MI_RAM0 817 228c2ecf20Sopenharmony_ci#define SPRN_MI_RAM1 818 238c2ecf20Sopenharmony_ci#define SPRN_MD_CAM 824 248c2ecf20Sopenharmony_ci#define SPRN_MD_RAM0 825 258c2ecf20Sopenharmony_ci#define SPRN_MD_RAM1 826 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Special MSR manipulation registers */ 288c2ecf20Sopenharmony_ci#define SPRN_EIE 80 /* External interrupt enable (EE=1, RI=1) */ 298c2ecf20Sopenharmony_ci#define SPRN_EID 81 /* External interrupt disable (EE=0, RI=1) */ 308c2ecf20Sopenharmony_ci#define SPRN_NRI 82 /* Non recoverable interrupt (EE=0, RI=0) */ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci/* Debug registers */ 338c2ecf20Sopenharmony_ci#define SPRN_CMPA 144 348c2ecf20Sopenharmony_ci#define SPRN_COUNTA 150 358c2ecf20Sopenharmony_ci#define SPRN_CMPE 152 368c2ecf20Sopenharmony_ci#define SPRN_CMPF 153 378c2ecf20Sopenharmony_ci#define SPRN_LCTRL1 156 388c2ecf20Sopenharmony_ci#define LCTRL1_CTE_GT 0xc0000000 398c2ecf20Sopenharmony_ci#define LCTRL1_CTF_LT 0x14000000 408c2ecf20Sopenharmony_ci#define LCTRL1_CRWE_RW 0x00000000 418c2ecf20Sopenharmony_ci#define LCTRL1_CRWE_RO 0x00040000 428c2ecf20Sopenharmony_ci#define LCTRL1_CRWE_WO 0x000c0000 438c2ecf20Sopenharmony_ci#define LCTRL1_CRWF_RW 0x00000000 448c2ecf20Sopenharmony_ci#define LCTRL1_CRWF_RO 0x00010000 458c2ecf20Sopenharmony_ci#define LCTRL1_CRWF_WO 0x00030000 468c2ecf20Sopenharmony_ci#define SPRN_LCTRL2 157 478c2ecf20Sopenharmony_ci#define LCTRL2_LW0EN 0x80000000 488c2ecf20Sopenharmony_ci#define LCTRL2_LW0LA_E 0x00000000 498c2ecf20Sopenharmony_ci#define LCTRL2_LW0LA_F 0x04000000 508c2ecf20Sopenharmony_ci#define LCTRL2_LW0LA_EandF 0x08000000 518c2ecf20Sopenharmony_ci#define LCTRL2_LW0LADC 0x02000000 528c2ecf20Sopenharmony_ci#define LCTRL2_SLW0EN 0x00000002 538c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_8xx 548c2ecf20Sopenharmony_ci#define SPRN_ICTRL 158 558c2ecf20Sopenharmony_ci#endif 568c2ecf20Sopenharmony_ci#define SPRN_BAR 159 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci/* Commands. Only the first few are available to the instruction cache. 598c2ecf20Sopenharmony_ci*/ 608c2ecf20Sopenharmony_ci#define IDC_ENABLE 0x02000000 /* Cache enable */ 618c2ecf20Sopenharmony_ci#define IDC_DISABLE 0x04000000 /* Cache disable */ 628c2ecf20Sopenharmony_ci#define IDC_LDLCK 0x06000000 /* Load and lock */ 638c2ecf20Sopenharmony_ci#define IDC_UNLINE 0x08000000 /* Unlock line */ 648c2ecf20Sopenharmony_ci#define IDC_UNALL 0x0a000000 /* Unlock all */ 658c2ecf20Sopenharmony_ci#define IDC_INVALL 0x0c000000 /* Invalidate all */ 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define DC_FLINE 0x0e000000 /* Flush data cache line */ 688c2ecf20Sopenharmony_ci#define DC_SFWT 0x01000000 /* Set forced writethrough mode */ 698c2ecf20Sopenharmony_ci#define DC_CFWT 0x03000000 /* Clear forced writethrough mode */ 708c2ecf20Sopenharmony_ci#define DC_SLES 0x05000000 /* Set little endian swap mode */ 718c2ecf20Sopenharmony_ci#define DC_CLES 0x07000000 /* Clear little endian swap mode */ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* Status. 748c2ecf20Sopenharmony_ci*/ 758c2ecf20Sopenharmony_ci#define IDC_ENABLED 0x80000000 /* Cache is enabled */ 768c2ecf20Sopenharmony_ci#define IDC_CERR1 0x00200000 /* Cache error 1 */ 778c2ecf20Sopenharmony_ci#define IDC_CERR2 0x00100000 /* Cache error 2 */ 788c2ecf20Sopenharmony_ci#define IDC_CERR3 0x00080000 /* Cache error 3 */ 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#define DC_DFWT 0x40000000 /* Data cache is forced write through */ 818c2ecf20Sopenharmony_ci#define DC_LES 0x20000000 /* Caches are little endian mode */ 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_REG_8xx_H */ 84