Lines Matching refs:pvt

439 	struct i5400_pvt *pvt;  in i5400_get_error_info()  local
442 pvt = mci->pvt_info; in i5400_get_error_info()
445 pci_read_config_dword(pvt->branchmap_werrors, FERR_FAT_FBD, &value); in i5400_get_error_info()
458 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
460 pci_read_config_word(pvt->branchmap_werrors, in i5400_get_error_info()
462 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
466 pci_write_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
476 pci_read_config_dword(pvt->branchmap_werrors, FERR_NF_FBD, &value); in i5400_get_error_info()
484 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
486 pci_read_config_word(pvt->branchmap_werrors, in i5400_get_error_info()
488 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
490 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
494 pci_write_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
701 struct i5400_pvt *pvt; in i5400_put_devices() local
703 pvt = mci->pvt_info; in i5400_put_devices()
706 pci_dev_put(pvt->branch_1); in i5400_put_devices()
707 pci_dev_put(pvt->branch_0); in i5400_put_devices()
708 pci_dev_put(pvt->fsb_error_regs); in i5400_put_devices()
709 pci_dev_put(pvt->branchmap_werrors); in i5400_put_devices()
720 struct i5400_pvt *pvt; in i5400_get_devices() local
723 pvt = mci->pvt_info; in i5400_get_devices()
724 pvt->branchmap_werrors = NULL; in i5400_get_devices()
725 pvt->fsb_error_regs = NULL; in i5400_get_devices()
726 pvt->branch_0 = NULL; in i5400_get_devices()
727 pvt->branch_1 = NULL; in i5400_get_devices()
750 pvt->branchmap_werrors = pdev; in i5400_get_devices()
766 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
774 pvt->fsb_error_regs = pdev; in i5400_get_devices()
777 pci_name(pvt->system_address), in i5400_get_devices()
778 pvt->system_address->vendor, pvt->system_address->device); in i5400_get_devices()
780 pci_name(pvt->branchmap_werrors), in i5400_get_devices()
781 pvt->branchmap_werrors->vendor, in i5400_get_devices()
782 pvt->branchmap_werrors->device); in i5400_get_devices()
784 pci_name(pvt->fsb_error_regs), in i5400_get_devices()
785 pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); in i5400_get_devices()
787 pvt->branch_0 = pci_get_device(PCI_VENDOR_ID_INTEL, in i5400_get_devices()
789 if (!pvt->branch_0) { in i5400_get_devices()
795 pci_dev_put(pvt->fsb_error_regs); in i5400_get_devices()
796 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
803 if (pvt->maxch < CHANNELS_PER_BRANCH) in i5400_get_devices()
806 pvt->branch_1 = pci_get_device(PCI_VENDOR_ID_INTEL, in i5400_get_devices()
808 if (!pvt->branch_1) { in i5400_get_devices()
816 pci_dev_put(pvt->branch_0); in i5400_get_devices()
817 pci_dev_put(pvt->fsb_error_regs); in i5400_get_devices()
818 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
838 static int determine_amb_present_reg(struct i5400_pvt *pvt, int channel) in determine_amb_present_reg() argument
844 amb_present = pvt->b0_ambpresent1; in determine_amb_present_reg()
846 amb_present = pvt->b0_ambpresent0; in determine_amb_present_reg()
849 amb_present = pvt->b1_ambpresent1; in determine_amb_present_reg()
851 amb_present = pvt->b1_ambpresent0; in determine_amb_present_reg()
862 static int determine_mtr(struct i5400_pvt *pvt, int dimm, int channel) in determine_mtr() argument
879 mtr = pvt->b0_mtr[n]; in determine_mtr()
881 mtr = pvt->b1_mtr[n]; in determine_mtr()
919 static void handle_channel(struct i5400_pvt *pvt, int dimm, int channel, in handle_channel() argument
926 mtr = determine_mtr(pvt, dimm, channel); in handle_channel()
928 amb_present_reg = determine_amb_present_reg(pvt, channel); in handle_channel()
957 static void calculate_dimm_size(struct i5400_pvt *pvt) in calculate_dimm_size() argument
979 max_dimms = pvt->maxdimmperch; in calculate_dimm_size()
997 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
998 dinfo = &pvt->dimm_info[dimm][channel]; in calculate_dimm_size()
999 handle_channel(pvt, dimm, channel, dinfo); in calculate_dimm_size()
1022 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
1054 struct i5400_pvt *pvt; in i5400_get_mc_regs() local
1060 pvt = mci->pvt_info; in i5400_get_mc_regs()
1062 pci_read_config_dword(pvt->system_address, AMBASE, in i5400_get_mc_regs()
1063 &pvt->u.ambase_bottom); in i5400_get_mc_regs()
1064 pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32), in i5400_get_mc_regs()
1065 &pvt->u.ambase_top); in i5400_get_mc_regs()
1068 (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); in i5400_get_mc_regs()
1071 pci_read_config_word(pvt->branchmap_werrors, TOLM, &pvt->tolm); in i5400_get_mc_regs()
1072 pvt->tolm >>= 12; in i5400_get_mc_regs()
1074 pvt->tolm, pvt->tolm); in i5400_get_mc_regs()
1076 actual_tolm = (u32) ((1000l * pvt->tolm) >> (30 - 28)); in i5400_get_mc_regs()
1078 actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); in i5400_get_mc_regs()
1080 pci_read_config_word(pvt->branchmap_werrors, MIR0, &pvt->mir0); in i5400_get_mc_regs()
1081 pci_read_config_word(pvt->branchmap_werrors, MIR1, &pvt->mir1); in i5400_get_mc_regs()
1084 limit = (pvt->mir0 >> 4) & 0x0fff; in i5400_get_mc_regs()
1085 way0 = pvt->mir0 & 0x1; in i5400_get_mc_regs()
1086 way1 = pvt->mir0 & 0x2; in i5400_get_mc_regs()
1089 limit = (pvt->mir1 >> 4) & 0xfff; in i5400_get_mc_regs()
1090 way0 = pvt->mir1 & 0x1; in i5400_get_mc_regs()
1091 way1 = pvt->mir1 & 0x2; in i5400_get_mc_regs()
1100 pci_read_config_word(pvt->branch_0, where, in i5400_get_mc_regs()
1101 &pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1104 slot_row, where, pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1106 if (pvt->maxch < CHANNELS_PER_BRANCH) { in i5400_get_mc_regs()
1107 pvt->b1_mtr[slot_row] = 0; in i5400_get_mc_regs()
1112 pci_read_config_word(pvt->branch_1, where, in i5400_get_mc_regs()
1113 &pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1115 slot_row, where, pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1122 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1124 pci_read_config_word(pvt->branch_0, AMBPRESENT_0, in i5400_get_mc_regs()
1125 &pvt->b0_ambpresent0); in i5400_get_mc_regs()
1126 edac_dbg(2, "\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); in i5400_get_mc_regs()
1127 pci_read_config_word(pvt->branch_0, AMBPRESENT_1, in i5400_get_mc_regs()
1128 &pvt->b0_ambpresent1); in i5400_get_mc_regs()
1129 edac_dbg(2, "\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); in i5400_get_mc_regs()
1132 if (pvt->maxch < CHANNELS_PER_BRANCH) { in i5400_get_mc_regs()
1133 pvt->b1_ambpresent0 = 0; in i5400_get_mc_regs()
1134 pvt->b1_ambpresent1 = 0; in i5400_get_mc_regs()
1139 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1141 pci_read_config_word(pvt->branch_1, AMBPRESENT_0, in i5400_get_mc_regs()
1142 &pvt->b1_ambpresent0); in i5400_get_mc_regs()
1144 pvt->b1_ambpresent0); in i5400_get_mc_regs()
1145 pci_read_config_word(pvt->branch_1, AMBPRESENT_1, in i5400_get_mc_regs()
1146 &pvt->b1_ambpresent1); in i5400_get_mc_regs()
1148 pvt->b1_ambpresent1); in i5400_get_mc_regs()
1153 calculate_dimm_size(pvt); in i5400_get_mc_regs()
1167 struct i5400_pvt *pvt; in i5400_init_dimms() local
1174 pvt = mci->pvt_info; in i5400_init_dimms()
1185 mtr = determine_mtr(pvt, slot, channel); in i5400_init_dimms()
1193 size_mb = pvt->dimm_info[slot][channel].megabytes; in i5400_init_dimms()
1230 struct i5400_pvt *pvt; in i5400_enable_error_reporting() local
1233 pvt = mci->pvt_info; in i5400_enable_error_reporting()
1236 pci_read_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5400_enable_error_reporting()
1242 pci_write_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5400_enable_error_reporting()
1256 struct i5400_pvt *pvt; in i5400_probe1() local
1284 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); in i5400_probe1()
1292 pvt = mci->pvt_info; in i5400_probe1()
1293 pvt->system_address = pdev; /* Record this device in our private */ in i5400_probe1()
1294 pvt->maxch = MAX_CHANNELS; in i5400_probe1()
1295 pvt->maxdimmperch = DIMMS_PER_CHANNEL; in i5400_probe1()