2018-03-07 16:26:27

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

The top-level CONFIG_ARCH_NPCM symbol is not guarded with a
dependency, and can be selected for builds of traditional
(non-multiplatform) builds as well, where it causes a build
failure:

arch/arm/boot/Makefile:17: arch/arm/mach-npcm//Makefile.boot: No such file or directory

This moves the dependency to avoid that particular condition.

Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-npcm/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
index 6ff9df2636be..2bc6697c8d97 100644
--- a/arch/arm/mach-npcm/Kconfig
+++ b/arch/arm/mach-npcm/Kconfig
@@ -1,5 +1,5 @@
menuconfig ARCH_NPCM
- bool "Nuvoton NPCM Architecture"
+ bool "Nuvoton NPCM Architecture" if ARCH_MULTI_V7
select ARCH_REQUIRE_GPIOLIB
select USE_OF
select PINCTRL
@@ -10,7 +10,7 @@ if ARCH_NPCM
comment "NPCM7XX CPU type"

config ARCH_NPCM750
- depends on ARCH_NPCM && ARCH_MULTI_V7
+ depends on ARCH_NPCM
bool "Support for NPCM750 BMC CPU (Poleg)"
select CACHE_L2X0
select CPU_V7
--
2.9.0



2018-03-07 16:26:44

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

While looking at the build regression, I noticed that the
platform selects a lot of other Kconfig symbols that it really
should not:

CPU_V7, ARM_GIC, HAVE_SMP, COMMON_CLK, GENERIC_CLOCKEVENTS,
and CLKDEV_LOOKUP are all implied by ARCH_MULTI_V7, so they
can be dropped.

CACHE_L2X0, SMP and USB are meant to be user-selectable, we
want to be able to turn those off for testing purposes.

CPU_USE_DOMAINS looks completely misplaced here, we should not
select that for an ARMv7 platform.

Signed-off-by: Arnd Bergmann <[email protected]>
---
arch/arm/mach-npcm/Kconfig | 18 ------------------
1 file changed, 18 deletions(-)

diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
index 2bc6697c8d97..c6a16230e8ef 100644
--- a/arch/arm/mach-npcm/Kconfig
+++ b/arch/arm/mach-npcm/Kconfig
@@ -12,12 +12,6 @@ comment "NPCM7XX CPU type"
config ARCH_NPCM750
depends on ARCH_NPCM
bool "Support for NPCM750 BMC CPU (Poleg)"
- select CACHE_L2X0
- select CPU_V7
- select ARM_GIC
- select HAVE_SMP
- select SMP
- select SMP_ON_UP
select HAVE_ARM_SCU
select HAVE_ARM_TWD if SMP
select ARM_ERRATA_720789
@@ -26,18 +20,6 @@ config ARCH_NPCM750
select ARM_ERRATA_794072
select PL310_ERRATA_588369
select PL310_ERRATA_727915
- select USB_EHCI_ROOT_HUB_TT
- select USB_ARCH_HAS_HCD
- select USB_ARCH_HAS_EHCI
- select USB_EHCI_HCD
- select USB_ARCH_HAS_OHCI
- select USB_OHCI_HCD
- select USB
- select FIQ
- select CPU_USE_DOMAINS
- select GENERIC_CLOCKEVENTS
- select CLKDEV_LOOKUP
- select COMMON_CLK if OF
select NPCM750_TIMER
select MFD_SYSCON
help
--
2.9.0


2018-03-08 02:13:44

by Joel Stanley

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

On Thu, Mar 8, 2018 at 2:54 AM, Arnd Bergmann <[email protected]> wrote:
> While looking at the build regression, I noticed that the
> platform selects a lot of other Kconfig symbols that it really
> should not:
>
> CPU_V7, ARM_GIC, HAVE_SMP, COMMON_CLK, GENERIC_CLOCKEVENTS,
> and CLKDEV_LOOKUP are all implied by ARCH_MULTI_V7, so they
> can be dropped.
>
> CACHE_L2X0, SMP and USB are meant to be user-selectable, we
> want to be able to turn those off for testing purposes.
>
> CPU_USE_DOMAINS looks completely misplaced here, we should not
> select that for an ARMv7 platform.
>
> Signed-off-by: Arnd Bergmann <[email protected]>

I had a similar patch queued for sending out. Thanks Arnd.

Acked-by: Joel Stanley <[email protected]>

Cheers,

Joel

