Message ID | cover.1539609921.git.leonard.crestez@nxp.com |
---|---|
Headers | show |
Series | Port mxs-dcp to imx6ull and imx6sll | expand |
On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez <leonard.crestez@nxp.com> wrote: > + /* DCP clock is optional, only used on some SOCs */ > + sdcp->dcp_clk = devm_clk_get(dev, "dcp"); > + if (IS_ERR(sdcp->dcp_clk)) { > + if (sdcp->dcp_clk != ERR_PTR(-ENOENT)) > + return PTR_ERR(sdcp->dcp_clk); > + sdcp->dcp_clk = NULL; > + } > + > + ret = clk_prepare(sdcp->dcp_clk); > + if (ret) > + return ret; > + ret = clk_enable(sdcp->dcp_clk); > + if (ret) > + return ret; Couldn't you use clk_prepare_enable() instead?
On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez <leonard.crestez@nxp.com> wrote: > diff --git a/arch/arm/boot/dts/imx6ull.dtsi b/arch/arm/boot/dts/imx6ull.dtsi > index 796ed35d4ac9..be610339e933 100644 > --- a/arch/arm/boot/dts/imx6ull.dtsi > +++ b/arch/arm/boot/dts/imx6ull.dtsi > @@ -37,10 +37,20 @@ > #address-cells = <1>; > #size-cells = <1>; > reg = <0x02200000 0x100000>; > ranges; > > + dcp: dcp@2280000 { Node names should be generic, so it would be better to use: dcp: crypto@2280000 {
On Mon, Oct 15, 2018 at 10:28 AM Leonard Crestez <leonard.crestez@nxp.com> wrote: > > This block is present in 6sl, 6sll and 6ull so it should be enabled in > the default imx kernel config. > > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Hi Leonard, > -----Original Message----- > From: Leonard Crestez > Sent: Monday, October 15, 2018 9:28 PM [...] > Subject: [PATCH v2 0/4] Port mxs-dcp to imx6ull and imx6sll > > The DCP block is present on 6sll and 6ull but not enabled. The hardware is > mostly compatible with 6sl, the only important difference is that explicit clock > enabling is required. > > There were several issues with the functionality of this driver (it didn't even > probe properly) but they are fixed in cryptodev/master by this series: > https://lore.kernel.org/patchwork/cover/994874/ > Thanks for the work. I will be glad to help the test if you provide some test guides. :-) Regards Dong Aisheng > --- > Changes since v1: > * Add devicetree maintainers for dt-bindings > * Add a patch enabling in imx_v6_v7_defconfig. Since tcrypt now passes this > shouldn't cause any issues > * Link to v1: https://lore.kernel.org/patchwork/cover/994893/ > > Leonard Crestez (4): > dt-bindings: crypto: Mention clocks for mxs-dcp > crypto: mxs-dcp - Add support for dcp clk > ARM: dts: imx6ull: Add dcp node > ARM: imx_v6_v7_defconfig: Enable CRYPTO_DEV_MXS_DCP > > .../devicetree/bindings/crypto/fsl-dcp.txt | 2 ++ > arch/arm/boot/dts/imx6ull.dtsi | 10 ++++++++++ > arch/arm/configs/imx_v6_v7_defconfig | 1 + > drivers/crypto/mxs-dcp.c | 18 > ++++++++++++++++++ > 4 files changed, 31 insertions(+) > > -- > 2.17.1