summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorNeal Liu <neal_liu@aspeedtech.com>2022-02-15 18:14:40 +0800
committerTom Rini <trini@konsulko.com>2022-02-21 08:35:40 -0500
commit829b41171b181e083fc984b72bb8acb31c1fb952 (patch)
tree052eb6ef742e65f43d8f77ce9e410846d3527f6e /drivers/crypto
parent5d90836cb51de553cf3a83143f99cd60cae26578 (diff)
downloadu-boot-829b41171b181e083fc984b72bb8acb31c1fb952.tar.gz
crypto: aspeed: fix polling RSA status wrong issue
Check interrupt status to see if RSA engine is completed. After completion of the task, write-clear the status to finish operation. Add missing register base for completion. Fixes: 89c36cca0b6 ("crypto: aspeed: Add AST2600 ACRY support") Signed-off-by: Neal Liu <neal_liu@aspeedtech.com> Reviewed-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/aspeed/aspeed_acry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/aspeed/aspeed_acry.c b/drivers/crypto/aspeed/aspeed_acry.c
index c28cdf374b..47a007f633 100644
--- a/drivers/crypto/aspeed/aspeed_acry.c
+++ b/drivers/crypto/aspeed/aspeed_acry.c
@@ -103,7 +103,7 @@ static int aspeed_acry_mod_exp(struct udevice *dev, const uint8_t *sig, uint32_t
while (1) {
reg = readl(acry->base + ACRY_RSA_INT_STS);
if ((reg & ACRY_RSA_INT_STS_RSA_READY) && (reg & ACRY_RSA_INT_STS_RSA_CMPLT)) {
- writel(reg, ACRY_RSA_INT_STS);
+ writel(reg, acry->base + ACRY_RSA_INT_STS);
break;
}
udelay(20);