2020-03-13 03:34:26

by Peng Fan

[permalink] [raw]
Subject: [PATCH 0/3] imx: drop dependency on ARM64

From: Peng Fan <[email protected]>

It is possible to run aarch32 linux on aarch64 hardware, but
with the ARM64 dependency, we are not able to build those drivers
for ARM32.

Select ARM_GIC_V3 for i.MX8M is to enable the gic-v3 driver for i.MX8M

I did a basic boot test on i.MX8MM EVK board. A few ATF changes
to make psci smp work still needed.

Peng Fan (3):
pinctrl: freescale: drop the dependency on ARM64 for i.MX8M
clk: imx: drop the dependency on ARM64 for i.MX8M
soc: imx: select ARM_GIC_V3 for i.MX8M

drivers/clk/imx/Kconfig | 8 ++++----
drivers/pinctrl/freescale/Kconfig | 8 ++++----
drivers/soc/imx/Kconfig | 1 +
3 files changed, 9 insertions(+), 8 deletions(-)

--
2.16.4


2020-03-13 03:34:36

by Peng Fan

[permalink] [raw]
Subject: [PATCH 1/3] pinctrl: freescale: drop the dependency on ARM64 for i.MX8M

From: Peng Fan <[email protected]>

Moving to support aarch32 mode on aarch64 hardware, need to drop
the dependency on ARM64 to make the driver could be selected for
ARM32.

Signed-off-by: Peng Fan <[email protected]>
---
drivers/pinctrl/freescale/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
index de775a85a51e..c784663b00ad 100644
--- a/drivers/pinctrl/freescale/Kconfig
+++ b/drivers/pinctrl/freescale/Kconfig
@@ -125,28 +125,28 @@ config PINCTRL_IMX7ULP

config PINCTRL_IMX8MM
bool "IMX8MM pinctrl driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
select PINCTRL_IMX
help
Say Y here to enable the imx8mm pinctrl driver

config PINCTRL_IMX8MN
bool "IMX8MN pinctrl driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
select PINCTRL_IMX
help
Say Y here to enable the imx8mn pinctrl driver

config PINCTRL_IMX8MP
bool "IMX8MP pinctrl driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
select PINCTRL_IMX
help
Say Y here to enable the imx8mp pinctrl driver

config PINCTRL_IMX8MQ
bool "IMX8MQ pinctrl driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
select PINCTRL_IMX
help
Say Y here to enable the imx8mq pinctrl driver
--
2.16.4

2020-03-13 03:34:47

by Peng Fan

[permalink] [raw]
Subject: [PATCH 2/3] clk: imx: drop the dependency on ARM64 for i.MX8M

From: Peng Fan <[email protected]>

Moving to support aarch32 mode on aarch64 hardware, need to drop
the dependency on ARM64 to make the driver could be selected for
ARM32.

Signed-off-by: Peng Fan <[email protected]>
---
drivers/clk/imx/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index 01eadee88d66..db0253fa3d64 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -10,25 +10,25 @@ config MXC_CLK_SCU

config CLK_IMX8MM
bool "IMX8MM CCM Clock Driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
help
Build the driver for i.MX8MM CCM Clock Driver

config CLK_IMX8MN
bool "IMX8MN CCM Clock Driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
help
Build the driver for i.MX8MN CCM Clock Driver

config CLK_IMX8MP
bool "IMX8MP CCM Clock Driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
help
Build the driver for i.MX8MP CCM Clock Driver

config CLK_IMX8MQ
bool "IMX8MQ CCM Clock Driver"
- depends on ARCH_MXC && ARM64
+ depends on ARCH_MXC
help
Build the driver for i.MX8MQ CCM Clock Driver

--
2.16.4

2020-03-13 03:36:14

by Peng Fan

[permalink] [raw]
Subject: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M

From: Peng Fan <[email protected]>

Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32
mode linux on aarch64 hardware. For aarch64 mode, it not hurts
to select ARM_GIC_V3.

