Lines Matching refs:nfit_test
179 struct nfit_test { struct
200 int (*alloc)(struct nfit_test *t); argument
201 void (*setup)(struct nfit_test *t); argument
224 static struct nfit_test *to_nfit_test(struct device *dev) in to_nfit_test() argument
228 return container_of(pdev, struct nfit_test, pdev); in to_nfit_test()
231 static int nd_intel_test_get_fw_info(struct nfit_test *t, in nd_intel_test_get_fw_info()
257 static int nd_intel_test_start_update(struct nfit_test *t, in nd_intel_test_start_update()
287 static int nd_intel_test_send_data(struct nfit_test *t, in nd_intel_test_send_data()
338 static int nd_intel_test_finish_fw(struct nfit_test *t, in nd_intel_test_finish_fw()
389 static int nd_intel_test_finish_query(struct nfit_test *t, in nd_intel_test_finish_query()
568 static int nfit_test_cmd_ars_start(struct nfit_test *t, in nfit_test_cmd_ars_start()
614 static int nfit_test_cmd_clear_error(struct nfit_test *t, in nfit_test_cmd_clear_error()
818 struct nfit_test *t = container_of(work, typeof(*t), work); in uc_error_notify()
823 static int nfit_test_cmd_ars_error_inject(struct nfit_test *t, in nfit_test_cmd_ars_error_inject()
854 static int nfit_test_cmd_ars_inject_clear(struct nfit_test *t, in nfit_test_cmd_ars_inject_clear()
880 static int nfit_test_cmd_ars_inject_status(struct nfit_test *t, in nfit_test_cmd_ars_inject_status()
903 static int nd_intel_test_cmd_set_lss_status(struct nfit_test *t, in nd_intel_test_cmd_set_lss_status()
942 static int nd_intel_test_cmd_security_status(struct nfit_test *t, in nd_intel_test_cmd_security_status()
957 static int nd_intel_test_cmd_unlock_unit(struct nfit_test *t, in nd_intel_test_cmd_unlock_unit()
983 static int nd_intel_test_cmd_set_pass(struct nfit_test *t, in nd_intel_test_cmd_set_pass()
1008 static int nd_intel_test_cmd_freeze_lock(struct nfit_test *t, in nd_intel_test_cmd_freeze_lock()
1027 static int nd_intel_test_cmd_disable_pass(struct nfit_test *t, in nd_intel_test_cmd_disable_pass()
1051 static int nd_intel_test_cmd_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_secure_erase()
1082 static int nd_intel_test_cmd_overwrite(struct nfit_test *t, in nd_intel_test_cmd_overwrite()
1105 static int nd_intel_test_cmd_query_overwrite(struct nfit_test *t, in nd_intel_test_cmd_query_overwrite()
1128 static int nd_intel_test_cmd_master_set_pass(struct nfit_test *t, in nd_intel_test_cmd_master_set_pass()
1155 static int nd_intel_test_cmd_master_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_master_secure_erase()
1185 static int nvdimm_bus_intel_fw_activate_businfo(struct nfit_test *t, in nvdimm_bus_intel_fw_activate_businfo()
1227 static int nvdimm_bus_intel_fw_activate(struct nfit_test *t, in nvdimm_bus_intel_fw_activate()
1265 static int nd_intel_test_cmd_fw_activate_dimminfo(struct nfit_test *t, in nd_intel_test_cmd_fw_activate_dimminfo()
1301 static int nd_intel_test_cmd_fw_activate_arm(struct nfit_test *t, in nd_intel_test_cmd_fw_activate_arm()
1329 struct nfit_test *t = container_of(acpi_desc, typeof(*t), acpi_desc); in nfit_ctl_dbg()
1353 struct nfit_test *t = container_of(acpi_desc, typeof(*t), acpi_desc); in nfit_test_ctl()
1595 static struct nfit_test *instances[NUM_NFITS];
1612 static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma, in __test_alloc()
1648 static void *test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma) in test_alloc()
1669 struct nfit_test *t = instances[i]; in nfit_test_lookup()
1707 struct nfit_test *t = data; in put_dimms()
1826 static int nfit_test_dimm_init(struct nfit_test *t) in nfit_test_dimm_init()
1843 static void nfit_security_init(struct nfit_test *t) in nfit_security_init()
1854 static void smart_init(struct nfit_test *t) in smart_init()
1878 static int nfit_test0_alloc(struct nfit_test *t) in nfit_test0_alloc()
1943 static int nfit_test1_alloc(struct nfit_test *t) in nfit_test1_alloc()
1987 static void nfit_test0_setup(struct nfit_test *t) in nfit_test0_setup()
2735 static void nfit_test1_setup(struct nfit_test *t) in nfit_test1_setup()
3128 struct nfit_test *nfit_test; in nfit_test_probe() local
3139 nfit_test = to_nfit_test(&pdev->dev); in nfit_test_probe()
3142 if (nfit_test->num_dcr) { in nfit_test_probe()
3143 int num = nfit_test->num_dcr; in nfit_test_probe()
3145 nfit_test->dimm = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
3147 nfit_test->dimm_dma = devm_kcalloc(dev, num, sizeof(dma_addr_t), in nfit_test_probe()
3149 nfit_test->flush = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
3151 nfit_test->flush_dma = devm_kcalloc(dev, num, sizeof(dma_addr_t), in nfit_test_probe()
3153 nfit_test->label = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
3155 nfit_test->label_dma = devm_kcalloc(dev, num, in nfit_test_probe()
3157 nfit_test->dcr = devm_kcalloc(dev, num, in nfit_test_probe()
3159 nfit_test->dcr_dma = devm_kcalloc(dev, num, in nfit_test_probe()
3161 nfit_test->smart = devm_kcalloc(dev, num, in nfit_test_probe()
3163 nfit_test->smart_threshold = devm_kcalloc(dev, num, in nfit_test_probe()
3166 nfit_test->fw = devm_kcalloc(dev, num, in nfit_test_probe()
3168 if (nfit_test->dimm && nfit_test->dimm_dma && nfit_test->label in nfit_test_probe()
3169 && nfit_test->label_dma && nfit_test->dcr in nfit_test_probe()
3170 && nfit_test->dcr_dma && nfit_test->flush in nfit_test_probe()
3171 && nfit_test->flush_dma in nfit_test_probe()
3172 && nfit_test->fw) in nfit_test_probe()
3178 if (nfit_test->num_pm) { in nfit_test_probe()
3179 int num = nfit_test->num_pm; in nfit_test_probe()
3181 nfit_test->spa_set = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
3183 nfit_test->spa_set_dma = devm_kcalloc(dev, num, in nfit_test_probe()
3185 if (nfit_test->spa_set && nfit_test->spa_set_dma) in nfit_test_probe()
3192 if (nfit_test->alloc(nfit_test)) in nfit_test_probe()
3195 nfit_test->setup(nfit_test); in nfit_test_probe()
3196 acpi_desc = &nfit_test->acpi_desc; in nfit_test_probe()
3203 rc = acpi_nfit_init(acpi_desc, nfit_test->nfit_buf, in nfit_test_probe()
3204 nfit_test->nfit_filled); in nfit_test_probe()
3212 if (nfit_test->setup != nfit_test0_setup) in nfit_test_probe()
3215 nfit_test->setup_hotplug = 1; in nfit_test_probe()
3216 nfit_test->setup(nfit_test); in nfit_test_probe()
3222 obj->buffer.length = nfit_test->nfit_size; in nfit_test_probe()
3223 obj->buffer.pointer = nfit_test->nfit_buf; in nfit_test_probe()
3224 *(nfit_test->_fit) = obj; in nfit_test_probe()
3225 __acpi_nfit_notify(&pdev->dev, nfit_test, 0x80); in nfit_test_probe()
3235 dev_set_drvdata(nfit_test->dimm_dev[i], in nfit_test_probe()
3250 struct nfit_test *nfit_test = to_nfit_test(dev); in nfit_test_release() local
3252 kfree(nfit_test); in nfit_test_release()
3303 struct nfit_test *nfit_test; in nfit_test_init() local
3306 nfit_test = kzalloc(sizeof(*nfit_test), GFP_KERNEL); in nfit_test_init()
3307 if (!nfit_test) { in nfit_test_init()
3311 INIT_LIST_HEAD(&nfit_test->resources); in nfit_test_init()
3312 badrange_init(&nfit_test->badrange); in nfit_test_init()
3315 nfit_test->num_pm = NUM_PM; in nfit_test_init()
3316 nfit_test->dcr_idx = 0; in nfit_test_init()
3317 nfit_test->num_dcr = NUM_DCR; in nfit_test_init()
3318 nfit_test->alloc = nfit_test0_alloc; in nfit_test_init()
3319 nfit_test->setup = nfit_test0_setup; in nfit_test_init()
3322 nfit_test->num_pm = 2; in nfit_test_init()
3323 nfit_test->dcr_idx = NUM_DCR; in nfit_test_init()
3324 nfit_test->num_dcr = 2; in nfit_test_init()
3325 nfit_test->alloc = nfit_test1_alloc; in nfit_test_init()
3326 nfit_test->setup = nfit_test1_setup; in nfit_test_init()
3332 pdev = &nfit_test->pdev; in nfit_test_init()
3347 instances[i] = nfit_test; in nfit_test_init()
3348 INIT_WORK(&nfit_test->work, uc_error_notify); in nfit_test_init()