diff options
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/mv64x60_edac.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c index de69163ff5b3..083ce8d0c63d 100644 --- a/drivers/edac/mv64x60_edac.c +++ b/drivers/edac/mv64x60_edac.c | |||
@@ -71,6 +71,35 @@ static irqreturn_t mv64x60_pci_isr(int irq, void *dev_id) | |||
71 | return IRQ_HANDLED; | 71 | return IRQ_HANDLED; |
72 | } | 72 | } |
73 | 73 | ||
74 | /* | ||
75 | * Bit 0 of MV64x60_PCIx_ERR_MASK does not exist on the 64360 and because of | ||
76 | * errata FEr-#11 and FEr-##16 for the 64460, it should be 0 on that chip as | ||
77 | * well. IOW, don't set bit 0. | ||
78 | */ | ||
79 | |||
80 | /* Erratum FEr PCI-#16: clear bit 0 of PCI SERRn Mask reg. */ | ||
81 | static int __init mv64x60_pci_fixup(struct platform_device *pdev) | ||
82 | { | ||
83 | struct resource *r; | ||
84 | void __iomem *pci_serr; | ||
85 | |||
86 | r = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
87 | if (!r) { | ||
88 | printk(KERN_ERR "%s: Unable to get resource for " | ||
89 | "PCI err regs\n", __func__); | ||
90 | return -ENOENT; | ||
91 | } | ||
92 | |||
93 | pci_serr = ioremap(r->start, r->end - r->start + 1); | ||
94 | if (!pci_serr) | ||
95 | return -ENOMEM; | ||
96 | |||
97 | out_le32(pci_serr, in_le32(pci_serr) & ~0x1); | ||
98 | iounmap(pci_serr); | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | |||
74 | static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) | 103 | static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) |
75 | { | 104 | { |
76 | struct edac_pci_ctl_info *pci; | 105 | struct edac_pci_ctl_info *pci; |
@@ -128,6 +157,12 @@ static int __devinit mv64x60_pci_err_probe(struct platform_device *pdev) | |||
128 | goto err; | 157 | goto err; |
129 | } | 158 | } |
130 | 159 | ||
160 | res = mv64x60_pci_fixup(pdev); | ||
161 | if (res < 0) { | ||
162 | printk(KERN_ERR "%s: PCI fixup failed\n", __func__); | ||
163 | goto err; | ||
164 | } | ||
165 | |||
131 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_CAUSE, 0); | 166 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_CAUSE, 0); |
132 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_MASK, 0); | 167 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_MASK, 0); |
133 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_MASK, | 168 | out_le32(pdata->pci_vbase + MV64X60_PCI_ERROR_MASK, |