ARM: S5PC110: Move the GPIO interrupt type definition to plat-samsung
Subsystems (3)
PATCH 1/1 ARM: S5PC110: Move the GPIO interrupt type definition to plat-samsung
From: Kyungmin Park <[email protected]>
It's common part for Samsung SoCs. so move to plat-samsung.
Signed-off-by Kyungmin Park <[email protected]>
---
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 +6 -5
@@ -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 =GPIO_LEVEL_LOW ;break ;case IRQ_TYPE_LEVEL_HIGH : - newvalue =S5P_EXTINT_HILEV ; + newvalue =GPIO_LEVEL_HIGH ;break ;default :
arch/arm/plat-samsung/include/plat/gpio-core.h +6 -0
@@ -14,6 +14,12 @@#define GPIOCON_OFF (0x00)#define GPIODAT_OFF (0x04) +#define GPIO_LEVEL_LOW (0x00) +#define GPIO_LEVEL_HIGH (0x01) +#define S5P_GPIO_EDGE_FALLING (0x02) +#define S5P_GPIO_EDGE_RISING (0x03) +#define S5P_GPIO_EDGE_BOTH (0x04) +#define con_4bit_shift (__off) ((__off) * 4)/* Define the core gpiolib support functions that the s3c platforms may