aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2010-10-01 13:35:38 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2011-01-07 05:33:53 -0500
commitb8cfa02f833a614e80f851747c4ce14989a4cfd0 (patch)
tree64e9b0dca377952e8671b4a61c47bfffc73e6235 /drivers/edac/amd64_edac.h
parentbbd0c1f675d7d64fc02393d4985a069be5037b54 (diff)
amd64_edac: Concentrate per-family init even more
Move the remaining per-family init code into the proper place and simplify the rest of the initialization. Reorganize error handling in amd64_init_one_instance(). Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 064e0d691ff9..007b68a436c5 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -383,6 +383,8 @@ struct error_injection {
383}; 383};
384 384
385struct amd64_pvt { 385struct amd64_pvt {
386 struct low_ops *ops;
387
386 /* pci_device handles which we utilize */ 388 /* pci_device handles which we utilize */
387 struct pci_dev *addr_f1_ctl; 389 struct pci_dev *addr_f1_ctl;
388 struct pci_dev *dram_f2_ctl; 390 struct pci_dev *dram_f2_ctl;
@@ -390,9 +392,6 @@ struct amd64_pvt {
390 392
391 int mc_node_id; /* MC index of this MC node */ 393 int mc_node_id; /* MC index of this MC node */
392 int ext_model; /* extended model value of this node */ 394 int ext_model; /* extended model value of this node */
393
394 struct low_ops *ops; /* pointer to per PCI Device ID func table */
395
396 int channel_count; 395 int channel_count;
397 396
398 /* Raw registers */ 397 /* Raw registers */
@@ -458,9 +457,6 @@ struct amd64_pvt {
458 u32 nbctl_mcgctl_saved; /* When true, following 2 are valid */ 457 u32 nbctl_mcgctl_saved; /* When true, following 2 are valid */
459 u32 old_nbctl; 458 u32 old_nbctl;
460 459
461 /* MC Type Index value: socket F vs Family 10h */
462 u32 mc_type_index;
463
464 /* DCT per-family scrubrate setting */ 460 /* DCT per-family scrubrate setting */
465 u32 min_scrubrate; 461 u32 min_scrubrate;
466 462
@@ -527,13 +523,6 @@ struct amd64_family_type {
527 struct low_ops ops; 523 struct low_ops ops;
528}; 524};
529 525
530static struct amd64_family_type amd64_family_types[];
531
532static inline struct low_ops *family_ops(int index)
533{
534 return &amd64_family_types[index].ops;
535}
536
537static inline int amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset, 526static inline int amd64_read_pci_cfg_dword(struct pci_dev *pdev, int offset,
538 u32 *val, const char *func) 527 u32 *val, const char *func)
539{ 528{