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()
354 new_drvdata->cc_base = devm_ioremap_resource(dev, req_mem_cc_regs); 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()
388 rc = clk_prepare_enable(new_drvdata->clk); in init_cc_resources()
394 new_drvdata->sec_disabled = cc_sec_disable; in init_cc_resources()
407 if (!cc_wait_for_reset_completion(new_drvdata)) { in init_cc_resources()
413 val = cc_ioread(new_drvdata, new_drvdata->sig_offset); in init_cc_resources()
421 hw_rev_pidr = cc_ioread(new_drvdata, new_drvdata->ver_offset); in init_cc_resources()
424 val = cc_read_idr(new_drvdata, pidr_0124_offsets); in init_cc_resources()
433 val = cc_read_idr(new_drvdata, cidr_0123_offsets); in init_cc_resources()
443 val = cc_ioread(new_drvdata, CC_REG(HOST_REMOVE_INPUT_PINS)); in init_cc_resources()
449 if (new_drvdata->std_bodies & CC_STD_NIST) { in init_cc_resources()
451 new_drvdata->std_bodies = CC_STD_OSCCA; in init_cc_resources()
461 val = cc_ioread(new_drvdata, CC_REG(SECURITY_DISABLED)); in init_cc_resources()
463 new_drvdata->sec_disabled |= !!val; in init_cc_resources()
465 if (!new_drvdata->sec_disabled) { in init_cc_resources()
466 new_drvdata->comp_mask |= CC_CPP_SM4_ABORT_MASK; in init_cc_resources()
467 if (new_drvdata->std_bodies & CC_STD_NIST) in init_cc_resources()
468 new_drvdata->comp_mask |= CC_CPP_AES_ABORT_MASK; in init_cc_resources()
472 if (new_drvdata->sec_disabled) in init_cc_resources()
480 new_drvdata); in init_cc_resources()
487 init_cc_cache_params(new_drvdata); in init_cc_resources()
489 rc = init_cc_regs(new_drvdata); in init_cc_resources()
495 rc = cc_debugfs_init(new_drvdata); in init_cc_resources()
501 rc = cc_fips_init(new_drvdata); in init_cc_resources()
506 rc = cc_sram_mgr_init(new_drvdata); in init_cc_resources()
512 new_drvdata->mlli_sram_addr = in init_cc_resources()
513 cc_sram_alloc(new_drvdata, MAX_MLLI_BUFF_SIZE); in init_cc_resources()
514 if (new_drvdata->mlli_sram_addr == NULL_SRAM_ADDR) { in init_cc_resources()
519 rc = cc_req_mgr_init(new_drvdata); in init_cc_resources()
525 rc = cc_buffer_mgr_init(new_drvdata); in init_cc_resources()
532 rc = cc_cipher_alloc(new_drvdata); in init_cc_resources()
539 rc = cc_hash_alloc(new_drvdata); in init_cc_resources()
545 rc = cc_aead_alloc(new_drvdata); in init_cc_resources()
555 cc_set_ree_fips_status(new_drvdata, true); in init_cc_resources()
561 cc_hash_free(new_drvdata); in init_cc_resources()
563 cc_cipher_free(new_drvdata); in init_cc_resources()
565 cc_buffer_mgr_fini(new_drvdata); in init_cc_resources()
567 cc_req_mgr_fini(new_drvdata); in init_cc_resources()
569 cc_fips_fini(new_drvdata); in init_cc_resources()
571 cc_debugfs_fini(new_drvdata); in init_cc_resources()
573 fini_cc_regs(new_drvdata); in init_cc_resources()
578 clk_disable_unprepare(new_drvdata->clk); in init_cc_resources()