Skip to contentSkip to conversation

crypto: aspeed: fix polling RSA status wrong issue

PATCH In review Neal Liu 2 participants 2 messages Feb 15, 2022 – Feb 21, 2022

Subsystems (3)
lore
Share & tools
lore

Neal Liu

author maintainer
#0 lore raw

PATCH v2 1/1 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")
---
 drivers/crypto/aspeed/aspeed_acry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/aspeed/aspeed_acry.c +1 -1
index c28cdf374b..47a007f633 100644
@@ -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);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 7 lines · Neal Liu

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")

Applied to u-boot/master, thanks!

Signature · 1 line
Tom