From: Maximus Sun Date: Thu, 15 Jun 2023 10:09:26 +0000 (+0800) Subject: imx: priblob: Update to use structure X-Git-Tag: v2025.01-rc5-pxa1908~946^2~26 X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=2159f7d9b6f191e74c3d2004867e138bb5a0533c;p=u-boot.git imx: priblob: Update to use structure Use structure to avoid define CAAM_SCFGR for each platform Signed-off-by: Maximus Sun Signed-off-by: Peng Fan --- diff --git a/arch/arm/mach-imx/priblob.c b/arch/arm/mach-imx/priblob.c index 9b92eae781..5b022d5c82 100644 --- a/arch/arm/mach-imx/priblob.c +++ b/arch/arm/mach-imx/priblob.c @@ -13,12 +13,16 @@ #include #include #include -#include "../drivers/crypto/fsl_caam_internal.h" +#include int do_priblob_write(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) { - writel((readl(CAAM_SCFGR) & 0xFFFFFFFC) | 3, CAAM_SCFGR); - printf("New priblob setting = 0x%x\n", readl(CAAM_SCFGR) & 0x3); + ccsr_sec_t *sec_regs = (ccsr_sec_t *)CAAM_BASE_ADDR; + u32 scfgr = sec_in32(&sec_regs->scfgr); + + scfgr |= 0x3; + sec_out32(&sec_regs->scfgr, scfgr); + printf("New priblob setting = 0x%x\n", sec_in32(&sec_regs->scfgr) & 0x3); return 0; }