Lines Matching refs:pvt
388 struct i5000_pvt *pvt; in i5000_get_error_info() local
391 pvt = mci->pvt_info; in i5000_get_error_info()
394 pci_read_config_dword(pvt->branchmap_werrors, FERR_FAT_FBD, &value); in i5000_get_error_info()
406 pci_read_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
408 pci_read_config_word(pvt->branchmap_werrors, in i5000_get_error_info()
410 pci_read_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
414 pci_write_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
424 pci_read_config_dword(pvt->branchmap_werrors, FERR_NF_FBD, &value); in i5000_get_error_info()
432 pci_read_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
434 pci_read_config_word(pvt->branchmap_werrors, in i5000_get_error_info()
436 pci_read_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
438 pci_read_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
442 pci_write_config_dword(pvt->branchmap_werrors, in i5000_get_error_info()
782 struct i5000_pvt *pvt; in i5000_get_devices() local
785 pvt = mci->pvt_info; in i5000_get_devices()
811 pvt->branchmap_werrors = pdev; in i5000_get_devices()
828 pci_dev_put(pvt->branchmap_werrors); in i5000_get_devices()
837 pvt->fsb_error_regs = pdev; in i5000_get_devices()
840 pci_name(pvt->system_address), in i5000_get_devices()
841 pvt->system_address->vendor, pvt->system_address->device); in i5000_get_devices()
843 pci_name(pvt->branchmap_werrors), in i5000_get_devices()
844 pvt->branchmap_werrors->vendor, in i5000_get_devices()
845 pvt->branchmap_werrors->device); in i5000_get_devices()
847 pci_name(pvt->fsb_error_regs), in i5000_get_devices()
848 pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); in i5000_get_devices()
860 pci_dev_put(pvt->branchmap_werrors); in i5000_get_devices()
861 pci_dev_put(pvt->fsb_error_regs); in i5000_get_devices()
865 pvt->branch_0 = pdev; in i5000_get_devices()
870 if (pvt->maxch >= CHANNELS_PER_BRANCH) { in i5000_get_devices()
883 pci_dev_put(pvt->branchmap_werrors); in i5000_get_devices()
884 pci_dev_put(pvt->fsb_error_regs); in i5000_get_devices()
885 pci_dev_put(pvt->branch_0); in i5000_get_devices()
889 pvt->branch_1 = pdev; in i5000_get_devices()
901 struct i5000_pvt *pvt; in i5000_put_devices() local
903 pvt = mci->pvt_info; in i5000_put_devices()
905 pci_dev_put(pvt->branchmap_werrors); /* FUNC 1 */ in i5000_put_devices()
906 pci_dev_put(pvt->fsb_error_regs); /* FUNC 2 */ in i5000_put_devices()
907 pci_dev_put(pvt->branch_0); /* DEV 21 */ in i5000_put_devices()
910 if (pvt->maxch >= CHANNELS_PER_BRANCH) in i5000_put_devices()
911 pci_dev_put(pvt->branch_1); /* DEV 22 */ in i5000_put_devices()
927 static int determine_amb_present_reg(struct i5000_pvt *pvt, int channel) in determine_amb_present_reg() argument
933 amb_present = pvt->b0_ambpresent1; in determine_amb_present_reg()
935 amb_present = pvt->b0_ambpresent0; in determine_amb_present_reg()
938 amb_present = pvt->b1_ambpresent1; in determine_amb_present_reg()
940 amb_present = pvt->b1_ambpresent0; in determine_amb_present_reg()
951 static int determine_mtr(struct i5000_pvt *pvt, int slot, int channel) in determine_mtr() argument
956 mtr = pvt->b0_mtr[slot]; in determine_mtr()
958 mtr = pvt->b1_mtr[slot]; in determine_mtr()
992 static void handle_channel(struct i5000_pvt *pvt, int slot, int channel, in handle_channel() argument
999 mtr = determine_mtr(pvt, slot, channel); in handle_channel()
1001 amb_present_reg = determine_amb_present_reg(pvt, channel); in handle_channel()
1034 static void calculate_dimm_size(struct i5000_pvt *pvt) in calculate_dimm_size() argument
1055 for (slot = pvt->maxdimmperch - 1; slot >= 0; slot--) { in calculate_dimm_size()
1072 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
1073 dinfo = &pvt->dimm_info[slot][channel]; in calculate_dimm_size()
1074 handle_channel(pvt, slot, channel, dinfo); in calculate_dimm_size()
1103 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
1133 struct i5000_pvt *pvt; in i5000_get_mc_regs() local
1139 pvt = mci->pvt_info; in i5000_get_mc_regs()
1141 pci_read_config_dword(pvt->system_address, AMBASE, in i5000_get_mc_regs()
1142 &pvt->u.ambase_bottom); in i5000_get_mc_regs()
1143 pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32), in i5000_get_mc_regs()
1144 &pvt->u.ambase_top); in i5000_get_mc_regs()
1147 (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); in i5000_get_mc_regs()
1150 pci_read_config_word(pvt->branchmap_werrors, TOLM, &pvt->tolm); in i5000_get_mc_regs()
1151 pvt->tolm >>= 12; in i5000_get_mc_regs()
1153 pvt->tolm, pvt->tolm); in i5000_get_mc_regs()
1155 actual_tolm = pvt->tolm << 28; in i5000_get_mc_regs()
1159 pci_read_config_word(pvt->branchmap_werrors, MIR0, &pvt->mir0); in i5000_get_mc_regs()
1160 pci_read_config_word(pvt->branchmap_werrors, MIR1, &pvt->mir1); in i5000_get_mc_regs()
1161 pci_read_config_word(pvt->branchmap_werrors, MIR2, &pvt->mir2); in i5000_get_mc_regs()
1164 limit = (pvt->mir0 >> 4) & 0x0FFF; in i5000_get_mc_regs()
1165 way0 = pvt->mir0 & 0x1; in i5000_get_mc_regs()
1166 way1 = pvt->mir0 & 0x2; in i5000_get_mc_regs()
1169 limit = (pvt->mir1 >> 4) & 0x0FFF; in i5000_get_mc_regs()
1170 way0 = pvt->mir1 & 0x1; in i5000_get_mc_regs()
1171 way1 = pvt->mir1 & 0x2; in i5000_get_mc_regs()
1174 limit = (pvt->mir2 >> 4) & 0x0FFF; in i5000_get_mc_regs()
1175 way0 = pvt->mir2 & 0x1; in i5000_get_mc_regs()
1176 way1 = pvt->mir2 & 0x2; in i5000_get_mc_regs()
1184 pci_read_config_word(pvt->branch_0, where, in i5000_get_mc_regs()
1185 &pvt->b0_mtr[slot_row]); in i5000_get_mc_regs()
1188 slot_row, where, pvt->b0_mtr[slot_row]); in i5000_get_mc_regs()
1190 if (pvt->maxch >= CHANNELS_PER_BRANCH) { in i5000_get_mc_regs()
1191 pci_read_config_word(pvt->branch_1, where, in i5000_get_mc_regs()
1192 &pvt->b1_mtr[slot_row]); in i5000_get_mc_regs()
1194 slot_row, where, pvt->b1_mtr[slot_row]); in i5000_get_mc_regs()
1196 pvt->b1_mtr[slot_row] = 0; in i5000_get_mc_regs()
1204 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); in i5000_get_mc_regs()
1206 pci_read_config_word(pvt->branch_0, AMB_PRESENT_0, in i5000_get_mc_regs()
1207 &pvt->b0_ambpresent0); in i5000_get_mc_regs()
1208 edac_dbg(2, "\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); in i5000_get_mc_regs()
1209 pci_read_config_word(pvt->branch_0, AMB_PRESENT_1, in i5000_get_mc_regs()
1210 &pvt->b0_ambpresent1); in i5000_get_mc_regs()
1211 edac_dbg(2, "\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); in i5000_get_mc_regs()
1214 if (pvt->maxch < CHANNELS_PER_BRANCH) { in i5000_get_mc_regs()
1215 pvt->b1_ambpresent0 = 0; in i5000_get_mc_regs()
1216 pvt->b1_ambpresent1 = 0; in i5000_get_mc_regs()
1221 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); in i5000_get_mc_regs()
1223 pci_read_config_word(pvt->branch_1, AMB_PRESENT_0, in i5000_get_mc_regs()
1224 &pvt->b1_ambpresent0); in i5000_get_mc_regs()
1226 pvt->b1_ambpresent0); in i5000_get_mc_regs()
1227 pci_read_config_word(pvt->branch_1, AMB_PRESENT_1, in i5000_get_mc_regs()
1228 &pvt->b1_ambpresent1); in i5000_get_mc_regs()
1230 pvt->b1_ambpresent1); in i5000_get_mc_regs()
1235 calculate_dimm_size(pvt); in i5000_get_mc_regs()
1249 struct i5000_pvt *pvt; in i5000_init_csrows() local
1258 pvt = mci->pvt_info; in i5000_init_csrows()
1259 max_csrows = pvt->maxdimmperch * 2; in i5000_init_csrows()
1271 for (channel = 0; channel < pvt->maxch; channel++) { in i5000_init_csrows()
1273 mtr = determine_mtr(pvt, slot, channel); in i5000_init_csrows()
1281 csrow_megs = pvt->dimm_info[slot][channel].megabytes; in i5000_init_csrows()
1309 struct i5000_pvt *pvt; in i5000_enable_error_reporting() local
1312 pvt = mci->pvt_info; in i5000_enable_error_reporting()
1315 pci_read_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5000_enable_error_reporting()
1321 pci_write_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5000_enable_error_reporting()
1358 struct i5000_pvt *pvt; in i5000_probe1() local
1400 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); in i5000_probe1()
1408 pvt = mci->pvt_info; in i5000_probe1()
1409 pvt->system_address = pdev; /* Record this device in our private */ in i5000_probe1()
1410 pvt->maxch = num_channels; in i5000_probe1()
1411 pvt->maxdimmperch = num_dimms_per_channel; in i5000_probe1()