Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187260
b: refs/heads/master
c: 2176863
h: refs/heads/master
v: v3
  • Loading branch information
Peter Tyser authored and Linus Torvalds committed Mar 12, 2010
1 parent 7dd423c commit 2ac3e6a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8467005da3ef6104b89a4cc5e9c9d9445b75565f
refs/heads/master: 21768639be419d00275ac4e58b863361d0c24ee4
12 changes: 11 additions & 1 deletion trunk/drivers/edac/mpc85xx_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
{
struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
struct csrow_info *csrow;
u32 bus_width;
u32 err_detect;
u32 syndrome;
u32 err_addr;
Expand All @@ -692,6 +693,15 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
}

syndrome = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ECC);

/* Mask off appropriate bits of syndrome based on bus width */
bus_width = (in_be32(pdata->mc_vbase + MPC85XX_MC_DDR_SDRAM_CFG) &
DSC_DBW_MASK) ? 32 : 64;
if (bus_width == 64)
syndrome &= 0xff;
else
syndrome &= 0xffff;

err_addr = in_be32(pdata->mc_vbase + MPC85XX_MC_CAPTURE_ADDRESS);
pfn = err_addr >> PAGE_SHIFT;

Expand All @@ -707,7 +717,7 @@ static void mpc85xx_mc_check(struct mem_ctl_info *mci)
mpc85xx_mc_printk(mci, KERN_ERR, "Capture Data Low: %#8.8x\n",
in_be32(pdata->mc_vbase +
MPC85XX_MC_CAPTURE_DATA_LO));
mpc85xx_mc_printk(mci, KERN_ERR, "syndrome: %#8.8x\n", syndrome);
mpc85xx_mc_printk(mci, KERN_ERR, "syndrome: %#2.2x\n", syndrome);
mpc85xx_mc_printk(mci, KERN_ERR, "err addr: %#8.8x\n", err_addr);
mpc85xx_mc_printk(mci, KERN_ERR, "PFN: %#8.8x\n", pfn);

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/edac/mpc85xx_edac.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
#define DSC_MEM_EN 0x80000000
#define DSC_ECC_EN 0x20000000
#define DSC_RD_EN 0x10000000
#define DSC_DBW_MASK 0x00180000
#define DSC_DBW_32 0x00080000
#define DSC_DBW_64 0x00000000

#define DSC_SDTYPE_MASK 0x07000000

Expand Down

0 comments on commit 2ac3e6a

Please sign in to comment.