Lines Matching refs:pvt

438 	struct i5400_pvt *pvt;  in i5400_get_error_info()  local
441 pvt = mci->pvt_info; in i5400_get_error_info()
444 pci_read_config_dword(pvt->branchmap_werrors, FERR_FAT_FBD, &value); in i5400_get_error_info()
457 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
459 pci_read_config_word(pvt->branchmap_werrors, in i5400_get_error_info()
461 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
465 pci_write_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
475 pci_read_config_dword(pvt->branchmap_werrors, FERR_NF_FBD, &value); in i5400_get_error_info()
483 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
485 pci_read_config_word(pvt->branchmap_werrors, in i5400_get_error_info()
487 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
489 pci_read_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
493 pci_write_config_dword(pvt->branchmap_werrors, in i5400_get_error_info()
700 struct i5400_pvt *pvt; in i5400_put_devices() local
702 pvt = mci->pvt_info; in i5400_put_devices()
705 pci_dev_put(pvt->branch_1); in i5400_put_devices()
706 pci_dev_put(pvt->branch_0); in i5400_put_devices()
707 pci_dev_put(pvt->fsb_error_regs); in i5400_put_devices()
708 pci_dev_put(pvt->branchmap_werrors); in i5400_put_devices()
719 struct i5400_pvt *pvt; in i5400_get_devices() local
722 pvt = mci->pvt_info; in i5400_get_devices()
723 pvt->branchmap_werrors = NULL; in i5400_get_devices()
724 pvt->fsb_error_regs = NULL; in i5400_get_devices()
725 pvt->branch_0 = NULL; in i5400_get_devices()
726 pvt->branch_1 = NULL; in i5400_get_devices()
749 pvt->branchmap_werrors = pdev; in i5400_get_devices()
765 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
773 pvt->fsb_error_regs = pdev; in i5400_get_devices()
776 pci_name(pvt->system_address), in i5400_get_devices()
777 pvt->system_address->vendor, pvt->system_address->device); in i5400_get_devices()
779 pci_name(pvt->branchmap_werrors), in i5400_get_devices()
780 pvt->branchmap_werrors->vendor, in i5400_get_devices()
781 pvt->branchmap_werrors->device); in i5400_get_devices()
783 pci_name(pvt->fsb_error_regs), in i5400_get_devices()
784 pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); in i5400_get_devices()
786 pvt->branch_0 = pci_get_device(PCI_VENDOR_ID_INTEL, in i5400_get_devices()
788 if (!pvt->branch_0) { in i5400_get_devices()
794 pci_dev_put(pvt->fsb_error_regs); in i5400_get_devices()
795 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
802 if (pvt->maxch < CHANNELS_PER_BRANCH) in i5400_get_devices()
805 pvt->branch_1 = pci_get_device(PCI_VENDOR_ID_INTEL, in i5400_get_devices()
807 if (!pvt->branch_1) { in i5400_get_devices()
815 pci_dev_put(pvt->branch_0); in i5400_get_devices()
816 pci_dev_put(pvt->fsb_error_regs); in i5400_get_devices()
817 pci_dev_put(pvt->branchmap_werrors); in i5400_get_devices()
837 static int determine_amb_present_reg(struct i5400_pvt *pvt, int channel) in determine_amb_present_reg() argument
843 amb_present = pvt->b0_ambpresent1; in determine_amb_present_reg()
845 amb_present = pvt->b0_ambpresent0; in determine_amb_present_reg()
848 amb_present = pvt->b1_ambpresent1; in determine_amb_present_reg()
850 amb_present = pvt->b1_ambpresent0; in determine_amb_present_reg()
861 static int determine_mtr(struct i5400_pvt *pvt, int dimm, int channel) in determine_mtr() argument
878 mtr = pvt->b0_mtr[n]; in determine_mtr()
880 mtr = pvt->b1_mtr[n]; in determine_mtr()
918 static void handle_channel(struct i5400_pvt *pvt, int dimm, int channel, in handle_channel() argument
925 mtr = determine_mtr(pvt, dimm, channel); in handle_channel()
927 amb_present_reg = determine_amb_present_reg(pvt, channel); in handle_channel()
956 static void calculate_dimm_size(struct i5400_pvt *pvt) in calculate_dimm_size() argument
978 max_dimms = pvt->maxdimmperch; in calculate_dimm_size()
996 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
997 dinfo = &pvt->dimm_info[dimm][channel]; in calculate_dimm_size()
998 handle_channel(pvt, dimm, channel, dinfo); in calculate_dimm_size()
1021 for (channel = 0; channel < pvt->maxch; channel++) { in calculate_dimm_size()
1053 struct i5400_pvt *pvt; in i5400_get_mc_regs() local
1059 pvt = mci->pvt_info; in i5400_get_mc_regs()
1061 pci_read_config_dword(pvt->system_address, AMBASE, in i5400_get_mc_regs()
1062 &pvt->u.ambase_bottom); in i5400_get_mc_regs()
1063 pci_read_config_dword(pvt->system_address, AMBASE + sizeof(u32), in i5400_get_mc_regs()
1064 &pvt->u.ambase_top); in i5400_get_mc_regs()
1067 (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); in i5400_get_mc_regs()
1070 pci_read_config_word(pvt->branchmap_werrors, TOLM, &pvt->tolm); in i5400_get_mc_regs()
1071 pvt->tolm >>= 12; in i5400_get_mc_regs()
1073 pvt->tolm, pvt->tolm); in i5400_get_mc_regs()
1075 actual_tolm = (u32) ((1000l * pvt->tolm) >> (30 - 28)); in i5400_get_mc_regs()
1077 actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); in i5400_get_mc_regs()
1079 pci_read_config_word(pvt->branchmap_werrors, MIR0, &pvt->mir0); in i5400_get_mc_regs()
1080 pci_read_config_word(pvt->branchmap_werrors, MIR1, &pvt->mir1); in i5400_get_mc_regs()
1083 limit = (pvt->mir0 >> 4) & 0x0fff; in i5400_get_mc_regs()
1084 way0 = pvt->mir0 & 0x1; in i5400_get_mc_regs()
1085 way1 = pvt->mir0 & 0x2; in i5400_get_mc_regs()
1088 limit = (pvt->mir1 >> 4) & 0xfff; in i5400_get_mc_regs()
1089 way0 = pvt->mir1 & 0x1; in i5400_get_mc_regs()
1090 way1 = pvt->mir1 & 0x2; in i5400_get_mc_regs()
1099 pci_read_config_word(pvt->branch_0, where, in i5400_get_mc_regs()
1100 &pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1103 slot_row, where, pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1105 if (pvt->maxch < CHANNELS_PER_BRANCH) { in i5400_get_mc_regs()
1106 pvt->b1_mtr[slot_row] = 0; in i5400_get_mc_regs()
1111 pci_read_config_word(pvt->branch_1, where, in i5400_get_mc_regs()
1112 &pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1114 slot_row, where, pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1121 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); in i5400_get_mc_regs()
1123 pci_read_config_word(pvt->branch_0, AMBPRESENT_0, in i5400_get_mc_regs()
1124 &pvt->b0_ambpresent0); in i5400_get_mc_regs()
1125 edac_dbg(2, "\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); in i5400_get_mc_regs()
1126 pci_read_config_word(pvt->branch_0, AMBPRESENT_1, in i5400_get_mc_regs()
1127 &pvt->b0_ambpresent1); in i5400_get_mc_regs()
1128 edac_dbg(2, "\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); in i5400_get_mc_regs()
1131 if (pvt->maxch < CHANNELS_PER_BRANCH) { in i5400_get_mc_regs()
1132 pvt->b1_ambpresent0 = 0; in i5400_get_mc_regs()
1133 pvt->b1_ambpresent1 = 0; in i5400_get_mc_regs()
1138 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); in i5400_get_mc_regs()
1140 pci_read_config_word(pvt->branch_1, AMBPRESENT_0, in i5400_get_mc_regs()
1141 &pvt->b1_ambpresent0); in i5400_get_mc_regs()
1143 pvt->b1_ambpresent0); in i5400_get_mc_regs()
1144 pci_read_config_word(pvt->branch_1, AMBPRESENT_1, in i5400_get_mc_regs()
1145 &pvt->b1_ambpresent1); in i5400_get_mc_regs()
1147 pvt->b1_ambpresent1); in i5400_get_mc_regs()
1152 calculate_dimm_size(pvt); in i5400_get_mc_regs()
1166 struct i5400_pvt *pvt; in i5400_init_dimms() local
1173 pvt = mci->pvt_info; in i5400_init_dimms()
1184 mtr = determine_mtr(pvt, slot, channel); in i5400_init_dimms()
1192 size_mb = pvt->dimm_info[slot][channel].megabytes; in i5400_init_dimms()
1229 struct i5400_pvt *pvt; in i5400_enable_error_reporting() local
1232 pvt = mci->pvt_info; in i5400_enable_error_reporting()
1235 pci_read_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5400_enable_error_reporting()
1241 pci_write_config_dword(pvt->branchmap_werrors, EMASK_FBD, in i5400_enable_error_reporting()
1255 struct i5400_pvt *pvt; in i5400_probe1() local
1283 mci = edac_mc_alloc(0, ARRAY_SIZE(layers), layers, sizeof(*pvt)); in i5400_probe1()
1291 pvt = mci->pvt_info; in i5400_probe1()
1292 pvt->system_address = pdev; /* Record this device in our private */ in i5400_probe1()
1293 pvt->maxch = MAX_CHANNELS; in i5400_probe1()
1294 pvt->maxdimmperch = DIMMS_PER_CHANNEL; in i5400_probe1()