> ---
> arch/arm/mach-npcm/Kconfig | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
> index 2bc6697c8d97..c6a16230e8ef 100644
> --- a/arch/arm/mach-npcm/Kconfig
> +++ b/arch/arm/mach-npcm/Kconfig
> @@ -12,12 +12,6 @@ comment "NPCM7XX CPU type"
> config ARCH_NPCM750
> depends on ARCH_NPCM
> bool "Support for NPCM750 BMC CPU (Poleg)"
> - select CACHE_L2X0
> - select CPU_V7
> - select ARM_GIC
> - select HAVE_SMP
> - select SMP
> - select SMP_ON_UP
> select HAVE_ARM_SCU
> select HAVE_ARM_TWD if SMP
> select ARM_ERRATA_720789
> @@ -26,18 +20,6 @@ config ARCH_NPCM750
> select ARM_ERRATA_794072
> select PL310_ERRATA_588369
> select PL310_ERRATA_727915
> - select USB_EHCI_ROOT_HUB_TT
> - select USB_ARCH_HAS_HCD
> - select USB_ARCH_HAS_EHCI
> - select USB_EHCI_HCD
> - select USB_ARCH_HAS_OHCI
> - select USB_OHCI_HCD
> - select USB
> - select FIQ
> - select CPU_USE_DOMAINS
> - select GENERIC_CLOCKEVENTS
> - select CLKDEV_LOOKUP
> - select COMMON_CLK if OF
> select NPCM750_TIMER
> select MFD_SYSCON
> help
> --
> 2.9.0
>

2018-03-08 10:47:35

by Avi Fishman

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

So at least replace CACHE_L2X0 with MIGHT_HAVE_CACHE_L2X0 then
CACHE_L2X0 will be selected by default and user can still remove it.

On Thu, Mar 8, 2018 at 4:12 AM, Joel Stanley <[email protected]> wrote:
> On Thu, Mar 8, 2018 at 2:54 AM, Arnd Bergmann <[email protected]> wrote:
>> While looking at the build regression, I noticed that the
>> platform selects a lot of other Kconfig symbols that it really
>> should not:
>>
>> CPU_V7, ARM_GIC, HAVE_SMP, COMMON_CLK, GENERIC_CLOCKEVENTS,
>> and CLKDEV_LOOKUP are all implied by ARCH_MULTI_V7, so they
>> can be dropped.
>>
>> CACHE_L2X0, SMP and USB are meant to be user-selectable, we
>> want to be able to turn those off for testing purposes.
>>
>> CPU_USE_DOMAINS looks completely misplaced here, we should not
>> select that for an ARMv7 platform.
>>
>> Signed-off-by: Arnd Bergmann <[email protected]>
>
> I had a similar patch queued for sending out. Thanks Arnd.
>
> Acked-by: Joel Stanley <[email protected]>
>
> Cheers,
>
> Joel
>
>> ---
>> arch/arm/mach-npcm/Kconfig | 18 ------------------
>> 1 file changed, 18 deletions(-)
>>
>> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
>> index 2bc6697c8d97..c6a16230e8ef 100644
>> --- a/arch/arm/mach-npcm/Kconfig
>> +++ b/arch/arm/mach-npcm/Kconfig
>> @@ -12,12 +12,6 @@ comment "NPCM7XX CPU type"
>> config ARCH_NPCM750
>> depends on ARCH_NPCM
>> bool "Support for NPCM750 BMC CPU (Poleg)"
>> - select CACHE_L2X0
>> - select CPU_V7
>> - select ARM_GIC
>> - select HAVE_SMP
>> - select SMP
>> - select SMP_ON_UP
>> select HAVE_ARM_SCU
>> select HAVE_ARM_TWD if SMP
>> select ARM_ERRATA_720789
>> @@ -26,18 +20,6 @@ config ARCH_NPCM750
>> select ARM_ERRATA_794072
>> select PL310_ERRATA_588369
>> select PL310_ERRATA_727915
>> - select USB_EHCI_ROOT_HUB_TT
>> - select USB_ARCH_HAS_HCD
>> - select USB_ARCH_HAS_EHCI
>> - select USB_EHCI_HCD
>> - select USB_ARCH_HAS_OHCI
>> - select USB_OHCI_HCD
>> - select USB
>> - select FIQ
>> - select CPU_USE_DOMAINS
>> - select GENERIC_CLOCKEVENTS
>> - select CLKDEV_LOOKUP
>> - select COMMON_CLK if OF
>> select NPCM750_TIMER
>> select MFD_SYSCON
>> help
>> --
>> 2.9.0
>>

2018-03-08 10:52:55

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

On Thu, Mar 8, 2018 at 11:46 AM, Avi Fishman <[email protected]> wrote:
> So at least replace CACHE_L2X0 with MIGHT_HAVE_CACHE_L2X0 then
> CACHE_L2X0 will be selected by default and user can still remove it.

I looked at the other platforms for this one again, and found that most simply
select CONFIG_CACHE_L2X0 directly, so we probably want the same here
after all.

The ones that use MIGHT_HAVE_CACHE_L2X0 are the platforms
that have multiple SoCs in one family, and only some of them have an
L2X0. Is that the case here as well? Usually, the L2X0 is used with
Cortex-A9 and A5, rarely on older cores, and never on newer
ones.

