diff mbox series

[3/3] ARM: imx: Select RESET_IMX7 for i.MX7D

Message ID 1593425623-31810-3-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/3] reset: imx7: Support module build | expand

Commit Message

Anson Huang June 29, 2020, 10:13 a.m. UTC
i.MX7 reset driver now supports module build, it is no longer
built in by default, need to select it explicitly for i.MX7D.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 arch/arm/mach-imx/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnd Bergmann June 29, 2020, 11:31 a.m. UTC | #1
On Mon, Jun 29, 2020 at 12:25 PM Anson Huang <Anson.Huang@nxp.com> wrote:
>
> i.MX7 reset driver now supports module build, it is no longer
> built in by default, need to select it explicitly for i.MX7D.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  arch/arm/mach-imx/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index e7d7b90..3540483 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -561,6 +561,7 @@ config SOC_IMX7D_CM4
>  config SOC_IMX7D
>         bool "i.MX7 Dual support"
>         select PINCTRL_IMX7D
> +       select RESET_IMX7

Please drop this patch, it breaks the intent of the first one by forcing
the driver to be built-in again rather than a loadable module.

        Arnd
Anson Huang June 29, 2020, 11:36 a.m. UTC | #2
Hi, Arnd


> Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> 
> On Mon, Jun 29, 2020 at 12:25 PM Anson Huang <Anson.Huang@nxp.com>
> wrote:
> >
> > i.MX7 reset driver now supports module build, it is no longer built in
> > by default, need to select it explicitly for i.MX7D.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> >  arch/arm/mach-imx/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> > index e7d7b90..3540483 100644
> > --- a/arch/arm/mach-imx/Kconfig
> > +++ b/arch/arm/mach-imx/Kconfig
> > @@ -561,6 +561,7 @@ config SOC_IMX7D_CM4  config SOC_IMX7D
> >         bool "i.MX7 Dual support"
> >         select PINCTRL_IMX7D
> > +       select RESET_IMX7
> 
> Please drop this patch, it breaks the intent of the first one by forcing the driver
> to be built-in again rather than a loadable module.
> 

One thing to clarify is, the loadable module support is ONLY for i.MX ARMv8 SoCs,
ARMv7 SoCs is NOT in the plan, that is why I add this patch to make it same as previously
when this reset driver is =y by default. Without this patch, this reset driver will NOT be
enabled by default for i.MX ARMv7 SoCs, function will be broken.

Thanks,
Anson
Arnd Bergmann June 29, 2020, 11:47 a.m. UTC | #3
On Mon, Jun 29, 2020 at 1:36 PM Anson Huang <anson.huang@nxp.com> wrote:
> > Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> >
> > On Mon, Jun 29, 2020 at 12:25 PM Anson Huang <Anson.Huang@nxp.com>
> > wrote:
> > >
> > > i.MX7 reset driver now supports module build, it is no longer built in
> > > by default, need to select it explicitly for i.MX7D.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > ---
> > >  arch/arm/mach-imx/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> > > index e7d7b90..3540483 100644
> > > --- a/arch/arm/mach-imx/Kconfig
> > > +++ b/arch/arm/mach-imx/Kconfig
> > > @@ -561,6 +561,7 @@ config SOC_IMX7D_CM4  config SOC_IMX7D
> > >         bool "i.MX7 Dual support"
> > >         select PINCTRL_IMX7D
> > > +       select RESET_IMX7
> >
> > Please drop this patch, it breaks the intent of the first one by forcing the driver
> > to be built-in again rather than a loadable module.
> >
>
> One thing to clarify is, the loadable module support is ONLY for i.MX ARMv8 SoCs,

I don't understand. Why can't this driver be a loadable module on i.MX7?
Please clarify in the changelog what the bug is on i.MX7.

> ARMv7 SoCs is NOT in the plan, that is why I add this patch to make it same as previously
> when this reset driver is =y by default. Without this patch, this reset driver will NOT be
> enabled by default for i.MX ARMv7 SoCs, function will be broken.

But it's the same driver, make it work the same way on all chips!

I think artificially limiting a new driver feature to one chip just
because nobody
asked for it on another chip is not helpful.

      Arnd
Anson Huang June 29, 2020, 11:54 a.m. UTC | #4
Hi, Arnd


> Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> 
> On Mon, Jun 29, 2020 at 1:36 PM Anson Huang <anson.huang@nxp.com>
> wrote:
> > > Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> > >
> > > On Mon, Jun 29, 2020 at 12:25 PM Anson Huang
> <Anson.Huang@nxp.com>
> > > wrote:
> > > >
> > > > i.MX7 reset driver now supports module build, it is no longer
> > > > built in by default, need to select it explicitly for i.MX7D.
> > > >
> > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > > ---
> > > >  arch/arm/mach-imx/Kconfig | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> > > > index e7d7b90..3540483 100644
> > > > --- a/arch/arm/mach-imx/Kconfig
> > > > +++ b/arch/arm/mach-imx/Kconfig
> > > > @@ -561,6 +561,7 @@ config SOC_IMX7D_CM4  config SOC_IMX7D
> > > >         bool "i.MX7 Dual support"
> > > >         select PINCTRL_IMX7D
> > > > +       select RESET_IMX7
> > >
> > > Please drop this patch, it breaks the intent of the first one by
> > > forcing the driver to be built-in again rather than a loadable module.
> > >
> >
> > One thing to clarify is, the loadable module support is ONLY for i.MX
> > ARMv8 SoCs,
> 
> I don't understand. Why can't this driver be a loadable module on i.MX7?
> Please clarify in the changelog what the bug is on i.MX7.
> 
> > ARMv7 SoCs is NOT in the plan, that is why I add this patch to make it
> > same as previously when this reset driver is =y by default. Without
> > this patch, this reset driver will NOT be enabled by default for i.MX ARMv7
> SoCs, function will be broken.
> 
> But it's the same driver, make it work the same way on all chips!
> 
> I think artificially limiting a new driver feature to one chip just because nobody
> asked for it on another chip is not helpful.
> 

Understood, what if I don't select it in SOC config which is NOT flexible, but put it in
imx_v6_v7_defconfig, then user can select either =y or =m according their requirement?
And in imx_v6_v7_defconfig make it =y by default.

Thanks,
Anson
Arnd Bergmann June 29, 2020, 12:02 p.m. UTC | #5
On Mon, Jun 29, 2020 at 1:54 PM Anson Huang <anson.huang@nxp.com> wrote:
> > Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> >
> > On Mon, Jun 29, 2020 at 1:36 PM Anson Huang <anson.huang@nxp.com>
> > wrote:
> > > > Subject: Re: [PATCH 3/3] ARM: imx: Select RESET_IMX7 for i.MX7D
> > > > On Mon, Jun 29, 2020 at 12:25 PM Anson Huang
> > <Anson.Huang@nxp.com> wrote:

> > I don't understand. Why can't this driver be a loadable module on i.MX7?
> > Please clarify in the changelog what the bug is on i.MX7.
> >
> > > ARMv7 SoCs is NOT in the plan, that is why I add this patch to make it
> > > same as previously when this reset driver is =y by default. Without
> > > this patch, this reset driver will NOT be enabled by default for i.MX ARMv7
> > SoCs, function will be broken.
> >
> > But it's the same driver, make it work the same way on all chips!
> >
> > I think artificially limiting a new driver feature to one chip just because nobody
> > asked for it on another chip is not helpful.
> >
>
> Understood, what if I don't select it in SOC config which is NOT flexible, but put it in
> imx_v6_v7_defconfig, then user can select either =y or =m according their requirement?

I would recommend using a 'default m if SOC_IMX7' or 'default y if SOC_IMX7', so
any distros and users that have their own defconfigs still get a reasonable
default, but can choose between =m and =y based on their needs.

> And in imx_v6_v7_defconfig make it =y by default.

Having =y in imx_v6_v7_defconfig sounds reasonable if you go with 'default m'.

     Arnd
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index e7d7b90..3540483 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -561,6 +561,7 @@  config SOC_IMX7D_CM4
 config SOC_IMX7D
 	bool "i.MX7 Dual support"
 	select PINCTRL_IMX7D
+	select RESET_IMX7
 	select SOC_IMX7D_CA7 if ARCH_MULTI_V7
 	select SOC_IMX7D_CM4 if ARM_SINGLE_ARMV7M
 	select ARM_ERRATA_814220 if ARCH_MULTI_V7