imx: fix CAAM base for i.MX6UL
Subsystems (2)
PATCH 1/1 imx: fix CAAM base for i.MX6UL
HW accelerated "hash sha256 ..." command doesn't work on i.MX6UL, we get "CAAM was not setup properly or it is faulty" error message.
This is due to wrong CAAM base 0x02100000, on i.MX6UL the CAAM base address is 0x02140000. Fix it.
Note: with this patch applied the "hash sha256" commant still has some issues on i.MX6UL ("Invalid KEY Command" or other errors). With data cache off the "hash sha256" command works as expected.
--- arch/arm/include/asm/arch-mx6/imx-regs.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/include/asm/arch-mx6/imx-regs.h +4 -0
@@ -232,7 +232,11 @@#define AIPS2_OFF_BASE_ADDR (ATZ2_BASE_ADDR + 0x80000)#define AIPS3_ON_BASE_ADDR (ATZ3_BASE_ADDR + 0x7C000)#define AIPS3_OFF_BASE_ADDR (ATZ3_BASE_ADDR + 0x80000) +#if defined(CONFIG_MX6UL ) +#define CAAM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000) +#else #define CAAM_BASE_ADDR (ATZ2_BASE_ADDR) +#endif #define ARM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000)#define CONFIG_SYS_FSL_SEC_OFFSET 0
Signature · 1 line
2.11.0
Fabio Estevam
reviewerPATCH 1/1 imx: fix CAAM base for i.MX6UL
Hi Anatolij,
Thanks for the fix.
Quoted 9 lines · Anatolij Gustschin
HW accelerated "hash sha256 ..." command doesn't work on i.MX6UL, we get "CAAM was not setup properly or it is faulty" error message.
This is due to wrong CAAM base
0x02100000, on i.MX6UL the CAAM base address is0x02140000. Fix it.Note: with this patch applied the "hash sha256" commant still has some issues on i.MX6UL ("Invalid KEY Command" or other errors). With data cache off the "hash sha256" command works as expected.
Breno, could you please take a look at this issue when possible ?
Quoted 1 line
Signed-off-by Anatolij Gustschin <[email protected]>
PATCH 1/1 imx: fix CAAM base for i.MX6UL
Hi Anatolij,
2018-01-11 12:54 GMT-02:00 Fabio Estevam <[email protected]>:
Quoted 8 lines
Hi Anatolij,
Thanks for the fix.
Quoted 3 lines · Anatolij Gustschin
HW accelerated "hash sha256 ..." command doesn't work on i.MX6UL, we get "CAAM was not setup properly or it is faulty" error message.
Quoted 8 lines
Quoted 6 lines
This is due to wrong CAAM base
0x02100000, on i.MX6UL the CAAM base address is0x02140000. Fix it.Note: with this patch applied the "hash sha256" commant still has some issues on i.MX6UL ("Invalid KEY Command" or other errors). With data cache off the "hash sha256" command works as expected.
Breno, could you please take a look at this issue when possible ?
I managed to reproduce this issue on a mx6sabreauto, with data cache off the "hash sha256" command works as expected.
I will take a look on this issue and let you know any progress.
Thanks,
Breno Lima
PATCH 1/1 imx: fix CAAM base for i.MX6UL
In reply to Anatolij GustschinQuoted 22 lines · Anatolij Gustschin
HW accelerated "hash sha256 ..." command doesn't work on i.MX6UL, we get "CAAM was not setup properly or it is faulty" error message.
This is due to wrong CAAM base
0x02100000, on i.MX6UL the CAAM base address is0x02140000. Fix it.Note: with this patch applied the "hash sha256" commant still has some issues on i.MX6UL ("Invalid KEY Command" or other errors). With data cache off the "hash sha256" command works as expected.
Signed-off-by Anatolij Gustschin <[email protected]>--- arch/arm/include/asm/arch-mx6/imx-regs.h | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/include/asm/arch-mx6/imx-regs.h +0
-0@@ -232,7 +232,11 @@#define AIPS2_OFF_BASE_ADDR (ATZ2_BASE_ADDR + 0x80000)
arch/arm/include/asm/arch-mx6/imx-regs.h line 242
Quoted 10 lines
arch/arm/include/asm/arch-mx6/imx-regs.h +4
-0#define AIPS3_ON_BASE_ADDR (ATZ3_BASE_ADDR + 0x7C000)#define AIPS3_OFF_BASE_ADDR (ATZ3_BASE_ADDR + 0x80000) +#if defined(CONFIG_MX6UL ) +#define CAAM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000) +#else #define CAAM_BASE_ADDR (ATZ2_BASE_ADDR) +#endif #define ARM_BASE_ADDR (ATZ2_BASE_ADDR + 0x40000)#define CONFIG_SYS_FSL_SEC_OFFSET 0
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================