Arnd

2018-03-09 02:13:12

by Brendan Higgins

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

On Wed, Mar 7, 2018 at 8:24 AM Arnd Bergmann <[email protected]> wrote:

> The top-level CONFIG_ARCH_NPCM symbol is not guarded with a
> dependency, and can be selected for builds of traditional
> (non-multiplatform) builds as well, where it causes a build
> failure:

> arch/arm/boot/Makefile:17: arch/arm/mach-npcm//Makefile.boot: No such
file or directory

> This moves the dependency to avoid that particular condition.

> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/mach-npcm/Kconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
> index 6ff9df2636be..2bc6697c8d97 100644
> --- a/arch/arm/mach-npcm/Kconfig
> +++ b/arch/arm/mach-npcm/Kconfig
> @@ -1,5 +1,5 @@
> menuconfig ARCH_NPCM
> - bool "Nuvoton NPCM Architecture"
> + bool "Nuvoton NPCM Architecture" if ARCH_MULTI_V7
> select ARCH_REQUIRE_GPIOLIB
> select USE_OF
> select PINCTRL
> @@ -10,7 +10,7 @@ if ARCH_NPCM
> comment "NPCM7XX CPU type"

> config ARCH_NPCM750
> - depends on ARCH_NPCM && ARCH_MULTI_V7
> + depends on ARCH_NPCM
> bool "Support for NPCM750 BMC CPU (Poleg)"
> select CACHE_L2X0
> select CPU_V7
> --
> 2.9.0


Reviewed-by: Brendan Higgins <[email protected]>

Thanks!

2018-03-12 10:18:00

by Tomer Maimon

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

Hi Amd,

Sorry for the delayed reply,

the NPCM7xx is a family of BMC's that include NPCM750, NPCM730 and more

All of the NPCM7xx BMC's have the same basic modules like Cortex-A9,
WDT, timers and more

can we reflacte the NPCM7xx as follow in the Kconfig:

menuconfig ARCH_NPCM
bool "Nuvoton NPCM Architecture"
depends on ARCH_MULTI_V7
select USE_OF
select PINCTRL

if ARCH_NPCM

config ARCH_NPCM7XX
bool "Support for NPCM7xx BMC (Poleg)"
depends on ARCH_MULTI_V7
select HAVE_ARM_SCU
select PINCTRL_NPCM7XX
select NPCM7XX_TIMER
select ARCH_REQUIRE_GPIOLIB
select ARM_GIC
select ARM_ERRATA_720789
select ARM_ERRATA_754322
select ARM_ERRATA_794072
select PL310_ERRATA_588369
select PL310_ERRATA_727915
select MFD_SYSCON
help
General support for NPCM7xx BMC (Poleg).

Nuvoton NPCM7xx BMC based on the Cortex A9.

if ARCH_NPCM7XX

config ARCH_NPCM750
bool "NPCM750 BMC support with Device Tree"
select HAVE_ARM_TWD if SMP
help
General support for NPCM750 BMC (Poleg).

Nuvoton NPCM750 BMC based on the Cortex A9.

config ARCH_NPCM730
bool "NPCM730 BMC support with Device Tree"
select HAVE_ARM_TWD if SMP
select ARM_ERRATA_764369 if SMP
help
General support for NPCM730 BMC (Poleg).

Nuvoton NPCM730 BMC based on the Cortex A9.

endif #ARCH_NPCM7XX

endif

On 7 March 2018 at 18:24, Arnd Bergmann <[email protected]> wrote:
> While looking at the build regression, I noticed that the
> platform selects a lot of other Kconfig symbols that it really
> should not:
>
> CPU_V7, ARM_GIC, HAVE_SMP, COMMON_CLK, GENERIC_CLOCKEVENTS,
> and CLKDEV_LOOKUP are all implied by ARCH_MULTI_V7, so they
> can be dropped.
>
> CACHE_L2X0, SMP and USB are meant to be user-selectable, we
> want to be able to turn those off for testing purposes.
>
> CPU_USE_DOMAINS looks completely misplaced here, we should not
> select that for an ARMv7 platform.
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> arch/arm/mach-npcm/Kconfig | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
> index 2bc6697c8d97..c6a16230e8ef 100644
> --- a/arch/arm/mach-npcm/Kconfig
> +++ b/arch/arm/mach-npcm/Kconfig
> @@ -12,12 +12,6 @@ comment "NPCM7XX CPU type"
> config ARCH_NPCM750
> depends on ARCH_NPCM
> bool "Support for NPCM750 BMC CPU (Poleg)"
> - select CACHE_L2X0
> - select CPU_V7
> - select ARM_GIC
> - select HAVE_SMP
> - select SMP
> - select SMP_ON_UP
> select HAVE_ARM_SCU
> select HAVE_ARM_TWD if SMP
> select ARM_ERRATA_720789
> @@ -26,18 +20,6 @@ config ARCH_NPCM750
> select ARM_ERRATA_794072
> select PL310_ERRATA_588369
> select PL310_ERRATA_727915
> - select USB_EHCI_ROOT_HUB_TT
> - select USB_ARCH_HAS_HCD
> - select USB_ARCH_HAS_EHCI
> - select USB_EHCI_HCD
> - select USB_ARCH_HAS_OHCI
> - select USB_OHCI_HCD
> - select USB
> - select FIQ
> - select CPU_USE_DOMAINS
> - select GENERIC_CLOCKEVENTS
> - select CLKDEV_LOOKUP
> - select COMMON_CLK if OF
> select NPCM750_TIMER
> select MFD_SYSCON
> help
> --
> 2.9.0
>

