aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/mpc85xx_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/mpc85xx_edac.c')
-rw-r--r--drivers/edac/mpc85xx_edac.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index ecd5928d7110..6d0114a1b77e 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -672,6 +672,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
672{ 672{
673 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 673 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
674 struct csrow_info *csrow; 674 struct csrow_info *csrow;
675 u32 bus_width;
675 u32 err_detect; 676 u32 err_detect;
676 u32 syndrome; 677 u32 syndrome;
677 u32 err_addr; 678 u32 err_addr;
@@ -692,6 +693,15 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
692 } 693 }
693 694
694 syndrome = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ECC); 695 syndrome = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ECC);
696
697 /* Mask off appropriate bits of syndrome based on bus width */
698 bus_width = (in_be32(pdata->mc_vbase + MPC85XX_MC_DDR_SDRAM_CFG) &
699 DSC_DBW_MASK) ? 32 : 64;
700 if (bus_width == 64)
701 syndrome &= 0xff;
702 else
703 syndrome &= 0xffff;
704
695 err_addr = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS); 705 err_addr = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS);
696 pfn = err_addr >> PAGE_SHIFT; 706 pfn = err_addr >> PAGE_SHIFT;
697 707
@@ -707,7 +717,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
707 mpc85xx_mc_printk(mci, KERN_ERR, "Capture Data Low: %#8.8x\n", 717 mpc85xx_mc_printk(mci, KERN_ERR, "Capture Data Low: %#8.8x\n",
708 in_be32(pdata->mc_vbase + 718 in_be32(pdata->mc_vbase +
709 MPC85XX_MC_CAPTURE_DATA_LO)); 719 MPC85XX_MC_CAPTURE_DATA_LO));
710 mpc85xx_mc_printk(mci, KERN_ERR, "syndrome: %#8.8x\n", syndrome); 720 mpc85xx_mc_printk(mci, KERN_ERR, "syndrome: %#2.2x\n", syndrome);
711 mpc85xx_mc_printk(mci, KERN_ERR, "err addr: %#8.8x\n", err_addr); 721 mpc85xx_mc_printk(mci, KERN_ERR, "err addr: %#8.8x\n", err_addr);
712 mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn); 722 mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn);
713 723