[PATCH u-boot v2019.04-aspeed-openbmc 2/5] cmd/otp: Use any MOD_EXP driver
Joel Stanley
joel at jms.id.au
Mon Jul 18 18:47:25 AEST 2022
Instead of requesting the ACRY driver specifically, ask for the first
DM device that implements MOD_EXP.
Selecting RSA ensures that one of the MOD_EXP drivers will be built in.
On Aspeed platforms this will be either the ACRY or the software
implementation; Kconfig logic stops both from being built in.
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
cmd/otp.c | 4 ++--
cmd/Kconfig | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cmd/otp.c b/cmd/otp.c
index 4e901fbff996..049c217d6048 100644
--- a/cmd/otp.c
+++ b/cmd/otp.c
@@ -2642,9 +2642,9 @@ static int otp_verify_boot_image(phys_addr_t addr)
int i;
int pass = 0;
- ret = uclass_get_device_by_driver(UCLASS_MOD_EXP, DM_GET_DRIVER(aspeed_acry), &mod_exp_dev);
+ ret = uclass_get_device(UCLASS_MOD_EXP, 0, &mod_exp_dev);
if (ret) {
- printf("RSA engine: Can't find aspeed_acry\n");
+ printf("RSA: Can't find RSA driver\n");
return OTP_FAILURE;
}
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 1df26de5ed23..ff90a5d99acc 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -622,7 +622,6 @@ config CMD_OTP
select SHA384
select SHA256
select RSA
- select ASPEED_ACRY
default y
config CMD_RNG
--
2.35.1
More information about the openbmc
mailing list