2018-03-12 11:44:32

by Tomer Maimon

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

Hi Arnd,

Please discard my previous mail, (I have more things to ask... please
read this mail)

Sorry for the delayed reply,

Before entering the long mail (sorry about it) just a technical thing
I think we should add ARM_GIC configuration, It is not implied in ARCH_MULTI_V7.

Now for the real story :-)

The NPCM7xx is a family of BMC's that include NPCM750, NPCM730 and more

All of the NPCM7xx BMC's have the same basic modules like Cortex-A9,
WDT, timers, etc - must included shared modules, and there are a
optional modules that can be added (for example the USB is not in
NPCM730)
so the additional optional modules give us the differences between the
NPCM7xx BMC's

I will like to use the same method that SPEAR using
(arch/arm/mach-spear/Kconfig)

can we reflacte the NPCM7xx as follow in the Kconfig:

menuconfig ARCH_NPCM
bool "Nuvoton NPCM Architecture"
depends on ARCH_MULTI_V7
select USE_OF
select PINCTRL

if ARCH_NPCM

config ARCH_NPCM7XX
bool "Support for NPCM7xx BMC (Poleg)"
depends on ARCH_MULTI_V7
select CACHE_L2X0
select PINCTRL_NPCM7XX
select NPCM7XX_TIMER
select ARCH_REQUIRE_GPIOLIB
select ARM_GIC
select ARM_ERRATA_720789
select ARM_ERRATA_754322
select ARM_ERRATA_794072
select PL310_ERRATA_588369
select PL310_ERRATA_727915
select MFD_SYSCON
help
General support for NPCM7xx BMC (Poleg).

Nuvoton NPCM7xx BMC based on the Cortex A9.

if ARCH_NPCM7XX

config ARCH_NPCM750
bool "NPCM750 BMC support with Device Tree"
select HAVE_ARM_TWD if SMP
select HAVE_ARM_SCU if SMP
select ARM_ERRATA_764369 if SMP
help
General support for NPCM750 BMC (Poleg).

Nuvoton NPCM750 BMC based on the Cortex A9.

config ARCH_NPCM730
bool "NPCM730 BMC support with Device Tree"
select HAVE_ARM_TWD if SMP
select HAVE_ARM_SCU if SMP
select ARM_ERRATA_764369 if SMP
help
General support for NPCM730 BMC (Poleg).

Nuvoton NPCM730 BMC based on the Cortex A9.

endif #ARCH_NPCM7XX

endif

if we use the above approach can we unite the two sections into one
(since they are the same) as follows:

config ARCH_NPCM750_NPCM730
bool "NPCM750 or NPCM730 BMC support with Device Tree"
select HAVE_ARM_TWD if SMP
select HAVE_ARM_SCU if SMP
select ARM_ERRATA_764369 if SMP
help
General support for NPCM750 or NPCM730 BMC (Poleg).

Nuvoton NPCM750 or NPCM730 BMC based on the Cortex A9.

or even better include it in ARCH_NPCM7XX and remove the ARCH_NPCM750
and ARCH_NPCM730?

Regarding another matter, defconfig file:
We would like to consult how to describe the various chips (e.g.
NPCM750, NPCM730) in the defconfig file.
One option is to include all modules (as included in NPCM750 chip,
which is a superset chip) and all the chips.
The we call it npcm7xx_defconfig (same as spear13xx_deconfig) .
In this option customers of NPCM730 will need to manually undef
non-existing modules.

Another option is to create different defconfig files for each chip of
this NPCM7xx family, e.g. npcm750_defconfig and npcm730_defconfig.

Which approach should be adopt ? We will appreciate your advise.

Thanks a lot,

Tomer

