Lines Matching refs:crypto_info
231 static void register_debugfs(struct rk_crypto_info *crypto_info) in register_debugfs() argument
243 static int rk_crypto_register(struct rk_crypto_info *crypto_info) in rk_crypto_register() argument
249 rk_cipher_algs[i]->dev = crypto_info; in rk_crypto_register()
252 dev_info(crypto_info->dev, "Register %s as %s\n", in rk_crypto_register()
258 dev_info(crypto_info->dev, "Register %s as %s\n", in rk_crypto_register()
264 dev_err(crypto_info->dev, "unknown algorithm\n"); in rk_crypto_register()
310 struct rk_crypto_info *crypto_info, *first; in rk_crypto_probe() local
313 crypto_info = devm_kzalloc(&pdev->dev, in rk_crypto_probe()
314 sizeof(*crypto_info), GFP_KERNEL); in rk_crypto_probe()
315 if (!crypto_info) { in rk_crypto_probe()
320 crypto_info->dev = &pdev->dev; in rk_crypto_probe()
321 platform_set_drvdata(pdev, crypto_info); in rk_crypto_probe()
323 crypto_info->variant = of_device_get_match_data(&pdev->dev); in rk_crypto_probe()
324 if (!crypto_info->variant) { in rk_crypto_probe()
329 crypto_info->rst = devm_reset_control_array_get_exclusive(dev); in rk_crypto_probe()
330 if (IS_ERR(crypto_info->rst)) { in rk_crypto_probe()
331 err = PTR_ERR(crypto_info->rst); in rk_crypto_probe()
335 reset_control_assert(crypto_info->rst); in rk_crypto_probe()
337 reset_control_deassert(crypto_info->rst); in rk_crypto_probe()
339 crypto_info->reg = devm_platform_ioremap_resource(pdev, 0); in rk_crypto_probe()
340 if (IS_ERR(crypto_info->reg)) { in rk_crypto_probe()
341 err = PTR_ERR(crypto_info->reg); in rk_crypto_probe()
345 err = rk_crypto_get_clks(crypto_info); in rk_crypto_probe()
349 crypto_info->irq = platform_get_irq(pdev, 0); in rk_crypto_probe()
350 if (crypto_info->irq < 0) { in rk_crypto_probe()
351 err = crypto_info->irq; in rk_crypto_probe()
355 err = devm_request_irq(&pdev->dev, crypto_info->irq, in rk_crypto_probe()
364 crypto_info->engine = crypto_engine_alloc_init(&pdev->dev, true); in rk_crypto_probe()
365 crypto_engine_start(crypto_info->engine); in rk_crypto_probe()
366 init_completion(&crypto_info->complete); in rk_crypto_probe()
368 err = rk_crypto_pm_init(crypto_info); in rk_crypto_probe()
375 list_add_tail(&crypto_info->list, &rocklist.dev_list); in rk_crypto_probe()
379 err = rk_crypto_register(crypto_info); in rk_crypto_probe()
385 register_debugfs(crypto_info); in rk_crypto_probe()
391 rk_crypto_pm_exit(crypto_info); in rk_crypto_probe()
393 crypto_engine_exit(crypto_info->engine); in rk_crypto_probe()