Lines Matching refs:inject
235 struct i7core_inject inject;
726 Also, since a change at an inject parameter will be applied only at enable,
734 pvt->inject.enable = 0;
736 if (!pvt->pci_ch[pvt->inject.channel][0])
739 pci_write_config_dword(pvt->pci_ch[pvt->inject.channel][0],
746 * i7core inject inject.section
748 * accept and store error injection inject.section value
759 if (pvt->inject.enable)
766 pvt->inject.section = (u32) value;
774 return sprintf(data, "0x%08x\n", pvt->inject.section);
778 * i7core inject.type
780 * accept and store error injection inject.section value
782 * bit 1 - inject ECC error
783 * bit 2 - inject parity error
792 if (pvt->inject.enable)
799 pvt->inject.type = (u32) value;
807 return sprintf(data, "0x%08x\n", pvt->inject.type);
813 * The type of error (UE/CE) will depend on the inject.eccmask value:
827 if (pvt->inject.enable)
834 pvt->inject.eccmask = (u32) value;
842 return sprintf(data, "0x%08x\n", pvt->inject.eccmask);
848 * The type of error (UE/CE) will depend on the inject.eccmask value:
868 if (pvt->inject.enable) \
879 pvt->inject.param = value; \
892 if (pvt->inject.param < 0) \
895 return sprintf(data, "%d\n", pvt->inject.param);\
951 if (!pvt->pci_ch[pvt->inject.channel][0])
959 pvt->inject.enable = 1;
965 /* Sets pvt->inject.dimm mask */
966 if (pvt->inject.dimm < 0)
969 if (pvt->channel[pvt->inject.channel].dimms > 2)
970 mask |= (pvt->inject.dimm & 0x3LL) << 35;
972 mask |= (pvt->inject.dimm & 0x1LL) << 36;
975 /* Sets pvt->inject.rank mask */
976 if (pvt->inject.rank < 0)
979 if (pvt->channel[pvt->inject.channel].dimms > 2)
980 mask |= (pvt->inject.rank & 0x1LL) << 34;
982 mask |= (pvt->inject.rank & 0x3LL) << 34;
985 /* Sets pvt->inject.bank mask */
986 if (pvt->inject.bank < 0)
989 mask |= (pvt->inject.bank & 0x15LL) << 30;
991 /* Sets pvt->inject.page mask */
992 if (pvt->inject.page < 0)
995 mask |= (pvt->inject.page & 0xffff) << 14;
997 /* Sets pvt->inject.column mask */
998 if (pvt->inject.col < 0)
1001 mask |= (pvt->inject.col & 0x3fff);
1010 injectmask = (pvt->inject.type & 1) |
1011 (pvt->inject.section & 0x3) << 1 |
1012 (pvt->inject.type & 0x6) << (3 - 1);
1018 write_and_test(pvt->pci_ch[pvt->inject.channel][0],
1020 write_and_test(pvt->pci_ch[pvt->inject.channel][0],
1023 write_and_test(pvt->pci_ch[pvt->inject.channel][0],
1024 MC_CHANNEL_ERROR_MASK, pvt->inject.eccmask);
1026 write_and_test(pvt->pci_ch[pvt->inject.channel][0],
1037 debugf0("Error inject addr match 0x%016llx, ecc 0x%08x,"
1038 " inject 0x%08x\n",
1039 mask, pvt->inject.eccmask, injectmask);
1051 if (!pvt->pci_ch[pvt->inject.channel][0])
1054 pci_read_config_dword(pvt->pci_ch[pvt->inject.channel][0],
1060 pvt->inject.enable = 1;
1062 return sprintf(data, "%d\n", pvt->inject.enable);
1885 pvt->inject.channel = 0;
1886 pvt->inject.dimm = -1;
1887 pvt->inject.rank = -1;
1888 pvt->inject.bank = -1;
1889 pvt->inject.page = -1;
1890 pvt->inject.col = -1;