reset:starfive:trng/crypto:shares a reset signal
authorwilliam.qiu <william.qiu@starfivetech.com>
Wed, 8 Jun 2022 01:55:21 +0000 (09:55 +0800)
committerwilliam.qiu <william.qiu@starfivetech.com>
Wed, 8 Jun 2022 01:55:21 +0000 (09:55 +0800)
Use devm_reset_control_get_shared to share a reset signal otherwise TRNG
and crypto will not work at the same time.

Signed-off-by: samin.guo <samin.guo@starfivetech.com>
drivers/char/hw_random/starfive-trng.c
drivers/crypto/starfive/jh7110/jh7110-sec.c

index f760c9d..7b58856 100644 (file)
@@ -323,7 +323,7 @@ static int trng_probe(struct platform_device *pdev)
                return ret;
        }
 
-       rng->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
+       rng->rst = devm_reset_control_get_shared(&pdev->dev, NULL);
        if (IS_ERR(rng->rst)) {
                ret = PTR_ERR(rng->rst);
                dev_err(&pdev->dev,
index bc67ab0..00c79e3 100644 (file)
@@ -234,7 +234,7 @@ static int jh7110_cryp_probe(struct platform_device *pdev)
                return PTR_ERR(sdev->sec_ahb);
        }
 
-       sdev->rst_hresetn = devm_reset_control_get_exclusive(sdev->dev, "sec_hre");
+       sdev->rst_hresetn = devm_reset_control_get_shared(sdev->dev, "sec_hre");
        if (IS_ERR(sdev->rst_hresetn)) {
                dev_err(sdev->dev, "failed to get sec reset\n");
                return PTR_ERR(sdev->rst_hresetn);