Lines Matching refs:nfit_test
178 struct nfit_test { struct
199 int (*alloc)(struct nfit_test *t); argument
200 void (*setup)(struct nfit_test *t); argument
223 static struct nfit_test *to_nfit_test(struct device *dev) in to_nfit_test() argument
227 return container_of(pdev, struct nfit_test, pdev); in to_nfit_test()
230 static int nd_intel_test_get_fw_info(struct nfit_test *t, in nd_intel_test_get_fw_info()
256 static int nd_intel_test_start_update(struct nfit_test *t, in nd_intel_test_start_update()
286 static int nd_intel_test_send_data(struct nfit_test *t, in nd_intel_test_send_data()
337 static int nd_intel_test_finish_fw(struct nfit_test *t, in nd_intel_test_finish_fw()
388 static int nd_intel_test_finish_query(struct nfit_test *t, in nd_intel_test_finish_query()
566 static int nfit_test_cmd_ars_start(struct nfit_test *t, in nfit_test_cmd_ars_start()
612 static int nfit_test_cmd_clear_error(struct nfit_test *t, in nfit_test_cmd_clear_error()
816 struct nfit_test *t = container_of(work, typeof(*t), work); in uc_error_notify()
821 static int nfit_test_cmd_ars_error_inject(struct nfit_test *t, in nfit_test_cmd_ars_error_inject()
852 static int nfit_test_cmd_ars_inject_clear(struct nfit_test *t, in nfit_test_cmd_ars_inject_clear()
878 static int nfit_test_cmd_ars_inject_status(struct nfit_test *t, in nfit_test_cmd_ars_inject_status()
901 static int nd_intel_test_cmd_set_lss_status(struct nfit_test *t, in nd_intel_test_cmd_set_lss_status()
940 static int nd_intel_test_cmd_security_status(struct nfit_test *t, in nd_intel_test_cmd_security_status()
955 static int nd_intel_test_cmd_unlock_unit(struct nfit_test *t, in nd_intel_test_cmd_unlock_unit()
981 static int nd_intel_test_cmd_set_pass(struct nfit_test *t, in nd_intel_test_cmd_set_pass()
1006 static int nd_intel_test_cmd_freeze_lock(struct nfit_test *t, in nd_intel_test_cmd_freeze_lock()
1025 static int nd_intel_test_cmd_disable_pass(struct nfit_test *t, in nd_intel_test_cmd_disable_pass()
1049 static int nd_intel_test_cmd_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_secure_erase()
1080 static int nd_intel_test_cmd_overwrite(struct nfit_test *t, in nd_intel_test_cmd_overwrite()
1103 static int nd_intel_test_cmd_query_overwrite(struct nfit_test *t, in nd_intel_test_cmd_query_overwrite()
1126 static int nd_intel_test_cmd_master_set_pass(struct nfit_test *t, in nd_intel_test_cmd_master_set_pass()
1153 static int nd_intel_test_cmd_master_secure_erase(struct nfit_test *t, in nd_intel_test_cmd_master_secure_erase()
1200 struct nfit_test *t = container_of(acpi_desc, typeof(*t), acpi_desc); in nfit_test_ctl()
1411 static struct nfit_test *instances[NUM_NFITS];
1428 static void *__test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma, in __test_alloc()
1464 static void *test_alloc(struct nfit_test *t, size_t size, dma_addr_t *dma) in test_alloc()
1485 struct nfit_test *t = instances[i]; in nfit_test_lookup()
1523 struct nfit_test *t = data; in put_dimms()
1642 static int nfit_test_dimm_init(struct nfit_test *t) in nfit_test_dimm_init()
1659 static void security_init(struct nfit_test *t) in security_init()
1670 static void smart_init(struct nfit_test *t) in smart_init()
1688 static int nfit_test0_alloc(struct nfit_test *t) in nfit_test0_alloc()
1752 static int nfit_test1_alloc(struct nfit_test *t) in nfit_test1_alloc()
1795 static void nfit_test0_setup(struct nfit_test *t) in nfit_test0_setup()
2536 static void nfit_test1_setup(struct nfit_test *t) in nfit_test1_setup()
2913 struct nfit_test *nfit_test; in nfit_test_probe() local
2924 nfit_test = to_nfit_test(&pdev->dev); in nfit_test_probe()
2927 if (nfit_test->num_dcr) { in nfit_test_probe()
2928 int num = nfit_test->num_dcr; in nfit_test_probe()
2930 nfit_test->dimm = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
2932 nfit_test->dimm_dma = devm_kcalloc(dev, num, sizeof(dma_addr_t), in nfit_test_probe()
2934 nfit_test->flush = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
2936 nfit_test->flush_dma = devm_kcalloc(dev, num, sizeof(dma_addr_t), in nfit_test_probe()
2938 nfit_test->label = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
2940 nfit_test->label_dma = devm_kcalloc(dev, num, in nfit_test_probe()
2942 nfit_test->dcr = devm_kcalloc(dev, num, in nfit_test_probe()
2944 nfit_test->dcr_dma = devm_kcalloc(dev, num, in nfit_test_probe()
2946 nfit_test->smart = devm_kcalloc(dev, num, in nfit_test_probe()
2948 nfit_test->smart_threshold = devm_kcalloc(dev, num, in nfit_test_probe()
2951 nfit_test->fw = devm_kcalloc(dev, num, in nfit_test_probe()
2953 if (nfit_test->dimm && nfit_test->dimm_dma && nfit_test->label in nfit_test_probe()
2954 && nfit_test->label_dma && nfit_test->dcr in nfit_test_probe()
2955 && nfit_test->dcr_dma && nfit_test->flush in nfit_test_probe()
2956 && nfit_test->flush_dma in nfit_test_probe()
2957 && nfit_test->fw) in nfit_test_probe()
2963 if (nfit_test->num_pm) { in nfit_test_probe()
2964 int num = nfit_test->num_pm; in nfit_test_probe()
2966 nfit_test->spa_set = devm_kcalloc(dev, num, sizeof(void *), in nfit_test_probe()
2968 nfit_test->spa_set_dma = devm_kcalloc(dev, num, in nfit_test_probe()
2970 if (nfit_test->spa_set && nfit_test->spa_set_dma) in nfit_test_probe()
2977 if (nfit_test->alloc(nfit_test)) in nfit_test_probe()
2980 nfit_test->setup(nfit_test); in nfit_test_probe()
2981 acpi_desc = &nfit_test->acpi_desc; in nfit_test_probe()
2989 rc = acpi_nfit_init(acpi_desc, nfit_test->nfit_buf, in nfit_test_probe()
2990 nfit_test->nfit_filled); in nfit_test_probe()
2998 if (nfit_test->setup != nfit_test0_setup) in nfit_test_probe()
3001 nfit_test->setup_hotplug = 1; in nfit_test_probe()
3002 nfit_test->setup(nfit_test); in nfit_test_probe()
3008 obj->buffer.length = nfit_test->nfit_size; in nfit_test_probe()
3009 obj->buffer.pointer = nfit_test->nfit_buf; in nfit_test_probe()
3010 *(nfit_test->_fit) = obj; in nfit_test_probe()
3011 __acpi_nfit_notify(&pdev->dev, nfit_test, 0x80); in nfit_test_probe()
3021 dev_set_drvdata(nfit_test->dimm_dev[i], in nfit_test_probe()
3036 struct nfit_test *nfit_test = to_nfit_test(dev); in nfit_test_release() local
3038 kfree(nfit_test); in nfit_test_release()
3193 struct nfit_test *nfit_test; in nfit_test_init() local
3196 nfit_test = kzalloc(sizeof(*nfit_test), GFP_KERNEL); in nfit_test_init()
3197 if (!nfit_test) { in nfit_test_init()
3201 INIT_LIST_HEAD(&nfit_test->resources); in nfit_test_init()
3202 badrange_init(&nfit_test->badrange); in nfit_test_init()
3205 nfit_test->num_pm = NUM_PM; in nfit_test_init()
3206 nfit_test->dcr_idx = 0; in nfit_test_init()
3207 nfit_test->num_dcr = NUM_DCR; in nfit_test_init()
3208 nfit_test->alloc = nfit_test0_alloc; in nfit_test_init()
3209 nfit_test->setup = nfit_test0_setup; in nfit_test_init()
3212 nfit_test->num_pm = 2; in nfit_test_init()
3213 nfit_test->dcr_idx = NUM_DCR; in nfit_test_init()
3214 nfit_test->num_dcr = 2; in nfit_test_init()
3215 nfit_test->alloc = nfit_test1_alloc; in nfit_test_init()
3216 nfit_test->setup = nfit_test1_setup; in nfit_test_init()
3222 pdev = &nfit_test->pdev; in nfit_test_init()
3237 instances[i] = nfit_test; in nfit_test_init()
3238 INIT_WORK(&nfit_test->work, uc_error_notify); in nfit_test_init()