linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining.
@ 2010-11-19  9:15 Marek Belisko
  2010-11-19  9:23 ` Vasily Khoruzhick
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Belisko @ 2010-11-19  9:15 UTC (permalink / raw)
  To: linux-arm-kernel

Make mini2440_defconfig. During kernel startup there is:
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register

because s3c2440 doesn't have following gpios. Gpios are
available only at upper cpu version (s3c2443).

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 arch/arm/plat-s3c24xx/gpiolib.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c
index 24c6f5a..0428a92 100644
--- a/arch/arm/plat-s3c24xx/gpiolib.c
+++ b/arch/arm/plat-s3c24xx/gpiolib.c
@@ -182,7 +182,9 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
 			.label			= "GPIOJ",
 			.ngpio			= 16,
 		},
-	}, {
+	},
+#ifdef CONFIG_CPU_S3C2443
+	{
 		.base	= S3C2443_GPKCON,
 		.pm	= __gpio_pm(&s3c_gpio_pm_2bit),
 		.chip	= {
@@ -210,6 +212,7 @@ struct s3c_gpio_chip s3c24xx_gpios[] = {
 			.ngpio			= 2,
 		},
 	},
+#endif
 };
 
 
-- 
1.7.1

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

* [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining.
  2010-11-19  9:15 [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining Marek Belisko
@ 2010-11-19  9:23 ` Vasily Khoruzhick
  2010-11-19 10:42   ` Lars-Peter Clausen
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2010-11-19  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 19 November 2010 11:15:39 Marek Belisko wrote:
> Make mini2440_defconfig. During kernel startup there is:
> gpiochip_add: gpios 288..303 (GPIOK) failed to register
> gpiochip_add: gpios 320..334 (GPIOL) failed to register
> gpiochip_add: gpios 352..353 (GPIOM) failed to register
>
> because s3c2440 doesn't have following gpios. Gpios are
> available only at upper cpu version (s3c2443).

These warnings are harmless, and your patch prevents building single binary 
kernel for all s3c24xx socs (however, it's already broken by latest pull-
up/pull-down changes)

Regards
Vasily

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

* [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining.
  2010-11-19  9:23 ` Vasily Khoruzhick
@ 2010-11-19 10:42   ` Lars-Peter Clausen
  2010-11-19 10:53     ` Vasily Khoruzhick
  0 siblings, 1 reply; 5+ messages in thread
From: Lars-Peter Clausen @ 2010-11-19 10:42 UTC (permalink / raw)
  To: linux-arm-kernel

Vasily Khoruzhick wrote:
> On Friday 19 November 2010 11:15:39 Marek Belisko wrote:
>> Make mini2440_defconfig. During kernel startup there is:
>> gpiochip_add: gpios 288..303 (GPIOK) failed to register
>> gpiochip_add: gpios 320..334 (GPIOL) failed to register
>> gpiochip_add: gpios 352..353 (GPIOM) failed to register
>>
>> because s3c2440 doesn't have following gpios. Gpios are
>> available only at upper cpu version (s3c2443).
> 
> These warnings are harmless, and your patch prevents building single binary 
> kernel for all s3c24xx socs (however, it's already broken by latest pull-
> up/pull-down changes)
> 
> Regards
> Vasily
> 

Hi

Well it actually causes problems on systems with external gpio expanders, because now
the additional banks will take up the space which was meant for the gpio expander
chip and peripherals connected to it wont be accessible.

I sent a patch[1] about this some time ago, but I guess it was never applied...

- Lars
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2010-September/026382.html

> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining.
  2010-11-19 10:42   ` Lars-Peter Clausen
@ 2010-11-19 10:53     ` Vasily Khoruzhick
  2010-11-25  7:15       ` Kukjin Kim
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2010-11-19 10:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 19 November 2010 12:42:02 Lars-Peter Clausen wrote:
> Hi
> 
> Well it actually causes problems on systems with external gpio expanders,
> because now the additional banks will take up the space which was meant
> for the gpio expander chip and peripherals connected to it wont be
> accessible.

Ok, but it would be nice to see some runtime soc-type detection for gpiolib. 
s3c2410/s3c2440/s3c2442 doesn't differ too much (actually, they're same in 
gpiopart, s3c2410 lacks some gpiobanks that s3c244[0,2] have, and difference 
in pull-up/pull-down on s3c2440 and s3c2442).
I think it's not good to make artificial restrictions for building single 
binary kernel for these socs.
 
> I sent a patch[1] about this some time ago, but I guess it was never
> applied...

Try pinging Ben or Kukjin :)

Regards
Vasily

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

* [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining.
  2010-11-19 10:53     ` Vasily Khoruzhick
@ 2010-11-25  7:15       ` Kukjin Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2010-11-25  7:15 UTC (permalink / raw)
  To: linux-arm-kernel

Vasily Khoruzhick wrote:
> 
> On Friday 19 November 2010 12:42:02 Lars-Peter Clausen wrote:
> > Hi
> >
Hi all,

> > Well it actually causes problems on systems with external gpio
expanders,
> > because now the additional banks will take up the space which was meant
> > for the gpio expander chip and peripherals connected to it wont be
> > accessible.
> 
> Ok, but it would be nice to see some runtime soc-type detection for
gpiolib.

Yeah, I agree. We need to check SoC type for it during booting...

> s3c2410/s3c2440/s3c2442 doesn't differ too much (actually, they're same in
> gpiopart, s3c2410 lacks some gpiobanks that s3c244[0,2] have, and
difference
> in pull-up/pull-down on s3c2440 and s3c2442).
> I think it's not good to make artificial restrictions for building single
> binary kernel for these socs.
> 
> > I sent a patch[1] about this some time ago, but I guess it was never
> > applied...

Maybe you missed my e-mail...or..I missed?...anyway...
Could you please re-send it so that can get the patch via e-mail?

> 
> Try pinging Ben or Kukjin :)
> 
Thanks...

Basically, I'd like to keep single binary for S3C24XX, maybe Ben also agree
with this. But also there is some side effects, i.e., according to
mach-s3c2410/Makefile.boot, zreladdr is different. But only selected
0x30108000 as zreladdr when build time because selected CONFIG_PM_H1940 with
s3c2410_defconfig if there is no changes kernel configuration. This is just
simple example. Maybe There are many similar examples.

Hmm...anyway, we need to sort it out with keeping S3C24XX single binary.
Will think some method for this...

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

end of thread, other threads:[~2010-11-25  7:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19  9:15 [PATCH] ARM: s3x24xx: Fix gpiochip_add complaining Marek Belisko
2010-11-19  9:23 ` Vasily Khoruzhick
2010-11-19 10:42   ` Lars-Peter Clausen
2010-11-19 10:53     ` Vasily Khoruzhick
2010-11-25  7:15       ` Kukjin Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).