Lines Matching refs:new_drvdata

309 	struct cc_drvdata *new_drvdata;  in init_cc_resources()  local
319 new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL); in init_cc_resources()
320 if (!new_drvdata) in init_cc_resources()
324 new_drvdata->hw_rev_name = hw_rev->name; in init_cc_resources()
325 new_drvdata->hw_rev = hw_rev->rev; in init_cc_resources()
326 new_drvdata->std_bodies = hw_rev->std_bodies; in init_cc_resources()
329 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP); in init_cc_resources()
330 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_712); in init_cc_resources()
331 new_drvdata->ver_offset = CC_REG(HOST_VERSION_712); in init_cc_resources()
333 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP8); in init_cc_resources()
334 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_630); in init_cc_resources()
335 new_drvdata->ver_offset = CC_REG(HOST_VERSION_630); in init_cc_resources()
338 new_drvdata->comp_mask = CC_COMP_IRQ_MASK; in init_cc_resources()
340 platform_set_drvdata(plat_dev, new_drvdata); in init_cc_resources()
341 new_drvdata->plat_dev = plat_dev; in init_cc_resources()
346 new_drvdata->clk = clk; in init_cc_resources()
348 new_drvdata->coherent = of_dma_is_coherent(np); in init_cc_resources()
353 new_drvdata->cc_base = devm_platform_get_and_ioremap_resource(plat_dev, in init_cc_resources()
355 if (IS_ERR(new_drvdata->cc_base)) in init_cc_resources()
356 return PTR_ERR(new_drvdata->cc_base); in init_cc_resources()
361 &req_mem_cc_regs->start, new_drvdata->cc_base); in init_cc_resources()
368 init_completion(&new_drvdata->hw_queue_avail); in init_cc_resources()
381 rc = clk_prepare_enable(new_drvdata->clk); in init_cc_resources()
387 new_drvdata->sec_disabled = cc_sec_disable; in init_cc_resources()
400 if (!cc_wait_for_reset_completion(new_drvdata)) { in init_cc_resources()
406 val = cc_ioread(new_drvdata, new_drvdata->sig_offset); in init_cc_resources()
414 hw_rev_pidr = cc_ioread(new_drvdata, new_drvdata->ver_offset); in init_cc_resources()
417 val = cc_read_idr(new_drvdata, pidr_0124_offsets); in init_cc_resources()
426 val = cc_read_idr(new_drvdata, cidr_0123_offsets); in init_cc_resources()
436 val = cc_ioread(new_drvdata, CC_REG(HOST_REMOVE_INPUT_PINS)); in init_cc_resources()
442 if (new_drvdata->std_bodies & CC_STD_NIST) { in init_cc_resources()
444 new_drvdata->std_bodies = CC_STD_OSCCA; in init_cc_resources()
454 val = cc_ioread(new_drvdata, CC_REG(SECURITY_DISABLED)); in init_cc_resources()
456 new_drvdata->sec_disabled |= !!val; in init_cc_resources()
458 if (!new_drvdata->sec_disabled) { in init_cc_resources()
459 new_drvdata->comp_mask |= CC_CPP_SM4_ABORT_MASK; in init_cc_resources()
460 if (new_drvdata->std_bodies & CC_STD_NIST) in init_cc_resources()
461 new_drvdata->comp_mask |= CC_CPP_AES_ABORT_MASK; in init_cc_resources()
465 if (new_drvdata->sec_disabled) in init_cc_resources()
473 new_drvdata); in init_cc_resources()
480 init_cc_cache_params(new_drvdata); in init_cc_resources()
482 rc = init_cc_regs(new_drvdata); in init_cc_resources()
488 rc = cc_debugfs_init(new_drvdata); in init_cc_resources()
494 rc = cc_fips_init(new_drvdata); in init_cc_resources()
499 rc = cc_sram_mgr_init(new_drvdata); in init_cc_resources()
505 new_drvdata->mlli_sram_addr = in init_cc_resources()
506 cc_sram_alloc(new_drvdata, MAX_MLLI_BUFF_SIZE); in init_cc_resources()
507 if (new_drvdata->mlli_sram_addr == NULL_SRAM_ADDR) { in init_cc_resources()
512 rc = cc_req_mgr_init(new_drvdata); in init_cc_resources()
518 rc = cc_buffer_mgr_init(new_drvdata); in init_cc_resources()
527 rc = cc_hash_alloc(new_drvdata); in init_cc_resources()
534 rc = cc_cipher_alloc(new_drvdata); in init_cc_resources()
540 rc = cc_aead_alloc(new_drvdata); in init_cc_resources()
550 cc_set_ree_fips_status(new_drvdata, true); in init_cc_resources()
556 cc_cipher_free(new_drvdata); in init_cc_resources()
558 cc_hash_free(new_drvdata); in init_cc_resources()
560 cc_buffer_mgr_fini(new_drvdata); in init_cc_resources()
562 cc_req_mgr_fini(new_drvdata); in init_cc_resources()
564 cc_fips_fini(new_drvdata); in init_cc_resources()
566 cc_debugfs_fini(new_drvdata); in init_cc_resources()
568 fini_cc_regs(new_drvdata); in init_cc_resources()
573 clk_disable_unprepare(new_drvdata->clk); in init_cc_resources()