24 #include <linux/module.h>
28 #include <linux/bitops.h>
36 #define AMD8131_EDAC_REVISION " Ver: 1.0.0"
37 #define AMD8131_EDAC_MOD_STR "amd8131_edac"
44 ret = pci_read_config_dword(dev, reg, val32);
47 " PCI Access Read Error at 0x%x\n", reg);
54 ret = pci_write_config_dword(dev, reg, val32);
57 " PCI Access Write Error at 0x%x\n", reg);
60 static char *
const bridge_str[] = {
73 .ctl_name =
"AMD8131_PCIX_NORTH_A",
78 .ctl_name =
"AMD8131_PCIX_NORTH_B",
83 .ctl_name =
"AMD8131_PCIX_SOUTH_A",
88 .ctl_name =
"AMD8131_PCIX_SOUTH_B",
170 static void amd8131_pcix_check(
struct edac_pci_ctl_info *edac_dev)
178 if (val32 & MEM_LIMIT_MASK) {
180 "on %s bridge\n", dev_info->
ctl_name);
182 "RTA: %d, STA: %d, MDPE: %d\n",
198 if (val32 & INT_CTLR_DTS) {
200 "on %s bridge\n", dev_info->
ctl_name);
211 if (val32 & LNK_CTRL_CRCERR_A) {
213 "on %s bridge\n", dev_info->
ctl_name);
226 "on %s bridge\n", dev_info->
ctl_name);
238 .devices = amd8131_devices,
239 .init = amd8131_pcix_init,
240 .exit = amd8131_pcix_exit,
241 .check = amd8131_pcix_check,
270 "vendor %x, device %x, devfn %x, name %s\n",
290 dev_info->
edac_dev->dev_name = dev_name(&dev_info->
dev->dev);
295 if (amd8131_chipset.
init)
296 amd8131_chipset.
init(dev_info);
306 "vendor %x, device %x, devfn %x, name %s\n",
313 static void amd8131_remove(
struct pci_dev *dev)
330 if (amd8131_chipset.
exit)
331 amd8131_chipset.
exit(dev_info);
351 static struct pci_driver amd8131_edac_driver = {
353 .probe = amd8131_probe,
354 .remove = amd8131_remove,
355 .id_table = amd8131_edac_pci_tbl,
358 static int __init amd8131_edac_init(
void)
366 return pci_register_driver(&amd8131_edac_driver);
369 static void __exit amd8131_edac_exit(
void)