Re: [PATCH v3 2/5] crypto: caam: Fix endless loop when RNG is already initialized

2018-02-02 Thread Bryan O'Donoghue
On 01/02/18 12:16, Horia Geantă wrote: If the loop cannot exit based on value of "ret" != -EAGAIN, then it means caam_probe() will eventually fail due to ret == -EAGAIN: if (ret) { dev_err(dev, "failed to instantiate RNG"); goto caam_remove; } For

[PATCH v3 1/5] crypto: caam: Fix null dereference at error path

2018-01-30 Thread Bryan O'Donoghue
ag] Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support") Tested-by: Ryan Harkin Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Cc: # 4.12+ Reviewe

[PATCH v3 0/5] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-30 Thread Bryan O'Donoghue
t #1 is not then it's a NOP as Linux has full permission to rewrite the deco registers in the first page of CAAM registers. Finally then if #1 and #2 are true, the fixes here allow the CAAM to come up and for the RNG to be useable again. Bryan O'Donoghue (1): crypto: caam: Fix endless lo

[PATCH v3 2/5] crypto: caam: Fix endless loop when RNG is already initialized

2018-01-30 Thread Bryan O'Donoghue
Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Cc: # 4.12+ Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 98986d3..0a

[PATCH v3 3/5] crypto: caam: do not use mem and emi_slow clock for imx7x

2018-01-30 Thread Bryan O'Donoghue
Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/caa

[PATCH v3 4/5] clk: imx7d: add CAAM clock

2018-01-30 Thread Bryan O'Donoghue
io Estevam Cc: Peng Fan Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7

[PATCH v3 5/5] ARM: dts: imx7s: add CAAM device node

2018-01-30 Thread Bryan O'Donoghue
: Lukas Auer Signed-off-by: Bryan O'Donoghue --- arch/arm/boot/dts/imx7s.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 82ad26e..e38c159 100644 --- a/arch/arm/boot/dts/imx7s.dts

[RESEND PATCH v2 4/5] clk: imx7d: add CAAM clock

2018-01-26 Thread Bryan O'Donoghue
uot; Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 80dc211..52ab096

[RESEND PATCH v2 2/5] crypto: caam: Fix endless loop when RNG is already initialized

2018-01-26 Thread Bryan O'Donoghue
Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Cc: # 4.12+ Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.

[RESEND PATCH v2 3/5] crypto: caam: do not use mem and emi_slow clock for imx7x

2018-01-26 Thread Bryan O'Donoghue
Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/d

[RESEND PATCH v2 5/5] ARM: dts: imx7s: add CAAM device node

2018-01-26 Thread Bryan O'Donoghue
From: Rui Miguel Silva Add CAAM device node to the i.MX7s device tree. Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghu

[RESEND PATCH v2 1/5] crypto: caam: Fix null dereference at error path

2018-01-26 Thread Bryan O'Donoghue
2+ Reviewed-by: Horia Geantă Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 027e121..98986d3 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/cryp

[RESEND PATCH v2 0/5] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-26 Thread Bryan O'Donoghue
, the fixes here allow the CAAM to come up and for the RNG to be useable again. Bryan O'Donoghue (1): crypto: caam: Fix endless loop when RNG is already initialized Rui Miguel Silva (4): crypto: caam: Fix null dereference at error path crypto: caam: do not use mem and emi_slow clock f

[PATCH v2 1/5] crypto: caam: Fix null dereference at error path

2018-01-26 Thread Bryan O'Donoghue
2+ Reviewed-by: Horia Geantă Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 027e121..98986d3 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/cryp

[PATCH v2 5/5] ARM: dts: imx7s: add CAAM device node

2018-01-26 Thread Bryan O'Donoghue
From: Rui Miguel Silva Add CAAM device node to the i.MX7s device tree. Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghu

[PATCH v2 3/5] crypto: caam: do not use mem and emi_slow clock for imx7x

2018-01-26 Thread Bryan O'Donoghue
Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/d

[PATCH v2 4/5] clk: imx7d: add CAAM clock

2018-01-26 Thread Bryan O'Donoghue
uot; Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/clk/imx/clk-imx7d.c | 1 + include/dt-bindings/clock/imx7d-clock.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 80dc211..52ab096

[PATCH v2 2/5] crypto: caam: Fix endless loop when RNG is already initialized

2018-01-26 Thread Bryan O'Donoghue
Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Cc: # 4.12+ Signed-off-by: Bryan O'Donoghue --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.

[PATCH v2 0/5] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-26 Thread Bryan O'Donoghue
atch for the NULL pointer dereference fixes a cash on this path). If #2 is true but #1 is not then it's a NOP as Linux has full permission to rewrite the deco registers in the first page of CAAM registers. Finally then if #1 and #2 are true, the fixes here allow the CAAM to come up and for

