Lines Matching refs:new_drvdata
186 struct cc_drvdata *new_drvdata; in init_cc_resources() local
196 new_drvdata = devm_kzalloc(dev, sizeof(*new_drvdata), GFP_KERNEL); in init_cc_resources()
197 if (!new_drvdata) in init_cc_resources()
205 new_drvdata->hw_rev_name = hw_rev->name; in init_cc_resources()
206 new_drvdata->hw_rev = hw_rev->rev; in init_cc_resources()
209 new_drvdata->hash_len_sz = HASH_LEN_SIZE_712; in init_cc_resources()
210 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP); in init_cc_resources()
211 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_712); in init_cc_resources()
212 new_drvdata->ver_offset = CC_REG(HOST_VERSION_712); in init_cc_resources()
214 new_drvdata->hash_len_sz = HASH_LEN_SIZE_630; in init_cc_resources()
215 new_drvdata->axim_mon_offset = CC_REG(AXIM_MON_COMP8); in init_cc_resources()
216 new_drvdata->sig_offset = CC_REG(HOST_SIGNATURE_630); in init_cc_resources()
217 new_drvdata->ver_offset = CC_REG(HOST_VERSION_630); in init_cc_resources()
220 platform_set_drvdata(plat_dev, new_drvdata); in init_cc_resources()
221 new_drvdata->plat_dev = plat_dev; in init_cc_resources()
239 new_drvdata->clk = clk; in init_cc_resources()
241 new_drvdata->coherent = of_dma_is_coherent(np); in init_cc_resources()
247 new_drvdata->cc_base = devm_ioremap_resource(dev, req_mem_cc_regs); in init_cc_resources()
248 if (IS_ERR(new_drvdata->cc_base)) { in init_cc_resources()
250 return PTR_ERR(new_drvdata->cc_base); in init_cc_resources()
256 &req_mem_cc_regs->start, new_drvdata->cc_base); in init_cc_resources()
259 new_drvdata->irq = platform_get_irq(plat_dev, 0); in init_cc_resources()
260 if (new_drvdata->irq < 0) { in init_cc_resources()
262 return new_drvdata->irq; in init_cc_resources()
265 rc = devm_request_irq(dev, new_drvdata->irq, cc_isr, in init_cc_resources()
266 IRQF_SHARED, "ccree", new_drvdata); in init_cc_resources()
269 new_drvdata->irq); in init_cc_resources()
272 dev_dbg(dev, "Registered to IRQ: %d\n", new_drvdata->irq); in init_cc_resources()
274 init_completion(&new_drvdata->hw_queue_avail); in init_cc_resources()
294 rc = cc_clk_on(new_drvdata); in init_cc_resources()
301 signature_val = cc_ioread(new_drvdata, new_drvdata->sig_offset); in init_cc_resources()
312 hw_rev->name, cc_ioread(new_drvdata, new_drvdata->ver_offset), in init_cc_resources()
315 rc = init_cc_regs(new_drvdata, true); in init_cc_resources()
321 rc = cc_debugfs_init(new_drvdata); in init_cc_resources()
327 rc = cc_fips_init(new_drvdata); in init_cc_resources()
332 rc = cc_sram_mgr_init(new_drvdata); in init_cc_resources()
338 new_drvdata->mlli_sram_addr = in init_cc_resources()
339 cc_sram_alloc(new_drvdata, MAX_MLLI_BUFF_SIZE); in init_cc_resources()
340 if (new_drvdata->mlli_sram_addr == NULL_SRAM_ADDR) { in init_cc_resources()
346 rc = cc_req_mgr_init(new_drvdata); in init_cc_resources()
352 rc = cc_buffer_mgr_init(new_drvdata); in init_cc_resources()
358 rc = cc_pm_init(new_drvdata); in init_cc_resources()
364 rc = cc_ivgen_init(new_drvdata); in init_cc_resources()
371 rc = cc_cipher_alloc(new_drvdata); in init_cc_resources()
378 rc = cc_hash_alloc(new_drvdata); in init_cc_resources()
384 rc = cc_aead_alloc(new_drvdata); in init_cc_resources()
394 cc_set_ree_fips_status(new_drvdata, true); in init_cc_resources()
399 cc_hash_free(new_drvdata); in init_cc_resources()
401 cc_cipher_free(new_drvdata); in init_cc_resources()
403 cc_ivgen_fini(new_drvdata); in init_cc_resources()
405 cc_pm_fini(new_drvdata); in init_cc_resources()
407 cc_buffer_mgr_fini(new_drvdata); in init_cc_resources()
409 cc_req_mgr_fini(new_drvdata); in init_cc_resources()
411 cc_sram_mgr_fini(new_drvdata); in init_cc_resources()
413 cc_fips_fini(new_drvdata); in init_cc_resources()
415 cc_debugfs_fini(new_drvdata); in init_cc_resources()
417 fini_cc_regs(new_drvdata); in init_cc_resources()
419 cc_clk_off(new_drvdata); in init_cc_resources()