aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2015-05-12 06:03:42 -0400
committerBorislav Petkov <bp@suse.de>2015-05-31 06:51:08 -0400
commit2ce39109a5062b06df440fbf2993ce9ab3bf6e08 (patch)
tree88c37cf22457d6658dd1f148ab2b0c695c847d58 /drivers/edac
parent74210267a56eba10d6252215e72b095c257dcaf7 (diff)
EDAC, mpc85xx: Extend error address to 64 bit
Extend err_addr to cover 64 bits for DDR errors. Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Johannes Thumshirn <morbidrsa@gmail.com> Cc: Mingkai.hu@freescale.com Link: http://lkml.kernel.org/r/1431425022-44766-2-git-send-email-Wenbin.Song@freescale.com Signed-off-by: songwenbin <wenbin.song@freescale.com> Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/mpc85xx_edac.c10
-rw-r--r--drivers/edac/mpc85xx_edac.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 68bf234bdfe6..23ef8e9f2c9a 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -811,6 +811,8 @@ static void sbe_ecc_decode(u32 cap_high, u32 cap_low, u32 cap_ecc,
811 } 811 }
812} 812}
813 813
814#define make64(high, low) (((u64)(high) << 32) | (low))
815
814static void mpc85xx_mc_check(struct mem_ctl_info *mci) 816static void mpc85xx_mc_check(struct mem_ctl_info *mci)
815{ 817{
816 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 818 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
@@ -818,7 +820,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
818 u32 bus_width; 820 u32 bus_width;
819 u32 err_detect; 821 u32 err_detect;
820 u32 syndrome; 822 u32 syndrome;
821 u32 err_addr; 823 u64 err_addr;
822 u32 pfn; 824 u32 pfn;
823 int row_index; 825 int row_index;
824 u32 cap_high; 826 u32 cap_high;
@@ -849,7 +851,9 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
849 else 851 else
850 syndrome &= 0xffff; 852 syndrome &= 0xffff;
851 853
852 err_addr = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS); 854 err_addr = make64(
855 in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_EXT_ADDRESS),
856 in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS));
853 pfn = err_addr >> PAGE_SHIFT; 857 pfn = err_addr >> PAGE_SHIFT;
854 858
855 for (row_index = 0; row_index < mci->nr_csrows; row_index++) { 859 for (row_index = 0; row_index < mci->nr_csrows; row_index++) {
@@ -886,7 +890,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
886 mpc85xx_mc_printk(mci, KERN_ERR, 890 mpc85xx_mc_printk(mci, KERN_ERR,
887 "Captured Data / ECC:\t%#8.8x_%08x / %#2.2x\n", 891 "Captured Data / ECC:\t%#8.8x_%08x / %#2.2x\n",
888 cap_high, cap_low, syndrome); 892 cap_high, cap_low, syndrome);
889 mpc85xx_mc_printk(mci, KERN_ERR, "Err addr: %#8.8x\n", err_addr); 893 mpc85xx_mc_printk(mci, KERN_ERR, "Err addr: %#8.8llx\n", err_addr);
890 mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn); 894 mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn);
891 895
892 /* we are out of range */ 896 /* we are out of range */
diff --git a/drivers/edac/mpc85xx_edac.h b/drivers/edac/mpc85xx_edac.h
index 4498baf9ce05..9352e88d53e5 100644
--- a/drivers/edac/mpc85xx_edac.h
+++ b/drivers/edac/mpc85xx_edac.h
@@ -43,6 +43,7 @@
43#define MPC85XX_MC_ERR_INT_EN 0x0e48 43#define MPC85XX_MC_ERR_INT_EN 0x0e48
44#define MPC85XX_MC_CAPTURE_ATRIBUTES 0x0e4c 44#define MPC85XX_MC_CAPTURE_ATRIBUTES 0x0e4c
45#define MPC85XX_MC_CAPTURE_ADDRESS 0x0e50 45#define MPC85XX_MC_CAPTURE_ADDRESS 0x0e50
46#define MPC85XX_MC_CAPTURE_EXT_ADDRESS 0x0e54
46#define MPC85XX_MC_ERR_SBE 0x0e58 47#define MPC85XX_MC_ERR_SBE 0x0e58
47 48
48#define DSC_MEM_EN 0x80000000 49#define DSC_MEM_EN 0x80000000