On 12 March 2018 at 12:16, Tomer Maimon <[email protected]> wrote:
> Hi Amd,
>
> Sorry for the delayed reply,
>
> the NPCM7xx is a family of BMC's that include NPCM750, NPCM730 and more
>
> All of the NPCM7xx BMC's have the same basic modules like Cortex-A9,
> WDT, timers and more
>
> can we reflacte the NPCM7xx as follow in the Kconfig:
>
> menuconfig ARCH_NPCM
> bool "Nuvoton NPCM Architecture"
> depends on ARCH_MULTI_V7
> select USE_OF
> select PINCTRL
>
> if ARCH_NPCM
>
> config ARCH_NPCM7XX
> bool "Support for NPCM7xx BMC (Poleg)"
> depends on ARCH_MULTI_V7
> select HAVE_ARM_SCU
> select PINCTRL_NPCM7XX
> select NPCM7XX_TIMER
> select ARCH_REQUIRE_GPIOLIB
> select ARM_GIC
> select ARM_ERRATA_720789
> select ARM_ERRATA_754322
> select ARM_ERRATA_794072
> select PL310_ERRATA_588369
> select PL310_ERRATA_727915
> select MFD_SYSCON
> help
> General support for NPCM7xx BMC (Poleg).
>
> Nuvoton NPCM7xx BMC based on the Cortex A9.
>
> if ARCH_NPCM7XX
>
> config ARCH_NPCM750
> bool "NPCM750 BMC support with Device Tree"
> select HAVE_ARM_TWD if SMP
> help
> General support for NPCM750 BMC (Poleg).
>
> Nuvoton NPCM750 BMC based on the Cortex A9.
>
> config ARCH_NPCM730
> bool "NPCM730 BMC support with Device Tree"
> select HAVE_ARM_TWD if SMP
> select ARM_ERRATA_764369 if SMP
> help
> General support for NPCM730 BMC (Poleg).
>
> Nuvoton NPCM730 BMC based on the Cortex A9.
>
> endif #ARCH_NPCM7XX
>
> endif
>
> On 7 March 2018 at 18:24, Arnd Bergmann <[email protected]> wrote:
>> While looking at the build regression, I noticed that the
>> platform selects a lot of other Kconfig symbols that it really
>> should not:
>>
>> CPU_V7, ARM_GIC, HAVE_SMP, COMMON_CLK, GENERIC_CLOCKEVENTS,
>> and CLKDEV_LOOKUP are all implied by ARCH_MULTI_V7, so they
>> can be dropped.
>>
>> CACHE_L2X0, SMP and USB are meant to be user-selectable, we
>> want to be able to turn those off for testing purposes.
>>
>> CPU_USE_DOMAINS looks completely misplaced here, we should not
>> select that for an ARMv7 platform.
>>
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> ---
>> arch/arm/mach-npcm/Kconfig | 18 ------------------
>> 1 file changed, 18 deletions(-)
>>
>> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
>> index 2bc6697c8d97..c6a16230e8ef 100644
>> --- a/arch/arm/mach-npcm/Kconfig
>> +++ b/arch/arm/mach-npcm/Kconfig
>> @@ -12,12 +12,6 @@ comment "NPCM7XX CPU type"
>> config ARCH_NPCM750
>> depends on ARCH_NPCM
>> bool "Support for NPCM750 BMC CPU (Poleg)"
>> - select CACHE_L2X0
>> - select CPU_V7
>> - select ARM_GIC
>> - select HAVE_SMP
>> - select SMP
>> - select SMP_ON_UP
>> select HAVE_ARM_SCU
>> select HAVE_ARM_TWD if SMP
>> select ARM_ERRATA_720789
>> @@ -26,18 +20,6 @@ config ARCH_NPCM750
>> select ARM_ERRATA_794072
>> select PL310_ERRATA_588369
>> select PL310_ERRATA_727915
>> - select USB_EHCI_ROOT_HUB_TT
>> - select USB_ARCH_HAS_HCD
>> - select USB_ARCH_HAS_EHCI
>> - select USB_EHCI_HCD
>> - select USB_ARCH_HAS_OHCI
>> - select USB_OHCI_HCD
>> - select USB
>> - select FIQ
>> - select CPU_USE_DOMAINS
>> - select GENERIC_CLOCKEVENTS
>> - select CLKDEV_LOOKUP
>> - select COMMON_CLK if OF
>> select NPCM750_TIMER
>> select MFD_SYSCON
>> help
>> --
>> 2.9.0
>>

2018-03-12 12:45:31

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: npcm: drop extraneous 'select' statements

On Mon, Mar 12, 2018 at 12:43 PM, Tomer Maimon <[email protected]> wrote:
> Before entering the long mail (sorry about it) just a technical thing
> I think we should add ARM_GIC configuration, It is not implied in ARCH_MULTI_V7.

Yes, you are right.

