linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dron0gus@gmail.com (Gusakov Andrey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] S3C: fix order of MACH_S3C* checks on GPIO count define
Date: Thu, 29 Dec 2011 17:07:14 +0400	[thread overview]
Message-ID: <1325164036-15638-1-git-send-email-dron0gus@gmail.com> (raw)

From: Gusakov Andrey <dron_gus@mail.ru>

Differnt S3C24XX SoC have different number of GPIO. When building
kernel for many S3C24XX SoCs GPIO number defined to minimun possible.
This patch reordef ifdef's to define GPIO number to muximum possible.

Signed-off-by: Gusakov Andrey <dron0gus@gmail.com>
---
 arch/arm/mach-s3c2410/include/mach/gpio.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h
index 6fac70f..07257da 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
@@ -15,10 +15,10 @@
  * devices that need GPIO.
  */
 
-#ifdef CONFIG_CPU_S3C244X
-#define ARCH_NR_GPIOS	(32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
-#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
+#if defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
 #define ARCH_NR_GPIOS	(32 * 12 + CONFIG_S3C24XX_GPIO_EXTRA)
+#elif defined(CONFIG_CPU_S3C244X)
+#define ARCH_NR_GPIOS	(32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
 #else
 #define ARCH_NR_GPIOS	(256 + CONFIG_S3C24XX_GPIO_EXTRA)
 #endif
@@ -26,10 +26,10 @@
 #include <mach/gpio-nrs.h>
 #include <mach/gpio-fns.h>
 
-#ifdef CONFIG_CPU_S3C244X
-#define S3C_GPIO_END	(S3C2410_GPJ(0) + 32)
-#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
+#if defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
 #define S3C_GPIO_END	(S3C2410_GPM(0) + 32)
+#elif defined(CONFIG_CPU_S3C244X)
+#define S3C_GPIO_END	(S3C2410_GPJ(0) + 32)
 #else
 #define S3C_GPIO_END	(S3C2410_GPH(0) + 32)
 #endif
-- 
1.7.0.4

             reply	other threads:[~2011-12-29 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 13:07 Gusakov Andrey [this message]
2011-12-29 13:07 ` [PATCH] S3C: enable debuging over UART3 Gusakov Andrey
2011-12-29 13:07 ` [PATCH] S3C: increase hwmon channels to 10 Gusakov Andrey
2012-01-03  9:43 ` [PATCH] S3C: fix order of MACH_S3C* checks on GPIO count define Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325164036-15638-1-git-send-email-dron0gus@gmail.com \
    --to=dron0gus@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).