Signed-off-by: Peng Fan <[email protected]>
---
drivers/soc/imx/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
index 70019cefa617..0b69024296d5 100644
--- a/drivers/soc/imx/Kconfig
+++ b/drivers/soc/imx/Kconfig
@@ -21,6 +21,7 @@ config SOC_IMX8M
bool "i.MX8M SoC family support"
depends on ARCH_MXC || COMPILE_TEST
default ARCH_MXC && ARM64
+ select ARM_GIC_V3
help
If you say yes here you get support for the NXP i.MX8M family
support, it will provide the SoC info like SoC family,
--
2.16.4

2020-03-13 10:10:17

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: freescale: drop the dependency on ARM64 for i.MX8M

On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
>
> From: Peng Fan <[email protected]>
>
> Moving to support aarch32 mode on aarch64 hardware, need to drop
> the dependency on ARM64 to make the driver could be selected for
> ARM32.
>
> Signed-off-by: Peng Fan <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2020-03-13 10:11:52

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/3] clk: imx: drop the dependency on ARM64 for i.MX8M

On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
>
> From: Peng Fan <[email protected]>
>
> Moving to support aarch32 mode on aarch64 hardware, need to drop
> the dependency on ARM64 to make the driver could be selected for
> ARM32.
>
> Signed-off-by: Peng Fan <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2020-03-13 10:12:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M

On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
>
> From: Peng Fan <[email protected]>
>
> Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32
> mode linux on aarch64 hardware. For aarch64 mode, it not hurts
> to select ARM_GIC_V3.
>
> Signed-off-by: Peng Fan <[email protected]>
> ---

Acked-by: Arnd Bergmann <[email protected]>

> diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
> index 70019cefa617..0b69024296d5 100644
> --- a/drivers/soc/imx/Kconfig
> +++ b/drivers/soc/imx/Kconfig
> @@ -21,6 +21,7 @@ config SOC_IMX8M
> bool "i.MX8M SoC family support"
> depends on ARCH_MXC || COMPILE_TEST
> default ARCH_MXC && ARM64
> + select ARM_GIC_V3

It would seem sensible to also drop the dependency on the 'default'

Arnd

2020-03-16 06:44:09

by Peng Fan

[permalink] [raw]
Subject: RE: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M

Hi Arnd,

> Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M
>
> On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
> >
> > From: Peng Fan <[email protected]>
> >
> > Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32
> > mode linux on aarch64 hardware. For aarch64 mode, it not hurts to
> > select ARM_GIC_V3.
> >
> > Signed-off-by: Peng Fan <[email protected]>
> > ---
>
> Acked-by: Arnd Bergmann <[email protected]>
>
> > diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index
> > 70019cefa617..0b69024296d5 100644
> > --- a/drivers/soc/imx/Kconfig
> > +++ b/drivers/soc/imx/Kconfig
> > @@ -21,6 +21,7 @@ config SOC_IMX8M
> > bool "i.MX8M SoC family support"
> > depends on ARCH_MXC || COMPILE_TEST
> > default ARCH_MXC && ARM64
> > + select ARM_GIC_V3
>
> It would seem sensible to also drop the dependency on the 'default'

If drop default, we need enable this config option in ARM64 defconfig,
I would leave it as is for now.

Thanks,
Peng.

>
> Arnd
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.infr
> adead.org%2Fmailman%2Flistinfo%2Flinux-arm-kernel&amp;data=02%7C01
> %7Cpeng.fan%40nxp.com%7Ca28680bc024f478a8c4008d7c736ef64%7C686
> ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637196911074143592&a
> mp;sdata=jNEcrVlci7UEAhAftKBNSVc4b6%2F0Sm2aOYPIA9ajZl8%3D&amp;re
> served=0

2020-03-16 08:06:14

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M

