diff options
-rw-r--r-- | drivers/edac/i5100_edac.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c index a8767a6c1481..509eec860c37 100644 --- a/drivers/edac/i5100_edac.c +++ b/drivers/edac/i5100_edac.c | |||
@@ -24,6 +24,8 @@ | |||
24 | /* register addresses and bit field accessors... */ | 24 | /* register addresses and bit field accessors... */ |
25 | 25 | ||
26 | /* device 16, func 1 */ | 26 | /* device 16, func 1 */ |
27 | #define I5100_MC 0x40 /* Memory Control Register */ | ||
28 | #define I5100_MC_ERRDETEN(a) ((a) >> 5 & 1) | ||
27 | #define I5100_MS 0x44 /* Memory Status Register */ | 29 | #define I5100_MS 0x44 /* Memory Status Register */ |
28 | #define I5100_SPDDATA 0x48 /* Serial Presence Detect Status Reg */ | 30 | #define I5100_SPDDATA 0x48 /* Serial Presence Detect Status Reg */ |
29 | #define I5100_SPDDATA_RDO(a) ((a) >> 15 & 1) | 31 | #define I5100_SPDDATA_RDO(a) ((a) >> 15 & 1) |
@@ -688,6 +690,14 @@ static int __devinit i5100_init_one(struct pci_dev *pdev, | |||
688 | goto bail; | 690 | goto bail; |
689 | } | 691 | } |
690 | 692 | ||
693 | /* ECC enabled? */ | ||
694 | pci_read_config_dword(pdev, I5100_MC, &dw); | ||
695 | if (!I5100_MC_ERRDETEN(dw)) { | ||
696 | printk(KERN_INFO "i5100_edac: ECC not enabled.\n"); | ||
697 | ret = -ENODEV; | ||
698 | goto bail; | ||
699 | } | ||
700 | |||
691 | /* figure out how many ranks, from strapped state of 48GB_Mode input */ | 701 | /* figure out how many ranks, from strapped state of 48GB_Mode input */ |
692 | pci_read_config_dword(pdev, I5100_MS, &dw); | 702 | pci_read_config_dword(pdev, I5100_MS, &dw); |
693 | ranksperch = !!(dw & (1 << 8)) * 2 + 4; | 703 | ranksperch = !!(dw & (1 << 8)) * 2 + 4; |