> Now for the real story :-)
>
> The NPCM7xx is a family of BMC's that include NPCM750, NPCM730 and more
>
> All of the NPCM7xx BMC's have the same basic modules like Cortex-A9,
> WDT, timers, etc - must included shared modules, and there are a
> optional modules that can be added (for example the USB is not in
> NPCM730)
> so the additional optional modules give us the differences between the
> NPCM7xx BMC's
>
> I will like to use the same method that SPEAR using
> (arch/arm/mach-spear/Kconfig)
>
> can we reflacte the NPCM7xx as follow in the Kconfig:
>
> menuconfig ARCH_NPCM
> bool "Nuvoton NPCM Architecture"
> depends on ARCH_MULTI_V7
> select USE_OF
> select PINCTRL

selecting pinctrl is fine, USE_OF is implied.

> if ARCH_NPCM
>
> config ARCH_NPCM7XX
> bool "Support for NPCM7xx BMC (Poleg)"
> depends on ARCH_MULTI_V7
> select CACHE_L2X0
> select PINCTRL_NPCM7XX
> select NPCM7XX_TIMER
> select ARCH_REQUIRE_GPIOLIB
> select ARM_GIC
> select ARM_ERRATA_720789
> select ARM_ERRATA_754322
> select ARM_ERRATA_794072
> select PL310_ERRATA_588369
> select PL310_ERRATA_727915
> select MFD_SYSCON
> help
> General support for NPCM7xx BMC (Poleg).
>
> Nuvoton NPCM7xx BMC based on the Cortex A9.

This seems fine.

> config ARCH_NPCM750_NPCM730
> bool "NPCM750 or NPCM730 BMC support with Device Tree"
> select HAVE_ARM_TWD if SMP
> select HAVE_ARM_SCU if SMP
> select ARM_ERRATA_764369 if SMP
> help
> General support for NPCM750 or NPCM730 BMC (Poleg).
>
> Nuvoton NPCM750 or NPCM730 BMC based on the Cortex A9.
>
> or even better include it in ARCH_NPCM7XX and remove the ARCH_NPCM750
> and ARCH_NPCM730?

Yes, I think that would be best.

> Regarding another matter, defconfig file:
> We would like to consult how to describe the various chips (e.g.
> NPCM750, NPCM730) in the defconfig file.
> One option is to include all modules (as included in NPCM750 chip,
> which is a superset chip) and all the chips.
> The we call it npcm7xx_defconfig (same as spear13xx_deconfig) .
> In this option customers of NPCM730 will need to manually undef
> non-existing modules.
>
> Another option is to create different defconfig files for each chip of
> this NPCM7xx family, e.g. npcm750_defconfig and npcm730_defconfig.
>
> Which approach should be adopt ? We will appreciate your advise.

We don't want one defconfig per chip. Some platform maintainers
don't have any defconfig for their platforms at all, but simply rely
on multi_v7_defconfig for testing, which is fine as well. If you have
an extra defconfig file, make sure to always update both your
own file and the multi_v7_defconfig together when you add a new
driver that should be enabled.

For multi_v7_defconfig, make all non-essential drivers loadable
modules.

Arnd

2018-03-12 13:29:45

by Tomer Maimon

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

Hi Brendan,

According to the last mail I have with Arnd can you modify the Kconfig
as follow:

+menuconfig ARCH_NPCM
+ bool "Nuvoton NPCM Architecture"
+ depends on ARCH_MULTI_V7
+ select PINCTRL
+
+if ARCH_NPCM
+
+config ARCH_NPCM7XX
+ bool "Support for NPCM7xx BMC (Poleg)"
+ depends on ARCH_MULTI_V7
+ select PINCTRL_NPCM7XX
+ select NPCM7XX_TIMER
+ select ARCH_REQUIRE_GPIOLIB
+ select CACHE_L2X0
+ select ARM_GIC
+ select HAVE_ARM_TWD if SMP
+ select HAVE_ARM_SCU if SMP
+ select ARM_ERRATA_764369 if SMP
+ select ARM_ERRATA_720789
+ select ARM_ERRATA_754322
+ select ARM_ERRATA_794072
+ select PL310_ERRATA_588369
+ select PL310_ERRATA_727915
+ select MFD_SYSCON
+ help
+ General support for NPCM7xx BMC (Poleg).
+
+ Nuvoton NPCM7xx BMC based on the Cortex A9.
+
+endif

Thanks!

Tomer

