crypto: rockchip: core: register crypto device into rk_cryptodev

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I29364e0b5dd82a227dc74567dc12565e3b97ad1c
This commit is contained in:
Lin Jinhan
2021-12-24 17:41:22 +08:00
committed by Tao Huang
parent f27ce7a700
commit d5cea8f2c7

View File

@@ -22,6 +22,7 @@
#include "rk_crypto_core.h"
#include "rk_crypto_v1.h"
#include "rk_crypto_v2.h"
#include "cryptodev_linux/rk_cryptodev_int.h"
#define RK_CRYPTO_V1_SOC_DATA_INIT(names) {\
.use_soft_aes192 = false,\
@@ -789,6 +790,8 @@ static int rk_crypto_probe(struct platform_device *pdev)
goto err_register_alg;
}
rk_cryptodev_register_dev(rk_dev->dev, "rk_crypto");
dev_info(dev, "Crypto Accelerator successfully registered\n");
return 0;
@@ -803,6 +806,8 @@ static int rk_crypto_remove(struct platform_device *pdev)
{
struct rk_crypto_dev *rk_dev = platform_get_drvdata(pdev);
rk_cryptodev_unregister_dev(rk_dev->dev);
del_timer_sync(&rk_dev->timer);
rk_crypto_unregister(rk_dev);