]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] S3C24XX: Add S3C_GPIO_END definition
authorBen Dooks <ben-linux@fluff.org>
Fri, 12 Dec 2008 00:24:29 +0000 (00:24 +0000)
committerBen Dooks <ben-linux@fluff.org>
Sun, 8 Mar 2009 12:37:57 +0000 (12:37 +0000)
Add the definition for S3C_GPIO_END to allow the PM code to build.

This means moving the GPIO bank numbers to a separate file to allow
the gpio and regs-gpio to include them. Including regs-gpio.h into
gpio.h causes too many build problems and adding gpio.h would mean
editing a large number of files.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/include/mach/gpio-nrs.h [new file with mode: 0644]
arch/arm/mach-s3c2410/include/mach/gpio.h
arch/arm/mach-s3c2410/include/mach/regs-gpio.h

diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h b/arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
new file mode 100644 (file)
index 0000000..ce1ec69
--- /dev/null
@@ -0,0 +1,23 @@
+/* arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
+ *
+ * Copyright (c) 2008 Simtec Electronics
+ *     http://armlinux.simtec.co.uk/
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * S3C2410 - GPIO bank numbering
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))
+
+#define S3C2410_GPIO_BANKA   (32*0)
+#define S3C2410_GPIO_BANKB   (32*1)
+#define S3C2410_GPIO_BANKC   (32*2)
+#define S3C2410_GPIO_BANKD   (32*3)
+#define S3C2410_GPIO_BANKE   (32*4)
+#define S3C2410_GPIO_BANKF   (32*5)
+#define S3C2410_GPIO_BANKG   (32*6)
+#define S3C2410_GPIO_BANKH   (32*7)
index 00476a573bbe8c43aabce34e3f4ae3860da40ec1..51a88cf9526b3caaad25d9e96ca2952553cae77f 100644 (file)
@@ -23,3 +23,6 @@
 #define ARCH_NR_GPIOS  (256 + CONFIG_S3C24XX_GPIO_EXTRA)
 
 #include <asm-generic/gpio.h>
+#include <mach/gpio-nrs.h>
+
+#define S3C_GPIO_END   (S3C2410_GPIO_BANKH + 32)
index 3210776130672b5e47dd51529c522500c47f1861..35a03df473fcfd13f17c7d78a7cb9a1ca89a8926 100644 (file)
 #ifndef __ASM_ARCH_REGS_GPIO_H
 #define __ASM_ARCH_REGS_GPIO_H
 
-#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))
-
-#define S3C2410_GPIO_BANKA   (32*0)
-#define S3C2410_GPIO_BANKB   (32*1)
-#define S3C2410_GPIO_BANKC   (32*2)
-#define S3C2410_GPIO_BANKD   (32*3)
-#define S3C2410_GPIO_BANKE   (32*4)
-#define S3C2410_GPIO_BANKF   (32*5)
-#define S3C2410_GPIO_BANKG   (32*6)
-#define S3C2410_GPIO_BANKH   (32*7)
+#include <mach/gpio-nrs.h>
 
 #ifdef CONFIG_CPU_S3C2400
 #define S3C24XX_GPIO_BASE(x)  S3C2400_GPIO_BASE(x)