Re: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-13 Thread Linus Walleij
On Fri, Dec 13, 2013 at 8:57 AM, Heiko Stübner he...@sntech.de wrote:

 I'm not the maintainer of s3c24xx,

Maybe you should be. I have a hard time getting the generic
Samsung maintainers' attention to S3C patches...

 but this looks nice ;-)

Do you think you can test it on hardware?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-13 Thread Heiko Stübner
Am Freitag, 13. Dezember 2013, 09:20:39 schrieb Linus Walleij:
 On Fri, Dec 13, 2013 at 8:57 AM, Heiko Stübner he...@sntech.de wrote:
  I'm not the maintainer of s3c24xx,
 
 Maybe you should be. I have a hard time getting the generic
 Samsung maintainers' attention to S3C patches...
 
  but this looks nice ;-)
 
 Do you think you can test it on hardware?

on an Openmoko Neo Freerunner (S3C2442)
Tested-by: Heiko Stuebner he...@sntech.de

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-13 Thread kgene
Heiko Stübner wrote:
 
 Am Donnerstag, 12. Dezember 2013, 15:06:50 schrieb Linus Walleij:
  This isolates the custom S3C24xx GPIO definition table to
  linux/platform_data/gpio-samsung-s3x24xx.h as this is
  used in a few different places in the kernel, removing the
  need to depend on the implicit inclusion of mach/gpio.h
  from linux/gpio.h and thus getting rid of a few nasty
  cross-dependencies.
 
  We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff.
  The biggest this can ever be for the S3C24XX is
  CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or
  CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512
  is the absolute roof value on this platform. So we set
  the size of ARCH_NR_GPIO to this and the GPIOs array will
  fit any S3C24XX platform, as per pattern from other archs.
 
  Cc: Heiko Stuebner he...@sntech.de
  Cc: Tomasz Figa tomasz.f...@gmail.com
  Cc: Sylwester Nawrocki sylvester.nawro...@gmail.com
  Cc: Ben Dooks ben-li...@fluff.org
  Cc: Kukjin Kim kgene@samsung.com

For this whole series:
Acked-by: Kukjin Kim kgene@samsung.com

  Cc: linux-samsung-soc@vger.kernel.org
  Signed-off-by: Linus Walleij linus.wall...@linaro.org
  ---
  ChangeLog v1-v2:
  - Added an #ifdef ARCH_S3C24XX around the header inclusion
in drivers/gpio/gpio-samsung.c as we would otherwise
have colliding definitions when compiling S3C64XX.
  - Rename inclusion guard in the header file.
 
  If one of the maintainers give me an ACK for this I will
  take it through the GPIO tree.
  ---
 
 I'm not the maintainer of s3c24xx, but this looks nice ;-)
 
 Acked-by: Heiko Stuebner he...@sntech.de

Linus, please take this series with my ack.

Thanks,
Kukjin

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-13 Thread Tomasz Figa
Hi Linus,

On Thursday 12 of December 2013 15:06:50 Linus Walleij wrote:
[snip]
  arch/arm/mach-s3c64xx/include/mach/gpio.h  |  93 -

Hmm, shouldn't this (and other s3c64xx-related changes) be in patch 2/2?

Anyway, I've applied both, but unfortunately compilation for mach-s3c64xx
(using s3c6400_defconfig) fails with following error:

  CC  arch/arm/plat-samsung/pm-gpio.o
In file included from arch/arm/plat-samsung/pm-gpio.c:25:0:
arch/arm/plat-samsung/include/plat/gpio-core.h:100:44: error: 'S3C_GPIO_END' 
undeclared here (not in a function)
 extern struct samsung_gpio_chip *s3c_gpios[S3C_GPIO_END];
^
scripts/Makefile.build:308: recipe for target 'arch/arm/plat-samsung/pm-gpio.o' 
failed
make[1]: *** [arch/arm/plat-samsung/pm-gpio.o] Error 1
Makefile:820: recipe for target 'arch/arm/plat-samsung' failed
make: *** [arch/arm/plat-samsung] Error 2

