Lines Matching refs:t_alg

3010 static void caam_skcipher_alg_init(struct caam_skcipher_alg *t_alg)  in caam_skcipher_alg_init()  argument
3012 struct skcipher_alg *alg = &t_alg->skcipher; in caam_skcipher_alg_init()
3024 static void caam_aead_alg_init(struct caam_aead_alg *t_alg) in caam_aead_alg_init() argument
3026 struct aead_alg *alg = &t_alg->aead; in caam_aead_alg_init()
4632 struct caam_hash_alg *t_alg; in caam_hash_alloc() local
4636 t_alg = kzalloc(sizeof(*t_alg), GFP_KERNEL); in caam_hash_alloc()
4637 if (!t_alg) in caam_hash_alloc()
4640 t_alg->ahash_alg = template->template_ahash; in caam_hash_alloc()
4641 halg = &t_alg->ahash_alg; in caam_hash_alloc()
4654 t_alg->ahash_alg.setkey = NULL; in caam_hash_alloc()
4665 t_alg->alg_type = template->alg_type; in caam_hash_alloc()
4666 t_alg->dev = dev; in caam_hash_alloc()
4668 return t_alg; in caam_hash_alloc()
5250 struct caam_skcipher_alg *t_alg = driver_algs + i; in dpaa2_caam_probe() local
5251 u32 alg_sel = t_alg->caam.class1_alg_type & OP_ALG_ALGSEL_MASK; in dpaa2_caam_probe()
5269 t_alg->caam.dev = dev; in dpaa2_caam_probe()
5270 caam_skcipher_alg_init(t_alg); in dpaa2_caam_probe()
5272 err = crypto_register_skcipher(&t_alg->skcipher); in dpaa2_caam_probe()
5275 t_alg->skcipher.base.cra_driver_name, err); in dpaa2_caam_probe()
5279 t_alg->registered = true; in dpaa2_caam_probe()
5284 struct caam_aead_alg *t_alg = driver_aeads + i; in dpaa2_caam_probe() local
5285 u32 c1_alg_sel = t_alg->caam.class1_alg_type & in dpaa2_caam_probe()
5287 u32 c2_alg_sel = t_alg->caam.class2_alg_type & in dpaa2_caam_probe()
5319 t_alg->caam.dev = dev; in dpaa2_caam_probe()
5320 caam_aead_alg_init(t_alg); in dpaa2_caam_probe()
5322 err = crypto_register_aead(&t_alg->aead); in dpaa2_caam_probe()
5325 t_alg->aead.base.cra_driver_name, err); in dpaa2_caam_probe()
5329 t_alg->registered = true; in dpaa2_caam_probe()
5346 struct caam_hash_alg *t_alg; in dpaa2_caam_probe() local
5350 t_alg = caam_hash_alloc(dev, alg, true); in dpaa2_caam_probe()
5351 if (IS_ERR(t_alg)) { in dpaa2_caam_probe()
5352 err = PTR_ERR(t_alg); in dpaa2_caam_probe()
5358 err = crypto_register_ahash(&t_alg->ahash_alg); in dpaa2_caam_probe()
5361 t_alg->ahash_alg.halg.base.cra_driver_name, in dpaa2_caam_probe()
5363 kfree(t_alg); in dpaa2_caam_probe()
5365 list_add_tail(&t_alg->entry, &hash_list); in dpaa2_caam_probe()
5369 t_alg = caam_hash_alloc(dev, alg, false); in dpaa2_caam_probe()
5370 if (IS_ERR(t_alg)) { in dpaa2_caam_probe()
5371 err = PTR_ERR(t_alg); in dpaa2_caam_probe()
5377 err = crypto_register_ahash(&t_alg->ahash_alg); in dpaa2_caam_probe()
5380 t_alg->ahash_alg.halg.base.cra_driver_name, in dpaa2_caam_probe()
5382 kfree(t_alg); in dpaa2_caam_probe()
5384 list_add_tail(&t_alg->entry, &hash_list); in dpaa2_caam_probe()
5418 struct caam_aead_alg *t_alg = driver_aeads + i; in dpaa2_caam_remove() local
5420 if (t_alg->registered) in dpaa2_caam_remove()
5421 crypto_unregister_aead(&t_alg->aead); in dpaa2_caam_remove()
5425 struct caam_skcipher_alg *t_alg = driver_algs + i; in dpaa2_caam_remove() local
5427 if (t_alg->registered) in dpaa2_caam_remove()
5428 crypto_unregister_skcipher(&t_alg->skcipher); in dpaa2_caam_remove()