kernel: bump 5.4 to 5.4.109
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 804-crypto-0015-MLKU-123-1-crypto-caam-add-support-for-i.mx8mm-mn.patch
1 From 866aab825ad10675b1e98004aec19127ec16b2b3 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
3 Date: Mon, 23 Sep 2019 14:28:42 +0300
4 Subject: [PATCH] MLKU-123-1 crypto: caam - add support for i.mx8mm, mn
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 TODO:
10
11 1. clarify logic wrt. virtualization and DECORSR - see e-mail thread:
12 "Register-based interface - DECORSR with virtualization disabled"
13
14 2. check whether the clocks are identical for all mScale parts,
15 and if they do use a single "i.MX8M*" entry in clocks array.
16
17 Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
18 ---
19 drivers/crypto/caam/ctrl.c | 8 ++++++--
20 1 file changed, 6 insertions(+), 2 deletions(-)
21
22 --- a/drivers/crypto/caam/ctrl.c
23 +++ b/drivers/crypto/caam/ctrl.c
24 @@ -99,10 +99,12 @@ static inline int run_descriptor_deco0(s
25
26 if (ctrlpriv->virt_en == 1 ||
27 /*
28 - * Apparently on i.MX8MQ it doesn't matter if virt_en == 1
29 + * Apparently on i.MX8MQ, 8MM, 8MN it doesn't matter if virt_en == 1
30 * and the following steps should be performed regardless
31 */
32 - of_machine_is_compatible("fsl,imx8mq")) {
33 + of_machine_is_compatible("fsl,imx8mq") ||
34 + of_machine_is_compatible("fsl,imx8mm") ||
35 + of_machine_is_compatible("fsl,imx8mn")) {
36 clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);
37
38 while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
39 @@ -514,6 +516,8 @@ static const struct soc_device_attribute
40 { .soc_id = "i.MX6*", .data = &caam_imx6_data },
41 { .soc_id = "i.MX7*", .data = &caam_imx7_data },
42 { .soc_id = "i.MX8MQ", .data = &caam_imx7_data },
43 + { .soc_id = "i.MX8MM", .data = &caam_imx7_data },
44 + { .soc_id = "i.MX8MN", .data = &caam_imx7_data },
45 { .family = "Freescale i.MX" },
46 { /* sentinel */ }
47 };