I don't have much time right now to look at this further, but I'll try
to do it later today (if you don't fix it before that) and do further
testing.

Best regards,
Tomasz

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-13 Thread Linus Walleij
On Fri, Dec 13, 2013 at 11:30 AM, Tomasz Figa tomasz.f...@gmail.com wrote:
 On Thursday 12 of December 2013 15:06:50 Linus Walleij wrote:
 [snip]
  arch/arm/mach-s3c64xx/include/mach/gpio.h  |  93 -

 Hmm, shouldn't this (and other s3c64xx-related changes) be in patch 2/2?

Hm yes, I wonder how I screwed this up... I'll move this to the other patch.

 Anyway, I've applied both, but unfortunately compilation for mach-s3c64xx
 (using s3c6400_defconfig) fails with following error:

Trying to reproduce and fix this.

Thanks!

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-12 Thread Linus Walleij
This isolates the custom S3C24xx GPIO definition table to
linux/platform_data/gpio-samsung-s3x24xx.h as this is
used in a few different places in the kernel, removing the
need to depend on the implicit inclusion of mach/gpio.h
from linux/gpio.h and thus getting rid of a few nasty
cross-dependencies.

We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff.
The biggest this can ever be for the S3C24XX is
CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or
CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512
is the absolute roof value on this platform. So we set
the size of ARCH_NR_GPIO to this and the GPIOs array will
fit any S3C24XX platform, as per pattern from other archs.

Cc: Heiko Stuebner he...@sntech.de
Cc: Tomasz Figa tomasz.f...@gmail.com
Cc: Sylwester Nawrocki sylvester.nawro...@gmail.com
Cc: Ben Dooks ben-li...@fluff.org
Cc: Kukjin Kim kgene@samsung.com
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
ChangeLog v1-v2:
- Added an #ifdef ARCH_S3C24XX around the header inclusion
  in drivers/gpio/gpio-samsung.c as we would otherwise
  have colliding definitions when compiling S3C64XX.
- Rename inclusion guard in the header file.

If one of the maintainers give me an ACK for this I will
take it through the GPIO tree.
---
 arch/arm/Kconfig   |   3 +-
 arch/arm/mach-s3c24xx/Kconfig  |  21 
 arch/arm/mach-s3c24xx/common-smdk.c|   2 +-
 arch/arm/mach-s3c24xx/h1940-bluetooth.c|   1 +
 arch/arm/mach-s3c24xx/include/mach/gpio.h  | 114 -
 arch/arm/mach-s3c24xx/mach-amlm5900.c  |   1 +
 arch/arm/mach-s3c24xx/mach-anubis.c|   1 +
 arch/arm/mach-s3c24xx/mach-at2440evb.c |   1 +
 arch/arm/mach-s3c24xx/mach-bast.c  |   1 +
 arch/arm/mach-s3c24xx/mach-gta02.c |   1 +
 arch/arm/mach-s3c24xx/mach-h1940.c |   1 +
 arch/arm/mach-s3c24xx/mach-jive.c  |   1 +
 arch/arm/mach-s3c24xx/mach-mini2440.c  |   1 +
 arch/arm/mach-s3c24xx/mach-n30.c   |   1 +
 arch/arm/mach-s3c24xx/mach-nexcoder.c  |   1 +
 arch/arm/mach-s3c24xx/mach-osiris.c|   1 +
 arch/arm/mach-s3c24xx/mach-qt2410.c|   1 +
 arch/arm/mach-s3c24xx/mach-rx1950.c|   1 +
 arch/arm/mach-s3c24xx/mach-rx3715.c|   1 +
 arch/arm/mach-s3c24xx/mach-smdk2413.c  |   1 +
 arch/arm/mach-s3c24xx/mach-smdk2416.c  |   1 +
 arch/arm/mach-s3c24xx/mach-vr1000.c|   1 +
 arch/arm/mach-s3c24xx/pm-s3c2410.c |   1 +
 arch/arm/mach-s3c24xx/pm.c |   1 +
 arch/arm/mach-s3c24xx/s3c2410.c|   1 +
 arch/arm/mach-s3c24xx/s3c2416.c|   1 +
 arch/arm/mach-s3c24xx/s3c2440.c|   1 +
 arch/arm/mach-s3c24xx/s3c2442.c|   1 +
 arch/arm/mach-s3c24xx/s3c2443.c|   1 +
 arch/arm/mach-s3c24xx/setup-i2c.c  |   1 +
 arch/arm/mach-s3c24xx/setup-sdhci-gpio.c   |   1 +
 arch/arm/mach-s3c24xx/setup-ts.c   |   1 +
 arch/arm/mach-s3c24xx/simtec-usb.c |   1 +
 arch/arm/mach-s3c64xx/include/mach/gpio.h  |  93 -
 arch/arm/plat-samsung/pm-gpio.c|   3 +
 arch/arm/plat-samsung/setup-camif.c|   1 +
 drivers/gpio/gpio-samsung.c|   3 +
 drivers/mmc/host/s3cmci.c  |   1 +
 include/linux/platform_data/gpio-samsung-s3c24xx.h | 106 +++
 include/linux/platform_data/gpio-samsung-s3c64xx.h |  93 +
 40 files changed, 238 insertions(+), 231 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/gpio.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/gpio.h
 create mode 100644 include/linux/platform_data/gpio-samsung-s3c24xx.h
 create mode 100644 include/linux/platform_data/gpio-samsung-s3c64xx.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c1f1a7eee953..6a26bcb3a63a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -710,7 +710,6 @@ config ARCH_S3C24XX
select HAVE_S3C2410_WATCHDOG if WATCHDOG
select HAVE_S3C_RTC if RTC_CLASS
select MULTI_IRQ_HANDLER
-   select NEED_MACH_GPIO_H
select NEED_MACH_IO_H
select SAMSUNG_ATAGS
help
@@ -1593,7 +1592,7 @@ config ARM_PSCI
 config ARCH_NR_GPIO
int
default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-   default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX
+   default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX 
|| ARCH_S3C24XX
default 392 if ARCH_U8500
default 352 if ARCH_VT8500
default 288 if ARCH_SUNXI
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 

Re: [PATCH 1/2] ARM: s3c24xx: get rid of custom mach/gpio.h

2013-12-12 Thread Heiko Stübner
Am Donnerstag, 12. Dezember 2013, 15:06:50 schrieb Linus Walleij:
 This isolates the custom S3C24xx GPIO definition table to
 linux/platform_data/gpio-samsung-s3x24xx.h as this is
 used in a few different places in the kernel, removing the
 need to depend on the implicit inclusion of mach/gpio.h
 from linux/gpio.h and thus getting rid of a few nasty
 cross-dependencies.
 
 We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff.
 The biggest this can ever be for the S3C24XX is
 CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or
 CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512
 is the absolute roof value on this platform. So we set
 the size of ARCH_NR_GPIO to this and the GPIOs array will
 fit any S3C24XX platform, as per pattern from other archs.
 
 Cc: Heiko Stuebner he...@sntech.de
 Cc: Tomasz Figa tomasz.f...@gmail.com
 Cc: Sylwester Nawrocki sylvester.nawro...@gmail.com
 Cc: Ben Dooks ben-li...@fluff.org
 Cc: Kukjin Kim kgene@samsung.com
 Cc: linux-samsung-soc@vger.kernel.org
 Signed-off-by: Linus Walleij linus.wall...@linaro.org
 ---
 ChangeLog v1-v2:
 - Added an #ifdef ARCH_S3C24XX around the header inclusion
   in drivers/gpio/gpio-samsung.c as we would otherwise
   have colliding definitions when compiling S3C64XX.
 - Rename inclusion guard in the header file.
 
 If one of the maintainers give me an ACK for this I will
 take it through the GPIO tree.
 ---

I'm not the maintainer of s3c24xx, but this looks nice ;-)

Acked-by: Heiko Stuebner he...@sntech.de

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html