mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARM: multiplatform: Sort the max gpio numbers.
@ 2013-02-03 11:24 Maxime Ripard
  2013-03-11 16:38 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2013-02-03 11:24 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson
  Cc: Russell King, linux-arm-kernel, linux-kernel

When building a multiplatform kernel, we could end up with a smaller
number of GPIOs than the one required by the platform the kernel was
running on.

Sort the max GPIO number by descending order so that we always take the
highest number required.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 arch/arm/Kconfig |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1e86fa9..852ae76 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1626,13 +1626,16 @@ config LOCAL_TIMERS
 	  accounting to be spread across the timer interval, preventing a
 	  "thundering herd" at every timer tick.
 
+# The GPIO number here must be sorted by descending number. In case of
+# a multiplatform kernel, we just want the highest value required by the
+# selected platforms.
 config ARCH_NR_GPIO
 	int
 	default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-	default 355 if ARCH_U8500
-	default 264 if MACH_H4700
 	default 512 if SOC_OMAP5
+	default 355 if ARCH_U8500
 	default 288 if ARCH_VT8500 || ARCH_SUNXI
+	default 264 if MACH_H4700
 	default 0
 	help
 	  Maximum number of GPIOs in the system.
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: multiplatform: Sort the max gpio numbers.
  2013-02-03 11:24 [PATCH] ARM: multiplatform: Sort the max gpio numbers Maxime Ripard
@ 2013-03-11 16:38 ` Russell King - ARM Linux
  2013-03-11 20:51   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2013-03-11 16:38 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Arnd Bergmann, Olof Johansson, linux-arm-kernel, linux-kernel

Arnd, Olof,

Have you merged this for -rc ?

On Sun, Feb 03, 2013 at 12:24:48PM +0100, Maxime Ripard wrote:
> When building a multiplatform kernel, we could end up with a smaller
> number of GPIOs than the one required by the platform the kernel was
> running on.
> 
> Sort the max GPIO number by descending order so that we always take the
> highest number required.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  arch/arm/Kconfig |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 1e86fa9..852ae76 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1626,13 +1626,16 @@ config LOCAL_TIMERS
>  	  accounting to be spread across the timer interval, preventing a
>  	  "thundering herd" at every timer tick.
>  
> +# The GPIO number here must be sorted by descending number. In case of
> +# a multiplatform kernel, we just want the highest value required by the
> +# selected platforms.
>  config ARCH_NR_GPIO
>  	int
>  	default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
> -	default 355 if ARCH_U8500
> -	default 264 if MACH_H4700
>  	default 512 if SOC_OMAP5
> +	default 355 if ARCH_U8500
>  	default 288 if ARCH_VT8500 || ARCH_SUNXI
> +	default 264 if MACH_H4700
>  	default 0
>  	help
>  	  Maximum number of GPIOs in the system.
> -- 
> 1.7.10.4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: multiplatform: Sort the max gpio numbers.
  2013-03-11 16:38 ` Russell King - ARM Linux
@ 2013-03-11 20:51   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2013-03-11 20:51 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Maxime Ripard, Olof Johansson, linux-arm-kernel, linux-kernel

On Monday 11 March 2013, Russell King - ARM Linux wrote:
> Arnd, Olof,
> 
> Have you merged this for -rc ?
> 

Sorry, I missed it for some reason. Applied to -fixes now.

Thanks for the reminder,

	Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-11 20:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-03 11:24 [PATCH] ARM: multiplatform: Sort the max gpio numbers Maxime Ripard
2013-03-11 16:38 ` Russell King - ARM Linux
2013-03-11 20:51   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®