18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Freescale MPC85xx Memory Controller kernel module 38c2ecf20Sopenharmony_ci * Author: Dave Jiang <djiang@mvista.com> 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * 2006-2007 (c) MontaVista Software, Inc. This file is licensed under 68c2ecf20Sopenharmony_ci * the terms of the GNU General Public License version 2. This program 78c2ecf20Sopenharmony_ci * is licensed "as is" without any warranty of any kind, whether express 88c2ecf20Sopenharmony_ci * or implied. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#ifndef _MPC85XX_EDAC_H_ 128c2ecf20Sopenharmony_ci#define _MPC85XX_EDAC_H_ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define MPC85XX_REVISION " Ver: 2.0.0" 158c2ecf20Sopenharmony_ci#define EDAC_MOD_STR "MPC85xx_edac" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define mpc85xx_printk(level, fmt, arg...) \ 188c2ecf20Sopenharmony_ci edac_printk(level, "MPC85xx", fmt, ##arg) 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* 218c2ecf20Sopenharmony_ci * L2 Err defines 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRINJHI 0x0000 248c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRINJLO 0x0004 258c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRINJCTL 0x0008 268c2ecf20Sopenharmony_ci#define MPC85XX_L2_CAPTDATAHI 0x0020 278c2ecf20Sopenharmony_ci#define MPC85XX_L2_CAPTDATALO 0x0024 288c2ecf20Sopenharmony_ci#define MPC85XX_L2_CAPTECC 0x0028 298c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRDET 0x0040 308c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRDIS 0x0044 318c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRINTEN 0x0048 328c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRATTR 0x004c 338c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRADDR 0x0050 348c2ecf20Sopenharmony_ci#define MPC85XX_L2_ERRCTL 0x0058 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* Error Interrupt Enable */ 378c2ecf20Sopenharmony_ci#define L2_EIE_L2CFGINTEN 0x1 388c2ecf20Sopenharmony_ci#define L2_EIE_SBECCINTEN 0x4 398c2ecf20Sopenharmony_ci#define L2_EIE_MBECCINTEN 0x8 408c2ecf20Sopenharmony_ci#define L2_EIE_TPARINTEN 0x10 418c2ecf20Sopenharmony_ci#define L2_EIE_MASK (L2_EIE_L2CFGINTEN | L2_EIE_SBECCINTEN | \ 428c2ecf20Sopenharmony_ci L2_EIE_MBECCINTEN | L2_EIE_TPARINTEN) 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* Error Detect */ 458c2ecf20Sopenharmony_ci#define L2_EDE_L2CFGERR 0x1 468c2ecf20Sopenharmony_ci#define L2_EDE_SBECCERR 0x4 478c2ecf20Sopenharmony_ci#define L2_EDE_MBECCERR 0x8 488c2ecf20Sopenharmony_ci#define L2_EDE_TPARERR 0x10 498c2ecf20Sopenharmony_ci#define L2_EDE_MULL2ERR 0x80000000 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define L2_EDE_CE_MASK L2_EDE_SBECCERR 528c2ecf20Sopenharmony_ci#define L2_EDE_UE_MASK (L2_EDE_L2CFGERR | L2_EDE_MBECCERR | \ 538c2ecf20Sopenharmony_ci L2_EDE_TPARERR) 548c2ecf20Sopenharmony_ci#define L2_EDE_MASK (L2_EDE_L2CFGERR | L2_EDE_SBECCERR | \ 558c2ecf20Sopenharmony_ci L2_EDE_MBECCERR | L2_EDE_TPARERR | L2_EDE_MULL2ERR) 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci/* 588c2ecf20Sopenharmony_ci * PCI Err defines 598c2ecf20Sopenharmony_ci */ 608c2ecf20Sopenharmony_ci#define PCI_EDE_TOE 0x00000001 618c2ecf20Sopenharmony_ci#define PCI_EDE_SCM 0x00000002 628c2ecf20Sopenharmony_ci#define PCI_EDE_IRMSV 0x00000004 638c2ecf20Sopenharmony_ci#define PCI_EDE_ORMSV 0x00000008 648c2ecf20Sopenharmony_ci#define PCI_EDE_OWMSV 0x00000010 658c2ecf20Sopenharmony_ci#define PCI_EDE_TGT_ABRT 0x00000020 668c2ecf20Sopenharmony_ci#define PCI_EDE_MST_ABRT 0x00000040 678c2ecf20Sopenharmony_ci#define PCI_EDE_TGT_PERR 0x00000080 688c2ecf20Sopenharmony_ci#define PCI_EDE_MST_PERR 0x00000100 698c2ecf20Sopenharmony_ci#define PCI_EDE_RCVD_SERR 0x00000200 708c2ecf20Sopenharmony_ci#define PCI_EDE_ADDR_PERR 0x00000400 718c2ecf20Sopenharmony_ci#define PCI_EDE_MULTI_ERR 0x80000000 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define PCI_EDE_PERR_MASK (PCI_EDE_TGT_PERR | PCI_EDE_MST_PERR | \ 748c2ecf20Sopenharmony_ci PCI_EDE_ADDR_PERR) 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_DR 0x0000 778c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_CAP_DR 0x0004 788c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_EN 0x0008 798c2ecf20Sopenharmony_ci#define PEX_ERR_ICCAIE_EN_BIT 0x00020000 808c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_ATTRIB 0x000c 818c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_ADDR 0x0010 828c2ecf20Sopenharmony_ci#define PEX_ERR_ICCAD_DISR_BIT 0x00020000 838c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_EXT_ADDR 0x0014 848c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_DL 0x0018 858c2ecf20Sopenharmony_ci#define MPC85XX_PCI_ERR_DH 0x001c 868c2ecf20Sopenharmony_ci#define MPC85XX_PCI_GAS_TIMR 0x0020 878c2ecf20Sopenharmony_ci#define MPC85XX_PCI_PCIX_TIMR 0x0024 888c2ecf20Sopenharmony_ci#define MPC85XX_PCIE_ERR_CAP_R0 0x0028 898c2ecf20Sopenharmony_ci#define MPC85XX_PCIE_ERR_CAP_R1 0x002c 908c2ecf20Sopenharmony_ci#define MPC85XX_PCIE_ERR_CAP_R2 0x0030 918c2ecf20Sopenharmony_ci#define MPC85XX_PCIE_ERR_CAP_R3 0x0034 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_cistruct mpc85xx_l2_pdata { 948c2ecf20Sopenharmony_ci char *name; 958c2ecf20Sopenharmony_ci int edac_idx; 968c2ecf20Sopenharmony_ci void __iomem *l2_vbase; 978c2ecf20Sopenharmony_ci int irq; 988c2ecf20Sopenharmony_ci}; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_cistruct mpc85xx_pci_pdata { 1018c2ecf20Sopenharmony_ci char *name; 1028c2ecf20Sopenharmony_ci bool is_pcie; 1038c2ecf20Sopenharmony_ci int edac_idx; 1048c2ecf20Sopenharmony_ci void __iomem *pci_vbase; 1058c2ecf20Sopenharmony_ci int irq; 1068c2ecf20Sopenharmony_ci}; 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci#endif 109