On Mon, Mar 16, 2020 at 7:43 AM Peng Fan <[email protected]> wrote:
> > Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M
> >
> > On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
> > >
> > > From: Peng Fan <[email protected]>
> > >
> > > Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32
> > > mode linux on aarch64 hardware. For aarch64 mode, it not hurts to
> > > select ARM_GIC_V3.
> > >
> > > Signed-off-by: Peng Fan <[email protected]>
> > > ---
> >
> > Acked-by: Arnd Bergmann <[email protected]>
> >
> > > diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig index
> > > 70019cefa617..0b69024296d5 100644
> > > --- a/drivers/soc/imx/Kconfig
> > > +++ b/drivers/soc/imx/Kconfig
> > > @@ -21,6 +21,7 @@ config SOC_IMX8M
> > > bool "i.MX8M SoC family support"
> > > depends on ARCH_MXC || COMPILE_TEST
> > > default ARCH_MXC && ARM64
> > > + select ARM_GIC_V3
> >
> > It would seem sensible to also drop the dependency on the 'default'
>
> If drop default, we need enable this config option in ARM64 defconfig,
> I would leave it as is for now.

I meant making it 'default ARCH_MXC' so it gets enabled for both
32-bit and 64-bit i.MX configurations, not just 64-bit.

Arnd

2020-03-16 17:02:46

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 2/3] clk: imx: drop the dependency on ARM64 for i.MX8M

Quoting [email protected] (2020-03-12 20:27:15)
> From: Peng Fan <[email protected]>
>
> Moving to support aarch32 mode on aarch64 hardware, need to drop
> the dependency on ARM64 to make the driver could be selected for
> ARM32.
>
> Signed-off-by: Peng Fan <[email protected]>
> ---

Acked-by: Stephen Boyd <[email protected]>

2020-03-17 02:05:29

by Peng Fan

[permalink] [raw]
Subject: RE: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M

Hi Arnd,

> Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M
>
> On Mon, Mar 16, 2020 at 7:43 AM Peng Fan <[email protected]> wrote:
> > > Subject: Re: [PATCH 3/3] soc: imx: select ARM_GIC_V3 for i.MX8M
> > >
> > > On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:
> > > >
> > > > From: Peng Fan <[email protected]>
> > > >
> > > > Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32
> > > > mode linux on aarch64 hardware. For aarch64 mode, it not hurts to
> > > > select ARM_GIC_V3.
> > > >
> > > > Signed-off-by: Peng Fan <[email protected]>
> > > > ---
> > >
> > > Acked-by: Arnd Bergmann <[email protected]>
> > >
> > > > diff --git a/drivers/soc/imx/Kconfig b/drivers/soc/imx/Kconfig
> > > > index
> > > > 70019cefa617..0b69024296d5 100644
> > > > --- a/drivers/soc/imx/Kconfig
> > > > +++ b/drivers/soc/imx/Kconfig
> > > > @@ -21,6 +21,7 @@ config SOC_IMX8M
> > > > bool "i.MX8M SoC family support"
> > > > depends on ARCH_MXC || COMPILE_TEST
> > > > default ARCH_MXC && ARM64
> > > > + select ARM_GIC_V3
> > >
> > > It would seem sensible to also drop the dependency on the 'default'
> >
> > If drop default, we need enable this config option in ARM64 defconfig,
> > I would leave it as is for now.
>
> I meant making it 'default ARCH_MXC' so it gets enabled for both 32-bit and
> 64-bit i.MX configurations, not just 64-bit.

Understand. I'll drop ARM64 and post v2 with your A-b.

Thanks,
Peng.

>
> Arnd

2020-03-25 23:24:24

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/3] pinctrl: freescale: drop the dependency on ARM64 for i.MX8M

On Fri, Mar 13, 2020 at 4:34 AM <[email protected]> wrote:

> From: Peng Fan <[email protected]>
>
> Moving to support aarch32 mode on aarch64 hardware, need to drop
> the dependency on ARM64 to make the driver could be selected for
> ARM32.
>
> Signed-off-by: Peng Fan <[email protected]>

Patch applied with Arnd's ACK.

Yours,
Linus Walleij

2020-04-14 15:58:41

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 2/3] clk: imx: drop the dependency on ARM64 for i.MX8M

On Fri, Mar 13, 2020 at 11:27:15AM +0800, [email protected] wrote:
> From: Peng Fan <[email protected]>
>
> Moving to support aarch32 mode on aarch64 hardware, need to drop
> the dependency on ARM64 to make the driver could be selected for
> ARM32.
>
> Signed-off-by: Peng Fan <[email protected]>

Applied, thanks.