Re: [RESEND PATCH 0/6] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-25 Thread Bryan O'Donoghue
On 25/01/18 17:50, Horia Geantă wrote: If the first ("global") caam register page is not accessible, RNG init is not the only problem. For e.g. device endianness detection won't work. Hi Horia, Yes I had that thought that there were other gotchas lurking once the CAAM was in a more restricted

Re: [RESEND PATCH 6/6] crypto: caam: detect RNG init when TrustZone is active

2018-01-25 Thread Bryan O'Donoghue
On 25/01/18 13:20, Auer, Lukas wrote: On Wed, 2018-01-24 at 14:50 +, Bryan O'Donoghue wrote: When TrustZone is enabled on sec4 compatible silicon the first page of the CAAM is reserved for TrustZone only, this means that access to the deco registers is restricted and will return zero

Re: [RESEND PATCH 3/6] ARM: dts: imx7s: add CAAM device node

2018-01-24 Thread Bryan O'Donoghue
On 24/01/18 22:48, Bryan O'Donoghue wrote: The clock configuration has changed to just one CAAM-specific clock in addition to the ahb clock. This also means that additional modifications to the CAAM driver are necessary or it will complain that it doesn't find all clocks. Sure -

Re: [RESEND PATCH 3/6] ARM: dts: imx7s: add CAAM device node

2018-01-24 Thread Bryan O'Donoghue
On 24/01/18 18:12, Auer, Lukas wrote: On Wed, 2018-01-24 at 14:50 +, Bryan O'Donoghue wrote: From: Rui Miguel Silva Add CAAM device node to the i.MX7s device tree. Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc:

[RESEND PATCH 1/6] crypto: caam: Fix null dereference at error path

2018-01-24 Thread Bryan O'Donoghue
ag] Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support") Tested-by: Ryan Harkin Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signe

[RESEND PATCH 3/6] ARM: dts: imx7s: add CAAM device node

2018-01-24 Thread Bryan O'Donoghue
From: Rui Miguel Silva Add CAAM device node to the i.MX7s device tree. Signed-off-by: Rui Miguel Silva Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer Signed-off-by: Bryan O'Donoghu

[RESEND PATCH 4/6] imx7d: add CAAM clocks

2018-01-24 Thread Bryan O'Donoghue
uot; Cc: Lukas Auer Signed-off-by: Bryan O'Donoghue --- drivers/clk/imx/clk-imx7d.c | 3 +++ include/dt-bindings/clock/imx7d-clock.h | 5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/clk/imx/clk-imx7d.c b/drivers/clk/imx/clk-imx7d.c index 80dc

[RESEND PATCH 5/6] crypto: caam: add logic to detect when running under TrustZone

2018-01-24 Thread Bryan O'Donoghue
handle the case of determining if the block is usable when ctrlpriv->trustzone is true. Signed-off-by: Bryan O'Donoghue Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer --- drive

[RESEND PATCH 6/6] crypto: caam: detect RNG init when TrustZone is active

2018-01-24 Thread Bryan O'Donoghue
fix between u-boot and Linux is available in these two threads Link: https://github.com/OP-TEE/optee_os/issues/1408 Link: https://tinyurl.com/yam5gv9a Link: https://patchwork.ozlabs.org/cover/865042 Signed-off-by: Bryan O'Donoghue Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Es

[RESEND PATCH 2/6] crypto: caam: Fix endless loop when RNG is already initialized

2018-01-24 Thread Bryan O'Donoghue
eported-by: Ryan Harkin Signed-off-by: Bryan O'Donoghue Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Fabio Estevam Cc: Peng Fan Cc: Herbert Xu Cc: "David S. Miller" Cc: Lukas Auer --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[RESEND PATCH 0/6] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-24 Thread Bryan O'Donoghue
rs. Finally then if #1 and #2 are true, the fixes here allow the CAAM to come up and for the RNG to be useable again. Bryan O'Donoghue (3): crypto: caam: Fix endless loop when RNG is already initialized crypto: caam: add logic to detect when running under TrustZone crypto: caam: detec

Re: [PATCH 0/6] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-24 Thread Bryan O'Donoghue
crap - looks like just the cover note got sent. sorry folks

[PATCH 0/6] Enable CAAM on i.MX7s fix TrustZone issues

2018-01-24 Thread Bryan O'Donoghue
rs. Finally then if #1 and #2 are true, the fixes here allow the CAAM to come up and for the RNG to be useable again. Bryan O'Donoghue (3): crypto: caam: Fix endless loop when RNG is already initialized crypto: caam: add logic to detect when running under TrustZone crypto: caam: detec