aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5p
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-10-01 22:48:09 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-10-20 18:54:57 -0400
commit9adf5d222cfbbc4b7e972bfe3472368f9b453091 (patch)
tree46983cb8aabb55629fe029e47e0d0c7c2ce73f5f /arch/arm/plat-s5p
parent8ce14a221efe8ef9019e2c5b1e06fcd329e66d78 (diff)
ARM: S5P: Unify defines for both gpio interrupt types
Samsung S5P SoCs have the same interrupt type defines for both external interrupts and gpio interrupts. This patch removes all duplicates from S5PC100 and S5PV210 specific includes as well as gpio interrupt code and put a common defines to plat/irqs.h NOTE: Do not use this for S5P6440 and S5P6450. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> [kgene.kim@samsung.com: add note for S5P64X0] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r--arch/arm/plat-s5p/include/plat/irqs.h7
-rw-r--r--arch/arm/plat-s5p/irq-eint.c10
-rw-r--r--arch/arm/plat-s5p/irq-gpioint.c16
3 files changed, 17 insertions, 16 deletions
diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-s5p/include/plat/irqs.h
index 23603c7f1943..7f653bce3c13 100644
--- a/arch/arm/plat-s5p/include/plat/irqs.h
+++ b/arch/arm/plat-s5p/include/plat/irqs.h
@@ -103,4 +103,11 @@
103#define S5P_GPIOINT_GROUP_SIZE 8 103#define S5P_GPIOINT_GROUP_SIZE 8
104#define S5P_GPIOINT_COUNT (S5P_GPIOINT_GROUP_COUNT * S5P_GPIOINT_GROUP_SIZE) 104#define S5P_GPIOINT_COUNT (S5P_GPIOINT_GROUP_COUNT * S5P_GPIOINT_GROUP_SIZE)
105 105
106/* IRQ types common for all s5p platforms */
107#define S5P_IRQ_TYPE_LEVEL_LOW (0x00)
108#define S5P_IRQ_TYPE_LEVEL_HIGH (0x01)
109#define S5P_IRQ_TYPE_EDGE_FALLING (0x02)
110#define S5P_IRQ_TYPE_EDGE_RISING (0x03)
111#define S5P_IRQ_TYPE_EDGE_BOTH (0x04)
112
106#endif /* __ASM_PLAT_S5P_IRQS_H */ 113#endif /* __ASM_PLAT_S5P_IRQS_H */
diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c
index f36cd3327025..752f1a645f9d 100644
--- a/arch/arm/plat-s5p/irq-eint.c
+++ b/arch/arm/plat-s5p/irq-eint.c
@@ -67,23 +67,23 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type)
67 67
68 switch (type) { 68 switch (type) {
69 case IRQ_TYPE_EDGE_RISING: 69 case IRQ_TYPE_EDGE_RISING:
70 newvalue = S5P_EXTINT_RISEEDGE; 70 newvalue = S5P_IRQ_TYPE_EDGE_RISING;
71 break; 71 break;
72 72
73 case IRQ_TYPE_EDGE_FALLING: 73 case IRQ_TYPE_EDGE_FALLING:
74 newvalue = S5P_EXTINT_FALLEDGE; 74 newvalue = S5P_IRQ_TYPE_EDGE_FALLING;
75 break; 75 break;
76 76
77 case IRQ_TYPE_EDGE_BOTH: 77 case IRQ_TYPE_EDGE_BOTH:
78 newvalue = S5P_EXTINT_BOTHEDGE; 78 newvalue = S5P_IRQ_TYPE_EDGE_BOTH;
79 break; 79 break;
80 80
81 case IRQ_TYPE_LEVEL_LOW: 81 case IRQ_TYPE_LEVEL_LOW:
82 newvalue = S5P_EXTINT_LOWLEV; 82 newvalue = S5P_IRQ_TYPE_LEVEL_LOW;
83 break; 83 break;
84 84
85 case IRQ_TYPE_LEVEL_HIGH: 85 case IRQ_TYPE_LEVEL_HIGH:
86 newvalue = S5P_EXTINT_HILEV; 86 newvalue = S5P_IRQ_TYPE_LEVEL_HIGH;
87 break; 87 break;
88 88
89 default: 89 default:
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c
index 768fd39a3a98..0e5dc8cbf5e3 100644
--- a/arch/arm/plat-s5p/irq-gpioint.c
+++ b/arch/arm/plat-s5p/irq-gpioint.c
@@ -28,12 +28,6 @@
28#define GPIOINT_MASK_OFFSET 0x900 28#define GPIOINT_MASK_OFFSET 0x900
29#define GPIOINT_PEND_OFFSET 0xA00 29#define GPIOINT_PEND_OFFSET 0xA00
30 30
31#define GPIOINT_LEVEL_LOW 0x0
32#define GPIOINT_LEVEL_HIGH 0x1
33#define GPIOINT_EDGE_FALLING 0x2
34#define GPIOINT_EDGE_RISING 0x3
35#define GPIOINT_EDGE_BOTH 0x4
36
37static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; 31static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR];
38 32
39static int s5p_gpioint_get_group(unsigned int irq) 33static int s5p_gpioint_get_group(unsigned int irq)
@@ -118,19 +112,19 @@ static int s5p_gpioint_set_type(unsigned int irq, unsigned int type)
118 112
119 switch (type) { 113 switch (type) {
120 case IRQ_TYPE_EDGE_RISING: 114 case IRQ_TYPE_EDGE_RISING:
121 type = GPIOINT_EDGE_RISING; 115 type = S5P_IRQ_TYPE_EDGE_RISING;
122 break; 116 break;
123 case IRQ_TYPE_EDGE_FALLING: 117 case IRQ_TYPE_EDGE_FALLING:
124 type = GPIOINT_EDGE_FALLING; 118 type = S5P_IRQ_TYPE_EDGE_FALLING;
125 break; 119 break;
126 case IRQ_TYPE_EDGE_BOTH: 120 case IRQ_TYPE_EDGE_BOTH:
127 type = GPIOINT_EDGE_BOTH; 121 type = S5P_IRQ_TYPE_EDGE_BOTH;
128 break; 122 break;
129 case IRQ_TYPE_LEVEL_HIGH: 123 case IRQ_TYPE_LEVEL_HIGH:
130 type = GPIOINT_LEVEL_HIGH; 124 type = S5P_IRQ_TYPE_LEVEL_HIGH;
131 break; 125 break;
132 case IRQ_TYPE_LEVEL_LOW: 126 case IRQ_TYPE_LEVEL_LOW:
133 type = GPIOINT_LEVEL_LOW; 127 type = S5P_IRQ_TYPE_LEVEL_LOW;
134 break; 128 break;
135 case IRQ_TYPE_NONE: 129 case IRQ_TYPE_NONE:
136 default: 130 default: