summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2016-12-05 12:06:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-15 19:50:35 +0300
commit86bea59218a05031deeac415544eb48c1556456b (patch)
tree45d4d2aefec7a629b5e389ca50a319079fa3a44c /drivers
parent666531ca650e67f111af70789a48b0d169772b78 (diff)
downloadlinux-86bea59218a05031deeac415544eb48c1556456b.tar.xz
crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel
commit 39eaf759466f4e3fbeaa39075512f4f345dffdc8 upstream. 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. Reported-by: Alison Wang <alison.wang@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-By: Alison Wang <Alison.wang@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/caam/ctrl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 0ec112ee5204..2341f3799591 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -557,8 +557,9 @@ static int caam_probe(struct platform_device *pdev)
* Enable DECO watchdogs and, if this is a PHYS_ADDR_T_64BIT kernel,
* long pointers in master configuration register
*/
- clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK, MCFGR_AWCACHE_CACH |
- MCFGR_AWCACHE_BUFF | MCFGR_WDENABLE | MCFGR_LARGE_BURST |
+ clrsetbits_32(&ctrl->mcr, MCFGR_AWCACHE_MASK | MCFGR_LONG_PTR,
+ MCFGR_AWCACHE_CACH | MCFGR_AWCACHE_BUFF |
+ MCFGR_WDENABLE | MCFGR_LARGE_BURST |
(sizeof(dma_addr_t) == sizeof(u64) ? MCFGR_LONG_PTR : 0));
/*