Lines Matching refs:new_drvdata
268 struct cc_drvdata *new_drvdata; in init_cc_resources() local
278 new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL); in init_cc_resources()
279 if (!new_drvdata) in init_cc_resources()
283 new_drvdata->hw_rev_name = hw_rev->name; in init_cc_resources()
284 new_drvdata->hw_rev = hw_rev->rev; in init_cc_resources()
285 new_drvdata->std_bodies = hw_rev->std_bodies; in init_cc_resources()
288 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP); in init_cc_resources()
289 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_712); in init_cc_resources()
290 new_drvdata->ver_offset = CC_REG(HOST_VERSION_712); in init_cc_resources()
292 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP8); in init_cc_resources()
293 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_630); in init_cc_resources()
294 new_drvdata->ver_offset = CC_REG(HOST_VERSION_630); in init_cc_resources()
297 new_drvdata->comp_mask = CC_COMP_IRQ_MASK; in init_cc_resources()
299 platform_set_drvdata(plat_dev, new_drvdata); in init_cc_resources()
300 new_drvdata->plat_dev = plat_dev; in init_cc_resources()
305 new_drvdata->clk = clk; in init_cc_resources()
307 new_drvdata->coherent = of_dma_is_coherent(np); in init_cc_resources()
313 new_drvdata->cc_base = devm_ioremap_resource(dev, req_mem_cc_regs); in init_cc_resources()
314 if (IS_ERR(new_drvdata->cc_base)) { in init_cc_resources()
316 return PTR_ERR(new_drvdata->cc_base); in init_cc_resources()
322 &req_mem_cc_regs->start, new_drvdata->cc_base); in init_cc_resources()
329 init_completion(&new_drvdata->hw_queue_avail); in init_cc_resources()
349 rc = clk_prepare_enable(new_drvdata->clk); in init_cc_resources()
355 new_drvdata->sec_disabled = cc_sec_disable; in init_cc_resources()
368 if (!cc_wait_for_reset_completion(new_drvdata)) { in init_cc_resources()
374 val = cc_ioread(new_drvdata, new_drvdata->sig_offset); in init_cc_resources()
382 hw_rev_pidr = cc_ioread(new_drvdata, new_drvdata->ver_offset); in init_cc_resources()
385 val = cc_read_idr(new_drvdata, pidr_0124_offsets); in init_cc_resources()
394 val = cc_read_idr(new_drvdata, cidr_0123_offsets); in init_cc_resources()
404 val = cc_ioread(new_drvdata, CC_REG(HOST_REMOVE_INPUT_PINS)); in init_cc_resources()
410 if (new_drvdata->std_bodies & CC_STD_NIST) { in init_cc_resources()
412 new_drvdata->std_bodies = CC_STD_OSCCA; in init_cc_resources()
422 val = cc_ioread(new_drvdata, CC_REG(SECURITY_DISABLED)); in init_cc_resources()
424 new_drvdata->sec_disabled |= !!val; in init_cc_resources()
426 if (!new_drvdata->sec_disabled) { in init_cc_resources()
427 new_drvdata->comp_mask |= CC_CPP_SM4_ABORT_MASK; in init_cc_resources()
428 if (new_drvdata->std_bodies & CC_STD_NIST) in init_cc_resources()
429 new_drvdata->comp_mask |= CC_CPP_AES_ABORT_MASK; in init_cc_resources()
433 if (new_drvdata->sec_disabled) in init_cc_resources()
441 new_drvdata); in init_cc_resources()
448 rc = init_cc_regs(new_drvdata, true); in init_cc_resources()
454 rc = cc_debugfs_init(new_drvdata); in init_cc_resources()
460 rc = cc_fips_init(new_drvdata); in init_cc_resources()
465 rc = cc_sram_mgr_init(new_drvdata); in init_cc_resources()
471 new_drvdata->mlli_sram_addr = in init_cc_resources()
472 cc_sram_alloc(new_drvdata, MAX_MLLI_BUFF_SIZE); in init_cc_resources()
473 if (new_drvdata->mlli_sram_addr == NULL_SRAM_ADDR) { in init_cc_resources()
478 rc = cc_req_mgr_init(new_drvdata); in init_cc_resources()
484 rc = cc_buffer_mgr_init(new_drvdata); in init_cc_resources()
491 rc = cc_cipher_alloc(new_drvdata); in init_cc_resources()
498 rc = cc_hash_alloc(new_drvdata); in init_cc_resources()
504 rc = cc_aead_alloc(new_drvdata); in init_cc_resources()
514 cc_set_ree_fips_status(new_drvdata, true); in init_cc_resources()
520 cc_hash_free(new_drvdata); in init_cc_resources()
522 cc_cipher_free(new_drvdata); in init_cc_resources()
524 cc_buffer_mgr_fini(new_drvdata); in init_cc_resources()
526 cc_req_mgr_fini(new_drvdata); in init_cc_resources()
528 cc_fips_fini(new_drvdata); in init_cc_resources()
530 cc_debugfs_fini(new_drvdata); in init_cc_resources()
532 fini_cc_regs(new_drvdata); in init_cc_resources()
537 clk_disable_unprepare(new_drvdata->clk); in init_cc_resources()