layerscape: add patches-5.4
[openwrt/staging/ynezz.git] / target / linux / layerscape / patches-5.4 / 804-crypto-0036-LF-933-crypto-caam-fix-iosource-busy-issue.patch
1 From 4f59ceff69a20d28881848140ef5fc2888042e62 Mon Sep 17 00:00:00 2001
2 From: Gagandeep Singh <g.singh@nxp.com>
3 Date: Mon, 17 Feb 2020 16:41:01 +0000
4 Subject: [PATCH] LF-933: crypto: caam: fix iosource busy issue
5
6 The caam controller driver claims the ownership of the
7 whole caam register space due to which while binding the
8 Job Ring to fsl-jr-uio driver, it returns IOSOURCE_BUSY
9 error.
10
11 This patch replaces devm_request_mem_region() API with
12 platform_get_resource() to avoid this issue.
13
14 Fixes: eb5e94d4624a ("crypto: caam - use devres to unmap memory")
15
16 Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
17 Acked-by: Horia Geanta <horia.geanta@nxp.com>
18 ---
19 drivers/crypto/caam/fsl_jr_uio.c | 7 +++----
20 1 file changed, 3 insertions(+), 4 deletions(-)
21
22 --- a/drivers/crypto/caam/fsl_jr_uio.c
23 +++ b/drivers/crypto/caam/fsl_jr_uio.c
24 @@ -187,11 +187,10 @@ static int fsl_jr_probe(struct platform_
25 goto abort;
26 }
27
28 - jr_dev->res = devm_request_mem_region(&dev->dev, regs.start,
29 - regs.end - regs.start + 1,
30 - jr_dev->info.name);
31 +
32 + jr_dev->res = platform_get_resource(dev, IORESOURCE_MEM, 0);
33 if (unlikely(!jr_dev->res)) {
34 - dev_err(jr_dev->dev, "devm_request_mem_region failed\n");
35 + dev_err(jr_dev->dev, "platform_get_resource() failed\n");
36 ret = -ENOMEM;
37 goto abort;
38 }