On 9 March 2018 at 04:08, Brendan Higgins <[email protected]> wrote:
> On Wed, Mar 7, 2018 at 8:24 AM Arnd Bergmann <[email protected]> wrote:
>
>> The top-level CONFIG_ARCH_NPCM symbol is not guarded with a
>> dependency, and can be selected for builds of traditional
>> (non-multiplatform) builds as well, where it causes a build
>> failure:
>
>> arch/arm/boot/Makefile:17: arch/arm/mach-npcm//Makefile.boot: No such
> file or directory
>
>> This moves the dependency to avoid that particular condition.
>
>> Signed-off-by: Arnd Bergmann <[email protected]>
>> ---
>> arch/arm/mach-npcm/Kconfig | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>> diff --git a/arch/arm/mach-npcm/Kconfig b/arch/arm/mach-npcm/Kconfig
>> index 6ff9df2636be..2bc6697c8d97 100644
>> --- a/arch/arm/mach-npcm/Kconfig
>> +++ b/arch/arm/mach-npcm/Kconfig
>> @@ -1,5 +1,5 @@
>> menuconfig ARCH_NPCM
>> - bool "Nuvoton NPCM Architecture"
>> + bool "Nuvoton NPCM Architecture" if ARCH_MULTI_V7
>> select ARCH_REQUIRE_GPIOLIB
>> select USE_OF
>> select PINCTRL
>> @@ -10,7 +10,7 @@ if ARCH_NPCM
>> comment "NPCM7XX CPU type"
>
>> config ARCH_NPCM750
>> - depends on ARCH_NPCM && ARCH_MULTI_V7
>> + depends on ARCH_NPCM
>> bool "Support for NPCM750 BMC CPU (Poleg)"
>> select CACHE_L2X0
>> select CPU_V7
>> --
>> 2.9.0
>
>
> Reviewed-by: Brendan Higgins <[email protected]>
>
> Thanks!

2018-03-12 13:38:41

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

On Mon, Mar 12, 2018 at 2:28 PM, Tomer Maimon <[email protected]> wrote:
> Hi Brendan,
>
> According to the last mail I have with Arnd can you modify the Kconfig
> as follow:
>
> +menuconfig ARCH_NPCM
> + bool "Nuvoton NPCM Architecture"
> + depends on ARCH_MULTI_V7
> + select PINCTRL
> +
> +if ARCH_NPCM
> +
> +config ARCH_NPCM7XX
> + bool "Support for NPCM7xx BMC (Poleg)"
> + depends on ARCH_MULTI_V7
> + select PINCTRL_NPCM7XX
> + select NPCM7XX_TIMER
> + select ARCH_REQUIRE_GPIOLIB
> + select CACHE_L2X0
> + select ARM_GIC
> + select HAVE_ARM_TWD if SMP
> + select HAVE_ARM_SCU if SMP
> + select ARM_ERRATA_764369 if SMP
> + select ARM_ERRATA_720789
> + select ARM_ERRATA_754322
> + select ARM_ERRATA_794072
> + select PL310_ERRATA_588369
> + select PL310_ERRATA_727915
> + select MFD_SYSCON
> + help
> + General support for NPCM7xx BMC (Poleg).
> +
> + Nuvoton NPCM7xx BMC based on the Cortex A9.
> +
> +endif

One more change is needed to avoid a link error without CONFIG_SMP:

diff --git a/arch/arm/mach-npcm/Makefile b/arch/arm/mach-npcm/Makefile
index c7a1316d27c1..34d51f9f207c 100644
--- a/arch/arm/mach-npcm/Makefile
+++ b/arch/arm/mach-npcm/Makefile
@@ -1,3 +1,4 @@
AFLAGS_headsmp.o += -march=armv7-a

-obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o platsmp.o headsmp.o
+obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o
+obj-$(CONFIG_SMP) += platsmp.o headsmp.o

Can one of you send me a pull request or the full patch series on top
of the version I have in arm-soc?

Arnd

2018-03-12 15:17:07

by Tomer Maimon

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

Hi Arnd,

I will send tomorrow new version with some modification we need to do
once we use NPCM7XX and not NPCM750.

Brendan,

Is it O.K.?



