Skip to content

Commit 39eaf75

Browse files
horiagherbertx
authored andcommitted
crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel
Start with a clean slate before dealing with bit 16 (pointer size) of Master Configuration Register. This fixes the case of AArch64 boot loader + AArch32 kernel, when the boot loader might set MCFGR[PS] and kernel would fail to clear it. Cc: <[email protected]> Reported-by: Alison Wang <[email protected]> Signed-off-by: Horia Geantă <[email protected]> Reviewed-By: Alison Wang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 9e5f7a1 commit 39eaf75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/crypto/caam/ctrl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,9 @@ static int caam_probe(struct platform_device *pdev)
558558
* Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel,
559559
* long pointers in master configuration register
560560
*/
561-
clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK, MCFGR_AWCACHE_CACH |
562-
MCFGR_AWCACHE_BUFF | MCFGR_WDENABLE | MCFGR_LARGE_BURST |
561+
clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK | MCFGR_LONG_PTR,
562+
MCFGR_AWCACHE_CACH | MCFGR_AWCACHE_BUFF |
563+
MCFGR_WDENABLE | MCFGR_LARGE_BURST |
563564
(sizeof(dma_addr_t) == sizeof(u64) ? MCFGR_LONG_PTR : 0));
564565

565566
/*

0 commit comments

Comments
 (0)