[V2,3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
diff mbox series

Message ID 20191213153910.11235-3-aford173@gmail.com
State New
Headers show
Series
  • [V2,1/3] crypto: caam: Add support for i.MX8M Mini
Related show

Commit Message

Adam Ford Dec. 13, 2019, 3:39 p.m. UTC
Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
is currently not enabled by default.

This patch enables this driver by default.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  New to series

Comments

Horia Geantă Dec. 17, 2019, 9:11 a.m. UTC | #1
On 12/13/2019 5:39 PM, Adam Ford wrote:
> Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
So do the Layerscape ARMv8-based SoCs:
LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A

> is currently not enabled by default.
> 
> This patch enables this driver by default.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2:  New to series
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 6a83ba2aea3e..0212975b908b 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
>  CONFIG_CRYPTO_ECHAINIV=y
>  CONFIG_CRYPTO_ANSI_CPRNG=y
>  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> +CONFIG_CRYPTO_DEV_FSL_CAAM=y
This should probably be "m" instead.

Horia
Adam Ford Dec. 17, 2019, 1:07 p.m. UTC | #2
On Tue, Dec 17, 2019 at 3:11 AM Horia Geanta <horia.geanta@nxp.com> wrote:
>
> On 12/13/2019 5:39 PM, Adam Ford wrote:
> > Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
> So do the Layerscape ARMv8-based SoCs:
> LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A
>
> > is currently not enabled by default.
> >
> > This patch enables this driver by default.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V2:  New to series
> >
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 6a83ba2aea3e..0212975b908b 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
> >  CONFIG_CRYPTO_ECHAINIV=y
> >  CONFIG_CRYPTO_ANSI_CPRNG=y
> >  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> > +CONFIG_CRYPTO_DEV_FSL_CAAM=y
> This should probably be "m" instead.

Out of curiosity, what is the rule for when things are 'm' vs 'y'?

In the Code Aurora repo, it is set to 'y' and the mainline kernel for
the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
used 'y' here.

I can do a V3 to address the other items you noted, but I want to
understand the rules about the defconfig so I don't make the same
mistake again.

thanks,

adam
>
> Horia
Fabio Estevam Dec. 17, 2019, 6:25 p.m. UTC | #3
Hi Adam,

On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:

> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>
> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> used 'y' here.
>
> I can do a V3 to address the other items you noted, but I want to
> understand the rules about the defconfig so I don't make the same
> mistake again.

In arch/arm64/configs/defconfig we try to select modules whenever possible.

The exceptions are drivers that are vital for boot such as PMIC,
pinctrl, clks, etc.

The CAAM driver does not fall into this category, so selecting it as
module is preferred here.

Thanks
Adam Ford Dec. 18, 2019, 1:05 p.m. UTC | #4
On Tue, Dec 17, 2019 at 12:25 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Adam,
>
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
>
> > Out of curiosity, what is the rule for when things are 'm' vs 'y'?
> >
> > In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> > the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> > used 'y' here.
> >
> > I can do a V3 to address the other items you noted, but I want to
> > understand the rules about the defconfig so I don't make the same
> > mistake again.
>
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
>
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
>
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.

That makes sense.  Thank you for the clarification.  I'll keep that in
mind if I submit future updates.

adam
>
> Thanks
Horia Geantă Dec. 20, 2019, 8:07 a.m. UTC | #5
On 12/17/2019 8:25 PM, Fabio Estevam wrote:
> Hi Adam,
> 
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
> 
>> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>>
>> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
>> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
>> used 'y' here.
>>
>> I can do a V3 to address the other items you noted, but I want to
>> understand the rules about the defconfig so I don't make the same
>> mistake again.
> 
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
> 
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
> 
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.
> 
One comment here though.

CAAM's RNG is not "vital" for booting, but IIUC it would decrease the boot time
since it feeds the entropy pool through the hwrng interface.

Once RNG driver is fixed, would it be acceptable to add:
CONFIG_HW_RANDOM=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
in arm64 defconfig?

Thanks,
Horia

Patch
diff mbox series

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 6a83ba2aea3e..0212975b908b 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -845,6 +845,7 @@  CONFIG_SECURITY=y
 CONFIG_CRYPTO_ECHAINIV=y
 CONFIG_CRYPTO_ANSI_CPRNG=y
 CONFIG_CRYPTO_DEV_SUN8I_CE=m
+CONFIG_CRYPTO_DEV_FSL_CAAM=y
 CONFIG_CRYPTO_DEV_HISI_ZIP=m
 CONFIG_CMA_SIZE_MBYTES=32
 CONFIG_PRINTK_TIME=y