On 12 March 2018 at 15:37, Arnd Bergmann <[email protected]> wrote:
> On Mon, Mar 12, 2018 at 2:28 PM, Tomer Maimon <[email protected]> wrote:
>> Hi Brendan,
>>
>> According to the last mail I have with Arnd can you modify the Kconfig
>> as follow:
>>
>> +menuconfig ARCH_NPCM
>> + bool "Nuvoton NPCM Architecture"
>> + depends on ARCH_MULTI_V7
>> + select PINCTRL
>> +
>> +if ARCH_NPCM
>> +
>> +config ARCH_NPCM7XX
>> + bool "Support for NPCM7xx BMC (Poleg)"
>> + depends on ARCH_MULTI_V7
>> + select PINCTRL_NPCM7XX
>> + select NPCM7XX_TIMER
>> + select ARCH_REQUIRE_GPIOLIB
>> + select CACHE_L2X0
>> + select ARM_GIC
>> + select HAVE_ARM_TWD if SMP
>> + select HAVE_ARM_SCU if SMP
>> + select ARM_ERRATA_764369 if SMP
>> + select ARM_ERRATA_720789
>> + select ARM_ERRATA_754322
>> + select ARM_ERRATA_794072
>> + select PL310_ERRATA_588369
>> + select PL310_ERRATA_727915
>> + select MFD_SYSCON
>> + help
>> + General support for NPCM7xx BMC (Poleg).
>> +
>> + Nuvoton NPCM7xx BMC based on the Cortex A9.
>> +
>> +endif
>
> One more change is needed to avoid a link error without CONFIG_SMP:
>
> diff --git a/arch/arm/mach-npcm/Makefile b/arch/arm/mach-npcm/Makefile
> index c7a1316d27c1..34d51f9f207c 100644
> --- a/arch/arm/mach-npcm/Makefile
> +++ b/arch/arm/mach-npcm/Makefile
> @@ -1,3 +1,4 @@
> AFLAGS_headsmp.o += -march=armv7-a
>
> -obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o platsmp.o headsmp.o
> +obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o
> +obj-$(CONFIG_SMP) += platsmp.o headsmp.o
>
> Can one of you send me a pull request or the full patch series on top
> of the version I have in arm-soc?
>
> Arnd

2018-03-13 13:37:28

by Tomer Maimon

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

Hi Arnd,

I sent now Full patch for the NPCM BMC's V12,

Is it O.K.? or do you want me to send the same patch to ARM: npcm:
drop extraneous 'select' statements as well?

Thanks

Tomer


On 12 March 2018 at 17:15, Tomer Maimon <[email protected]> wrote:
> Hi Arnd,
>
> I will send tomorrow new version with some modification we need to do
> once we use NPCM7XX and not NPCM750.
>
> Brendan,
>
> Is it O.K.?
>
>
>
> On 12 March 2018 at 15:37, Arnd Bergmann <[email protected]> wrote:
>> On Mon, Mar 12, 2018 at 2:28 PM, Tomer Maimon <[email protected]> wrote:
>>> Hi Brendan,
>>>
>>> According to the last mail I have with Arnd can you modify the Kconfig
>>> as follow:
>>>
>>> +menuconfig ARCH_NPCM
>>> + bool "Nuvoton NPCM Architecture"
>>> + depends on ARCH_MULTI_V7
>>> + select PINCTRL
>>> +
>>> +if ARCH_NPCM
>>> +
>>> +config ARCH_NPCM7XX
>>> + bool "Support for NPCM7xx BMC (Poleg)"
>>> + depends on ARCH_MULTI_V7
>>> + select PINCTRL_NPCM7XX
>>> + select NPCM7XX_TIMER
>>> + select ARCH_REQUIRE_GPIOLIB
>>> + select CACHE_L2X0
>>> + select ARM_GIC
>>> + select HAVE_ARM_TWD if SMP
>>> + select HAVE_ARM_SCU if SMP
>>> + select ARM_ERRATA_764369 if SMP
>>> + select ARM_ERRATA_720789
>>> + select ARM_ERRATA_754322
>>> + select ARM_ERRATA_794072
>>> + select PL310_ERRATA_588369
>>> + select PL310_ERRATA_727915
>>> + select MFD_SYSCON
>>> + help
>>> + General support for NPCM7xx BMC (Poleg).
>>> +
>>> + Nuvoton NPCM7xx BMC based on the Cortex A9.
>>> +
>>> +endif
>>
>> One more change is needed to avoid a link error without CONFIG_SMP:
>>
>> diff --git a/arch/arm/mach-npcm/Makefile b/arch/arm/mach-npcm/Makefile
>> index c7a1316d27c1..34d51f9f207c 100644
>> --- a/arch/arm/mach-npcm/Makefile
>> +++ b/arch/arm/mach-npcm/Makefile
>> @@ -1,3 +1,4 @@
>> AFLAGS_headsmp.o += -march=armv7-a
>>
>> -obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o platsmp.o headsmp.o
>> +obj-$(CONFIG_ARCH_NPCM750) += npcm7xx.o
>> +obj-$(CONFIG_SMP) += platsmp.o headsmp.o
>>
>> Can one of you send me a pull request or the full patch series on top
>> of the version I have in arm-soc?
>>
>> Arnd

2018-03-13 16:25:20

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: npcm: add CONFIG_ARCH_MULTI_V7 dependency

On Tue, Mar 13, 2018 at 2:35 PM, Tomer Maimon <[email protected]> wrote:
> Hi Arnd,
>
> I sent now Full patch for the NPCM BMC's V12,
>
> Is it O.K.? or do you want me to send the same patch to ARM: npcm:
> drop extraneous 'select' statements as well?

The patch series you just sent contains a new version of the patches
I already applied. What I need instead is a patch series that
does the changes on top, since I don't rebase the my next/* branches.

Arnd