Skip to contentSkip to conversation

ARM: Samsung S5P: Use the Samsung S5P series common IRQ type

PATCH In review Kyungmin Park 2 participants 2 messages Aug 30, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 ARM: Samsung S5P: Use the Samsung S5P series common IRQ type

From: Kyungmin Park <[email protected]>

Remove the local definitions and use the common IRQ type for S5P series

---
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |    7 -------
 arch/arm/mach-s5pc100/irq-gpio.c               |   16 +++++-----------
 arch/arm/mach-s5pv210/include/mach/regs-gpio.h |    7 -------
 arch/arm/plat-s5p/irq-eint.c                   |   11 ++++++-----
 4 files changed, 11 insertions(+), 30 deletions(-)
arch/arm/mach-s5pc100/include/mach/regs-gpio.h +0 -7
index dd6295e..cc8d674 100644
@@ -64,12 +64,5 @@
 
 #define eint_irq_to_bit(irq)		(1 << (EINT_OFFSET(irq) & 0x7))
 
-/* values for S5P_EXTINT0 */
-#define S5P_EXTINT_LOWLEV		(0x00)
-#define S5P_EXTINT_HILEV		(0x01)
-#define S5P_EXTINT_FALLEDGE		(0x02)
-#define S5P_EXTINT_RISEEDGE		(0x03)
-#define S5P_EXTINT_BOTHEDGE		(0x04)
-
 #endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
 
arch/arm/mach-s5pc100/irq-gpio.c +5 -11
index 2bf86c1..a75073c 100644
@@ -28,12 +28,6 @@
 #define MASK_OFFSET_2			0xF00
 #define PEND_OFFSET_2			0xF40
 
-#define GPIOINT_LEVEL_LOW		0x0
-#define GPIOINT_LEVEL_HIGH		0x1
-#define GPIOINT_EDGE_FALLING		0x2
-#define GPIOINT_EDGE_RISING		0x3
-#define GPIOINT_EDGE_BOTH		0x4
-
 static int group_to_con_offset(int group)
 {
 	return group << 2;
@@ -202,19 +196,19 @@ static int s5pc100_gpioint_set_type(unsigned int irq, unsigned int type)
 		printk(KERN_WARNING "No irq type\n");
 		return -EINVAL;
 	case IRQ_TYPE_EDGE_RISING:
-		type = GPIOINT_EDGE_RISING;
+		type = S5P_GPIO_EDGE_RISING;
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		type = GPIOINT_EDGE_FALLING;
+		type = S5P_GPIO_EDGE_FALLING;
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		type = GPIOINT_EDGE_BOTH;
+		type = S5P_GPIO_EDGE_BOTH;
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		type = GPIOINT_LEVEL_HIGH;
+		type = S5P_GPIO_LEVEL_HIGH;
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		type = GPIOINT_LEVEL_LOW;
+		type = S5P_GPIO_LEVEL_LOW;
 		break;
 	default:
 		BUG();
arch/arm/mach-s5pv210/include/mach/regs-gpio.h +0 -7
index 49e029b..de0c899 100644
@@ -31,13 +31,6 @@
 
 #define eint_irq_to_bit(irq)		(1 << (EINT_OFFSET(irq) & 0x7))
 
-/* values for S5P_EXTINT0 */
-#define S5P_EXTINT_LOWLEV		(0x00)
-#define S5P_EXTINT_HILEV		(0x01)
-#define S5P_EXTINT_FALLEDGE		(0x02)
-#define S5P_EXTINT_RISEEDGE		(0x03)
-#define S5P_EXTINT_BOTHEDGE		(0x04)
-
 #define EINT_MODE		S3C_GPIO_SFN(0xf)
 
 #define EINT_GPIO_0(x)		S5PV210_GPH0(x)
arch/arm/plat-s5p/irq-eint.c +6 -5
index f36cd33..4e0d94b 100644
@@ -25,6 +25,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
+#include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
 #include <mach/regs-gpio.h>
 
@@ -67,23 +68,23 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type)
 
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		newvalue = S5P_EXTINT_RISEEDGE;
+		newvalue = S5P_GPIO_EDGE_RISING;
 		break;
 
 	case IRQ_TYPE_EDGE_FALLING:
-		newvalue = S5P_EXTINT_FALLEDGE;
+		newvalue = S5P_GPIO_EDGE_FALLING;
 		break;
 
 	case IRQ_TYPE_EDGE_BOTH:
-		newvalue = S5P_EXTINT_BOTHEDGE;
+		newvalue = S5P_GPIO_EDGE_BOTH;
 		break;
 
 	case IRQ_TYPE_LEVEL_LOW:
-		newvalue = S5P_EXTINT_LOWLEV;
+		newvalue = S5P_GPIO_LEVEL_LOW;
 		break;
 
 	case IRQ_TYPE_LEVEL_HIGH:
-		newvalue = S5P_EXTINT_HILEV;
+		newvalue = S5P_GPIO_LEVEL_HIGH;
 		break;
 
 	default:
Signature · 1 line
1.5.3.3
#1 lore raw
Quoted 6 lines · Kyungmin Park

From: Kyungmin Park <[email protected]>

Remove the local definitions and use the common IRQ type for S5P series

Review

Quoted 8 lines
---
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |    7 -------
 arch/arm/mach-s5pc100/irq-gpio.c               |   16 +++++-----------
 arch/arm/mach-s5pv210/include/mach/regs-gpio.h |    7 -------
 arch/arm/plat-s5p/irq-eint.c                   |   11 ++++++-----
 4 files changed, 11 insertions(+), 30 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-

Review

Quoted 18 lines

s5pc100/include/mach/regs-gpio.h
index dd6295e..cc8d674 100644

arch/arm/mach-s5pc100/include/mach/regs-gpio.h +0 -7
@@ -64,12 +64,5 @@
 
 #define eint_irq_to_bit(irq)		(1 << (EINT_OFFSET(irq) & 0x7))
 
-/* values for S5P_EXTINT0 */
-#define S5P_EXTINT_LOWLEV		(0x00)
-#define S5P_EXTINT_HILEV		(0x01)
-#define S5P_EXTINT_FALLEDGE		(0x02)
-#define S5P_EXTINT_RISEEDGE		(0x03)
-#define S5P_EXTINT_BOTHEDGE		(0x04)
-
 #endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
 
(quoted diff) +0 -0

b/arch/arm/mach-s5pc100/irq-gpio.c

arch/arm/mach-s5pc100/irq-gpio.c static int s5pc100_gpioint_set_type(unsigned int

Quoted 17 lines

index 2bf86c1..a75073c 100644

arch/arm/mach-s5pc100/irq-gpio.c +0 -6
@@ -28,12 +28,6 @@
 #define MASK_OFFSET_2			0xF00
 #define PEND_OFFSET_2			0xF40
 
-#define GPIOINT_LEVEL_LOW		0x0
-#define GPIOINT_LEVEL_HIGH		0x1
-#define GPIOINT_EDGE_FALLING		0x2
-#define GPIOINT_EDGE_RISING		0x3
-#define GPIOINT_EDGE_BOTH		0x4
-
 static int group_to_con_offset(int group)
 {
 	return group << 2;
@@ -202,19 +196,19 @@ static int s5pc100_gpioint_set_type(unsigned int

irq,

Review

Quoted 26 lines
arch/arm/mach-s5pc100/irq-gpio.c +5 -5
 unsigned int type)
 		printk(KERN_WARNING "No irq type\n");
 		return -EINVAL;
 	case IRQ_TYPE_EDGE_RISING:
-		type = GPIOINT_EDGE_RISING;
+		type = S5P_GPIO_EDGE_RISING;
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		type = GPIOINT_EDGE_FALLING;
+		type = S5P_GPIO_EDGE_FALLING;
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		type = GPIOINT_EDGE_BOTH;
+		type = S5P_GPIO_EDGE_BOTH;
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		type = GPIOINT_LEVEL_HIGH;
+		type = S5P_GPIO_LEVEL_HIGH;
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		type = GPIOINT_LEVEL_LOW;
+		type = S5P_GPIO_LEVEL_LOW;
 		break;
 	default:
arch/arm/mach-s5pc100/irq-gpio.c +0 -0
 		BUG();
(quoted diff) +0 -0

b/arch/arm/mach-

arch/arm/plat-s5p/irq-eint.c static int s5p_irq_eint_set_type(unsigned int irq,

Quoted 31 lines

s5pv210/include/mach/regs-gpio.h
index 49e029b..de0c899 100644

arch/arm/mach-s5pv210/include/mach/regs-gpio.h +0 -7
@@ -31,13 +31,6 @@
 
 #define eint_irq_to_bit(irq)		(1 << (EINT_OFFSET(irq) & 0x7))
 
-/* values for S5P_EXTINT0 */
-#define S5P_EXTINT_LOWLEV		(0x00)
-#define S5P_EXTINT_HILEV		(0x01)
-#define S5P_EXTINT_FALLEDGE		(0x02)
-#define S5P_EXTINT_RISEEDGE		(0x03)
-#define S5P_EXTINT_BOTHEDGE		(0x04)
-
 #define EINT_MODE		S3C_GPIO_SFN(0xf)
 
 #define EINT_GPIO_0(x)		S5PV210_GPH0(x)
arch/arm/plat-s5p/irq-eint.c +1 -0
index f36cd33..4e0d94b 100644
@@ -25,6 +25,7 @@
 #include <plat/cpu.h>
 #include <plat/pm.h>
 
+#include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
 #include <mach/regs-gpio.h>
 
@@ -67,23 +68,23 @@ static int s5p_irq_eint_set_type(unsigned int irq,

unsigned

Quoted 28 lines
arch/arm/plat-s5p/irq-eint.c +5 -5
 int type)
 
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		newvalue = S5P_EXTINT_RISEEDGE;
+		newvalue = S5P_GPIO_EDGE_RISING;
 		break;
 
 	case IRQ_TYPE_EDGE_FALLING:
-		newvalue = S5P_EXTINT_FALLEDGE;
+		newvalue = S5P_GPIO_EDGE_FALLING;
 		break;
 
 	case IRQ_TYPE_EDGE_BOTH:
-		newvalue = S5P_EXTINT_BOTHEDGE;
+		newvalue = S5P_GPIO_EDGE_BOTH;
 		break;
 
 	case IRQ_TYPE_LEVEL_LOW:
-		newvalue = S5P_EXTINT_LOWLEV;
+		newvalue = S5P_GPIO_LEVEL_LOW;
 		break;
 
 	case IRQ_TYPE_LEVEL_HIGH:
-		newvalue = S5P_EXTINT_HILEV;
+		newvalue = S5P_GPIO_LEVEL_HIGH;
 		break;
 
Quoted 2 lines

default:
--

Please refer to other comments of your patches.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.