0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _FSL_DDR_EDAC_H_
0014 #define _FSL_DDR_EDAC_H_
0015
0016 #define fsl_mc_printk(mci, level, fmt, arg...) \
0017 edac_mc_chipset_printk(mci, level, "FSL_DDR", fmt, ##arg)
0018
0019
0020
0021
0022
0023
0024 #define FSL_MC_DDR_SDRAM_CFG 0x0110
0025 #define FSL_MC_CS_BNDS_0 0x0000
0026 #define FSL_MC_CS_BNDS_OFS 0x0008
0027
0028 #define FSL_MC_DATA_ERR_INJECT_HI 0x0e00
0029 #define FSL_MC_DATA_ERR_INJECT_LO 0x0e04
0030 #define FSL_MC_ECC_ERR_INJECT 0x0e08
0031 #define FSL_MC_CAPTURE_DATA_HI 0x0e20
0032 #define FSL_MC_CAPTURE_DATA_LO 0x0e24
0033 #define FSL_MC_CAPTURE_ECC 0x0e28
0034 #define FSL_MC_ERR_DETECT 0x0e40
0035 #define FSL_MC_ERR_DISABLE 0x0e44
0036 #define FSL_MC_ERR_INT_EN 0x0e48
0037 #define FSL_MC_CAPTURE_ATRIBUTES 0x0e4c
0038 #define FSL_MC_CAPTURE_ADDRESS 0x0e50
0039 #define FSL_MC_CAPTURE_EXT_ADDRESS 0x0e54
0040 #define FSL_MC_ERR_SBE 0x0e58
0041
0042 #define DSC_MEM_EN 0x80000000
0043 #define DSC_ECC_EN 0x20000000
0044 #define DSC_RD_EN 0x10000000
0045 #define DSC_DBW_MASK 0x00180000
0046 #define DSC_DBW_32 0x00080000
0047 #define DSC_DBW_64 0x00000000
0048
0049 #define DSC_SDTYPE_MASK 0x07000000
0050 #define DSC_X32_EN 0x00000020
0051
0052
0053 #define DDR_EIE_MSEE 0x1
0054 #define DDR_EIE_SBEE 0x4
0055 #define DDR_EIE_MBEE 0x8
0056
0057
0058 #define DDR_EDE_MSE 0x1
0059 #define DDR_EDE_SBE 0x4
0060 #define DDR_EDE_MBE 0x8
0061 #define DDR_EDE_MME 0x80000000
0062
0063
0064 #define DDR_EDI_MSED 0x1
0065 #define DDR_EDI_SBED 0x4
0066 #define DDR_EDI_MBED 0x8
0067
0068 struct fsl_mc_pdata {
0069 char *name;
0070 int edac_idx;
0071 void __iomem *mc_vbase;
0072 int irq;
0073 };
0074 int fsl_mc_err_probe(struct platform_device *op);
0075 int fsl_mc_err_remove(struct platform_device *op);
0076 #endif