Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0df04f82 authored by Jongpill Lee's avatar Jongpill Lee Committed by Ben Dooks
Browse files

ARM: S5PV210: Add IRQ_EINT interrupt support.



Add support for external interrupts on S5PV210.

Signed-off-by: default avatarJongpill Lee <boyko.lee@samsung.com>
Signed-off-by: default avatarPannaga Bhushan <p.bhushan@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
[ben-linux@fluff.org: Ext => IRQ_EINT in title]
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 504d36e9
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ config CPU_S5PV210
	bool
	bool
	select PLAT_S5P
	select PLAT_S5P
	select S3C_PL330_DMA
	select S3C_PL330_DMA
	select S5P_EXT_INT
	help
	help
	  Enable S5PV210 CPU support
	  Enable S5PV210 CPU support


+11 −20
Original line number Original line Diff line number Diff line
@@ -17,22 +17,6 @@


/* VIC0: System, DMA, Timer */
/* VIC0: System, DMA, Timer */


#define IRQ_EINT0		S5P_IRQ_VIC0(0)
#define IRQ_EINT1		S5P_IRQ_VIC0(1)
#define IRQ_EINT2		S5P_IRQ_VIC0(2)
#define IRQ_EINT3		S5P_IRQ_VIC0(3)
#define IRQ_EINT4		S5P_IRQ_VIC0(4)
#define IRQ_EINT5		S5P_IRQ_VIC0(5)
#define IRQ_EINT6		S5P_IRQ_VIC0(6)
#define IRQ_EINT7		S5P_IRQ_VIC0(7)
#define IRQ_EINT8		S5P_IRQ_VIC0(8)
#define IRQ_EINT9		S5P_IRQ_VIC0(9)
#define IRQ_EINT10		S5P_IRQ_VIC0(10)
#define IRQ_EINT11		S5P_IRQ_VIC0(11)
#define IRQ_EINT12		S5P_IRQ_VIC0(12)
#define IRQ_EINT13		S5P_IRQ_VIC0(13)
#define IRQ_EINT14		S5P_IRQ_VIC0(14)
#define IRQ_EINT15		S5P_IRQ_VIC0(15)
#define IRQ_EINT16_31		S5P_IRQ_VIC0(16)
#define IRQ_EINT16_31		S5P_IRQ_VIC0(16)
#define IRQ_BATF		S5P_IRQ_VIC0(17)
#define IRQ_BATF		S5P_IRQ_VIC0(17)
#define IRQ_MDMA		S5P_IRQ_VIC0(18)
#define IRQ_MDMA		S5P_IRQ_VIC0(18)
@@ -134,13 +118,20 @@
#define IRQ_MDNIE3		S5P_IRQ_VIC3(8)
#define IRQ_MDNIE3		S5P_IRQ_VIC3(8)
#define IRQ_VIC_END		S5P_IRQ_VIC3(31)
#define IRQ_VIC_END		S5P_IRQ_VIC3(31)


#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)


#define S5P_EINT(x)		((x) + S5P_IRQ_EINT_BASE)
#define EINT_MODE		S3C_GPIO_SFN(0xf)
#define IRQ_EINT(x)		S5P_EINT(x)

#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
					: ((x) + S5P_EINT_16_31_BASE))


/* Set the default NR_IRQS */
/* Set the default NR_IRQS */


#define NR_IRQS			(IRQ_EINT(31) + 1)
#define NR_IRQS			(IRQ_EINT(31) + 1)


#define EINT_GPIO_0(x)		S5PV210_GPH0(x)
#define EINT_GPIO_1(x)		S5PV210_GPH1(x)
#define EINT_GPIO_2(x)		S5PV210_GPH2(x)
#define EINT_GPIO_3(x)		S5PV210_GPH3(x)

#endif /* ASM_ARCH_IRQS_H */
#endif /* ASM_ARCH_IRQS_H */
+44 −0
Original line number Original line Diff line number Diff line
/* linux/arch/arm/mach-s5pv210/include/mach/regs-gpio.h
 *
 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * S5PV210 - GPIO (including EINT) register definitions
 *
 * 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.
*/

#ifndef __ASM_ARCH_REGS_GPIO_H
#define __ASM_ARCH_REGS_GPIO_H __FILE__

#include <mach/map.h>

#define S5PV210_EINT30CON		(S5P_VA_GPIO + 0xE00)
#define S5P_EINT_CON(x)			(S5PV210_EINT30CON + ((x) * 0x4))

#define S5PV210_EINT30FLTCON0		(S5P_VA_GPIO + 0xE80)
#define S5P_EINT_FLTCON(x)		(S5PV210_EINT30FLTCON0 + ((x) * 0x4))

#define S5PV210_EINT30MASK		(S5P_VA_GPIO + 0xF00)
#define S5P_EINT_MASK(x)		(S5PV210_EINT30MASK + ((x) * 0x4))

#define S5PV210_EINT30PEND		(S5P_VA_GPIO + 0xF40)
#define S5P_EINT_PEND(x)		(S5PV210_EINT30PEND + ((x) * 0x4))

#define eint_offset(irq)	((irq) < IRQ_EINT16_31 ? ((irq) - IRQ_EINT(0)) \
						: ((irq) - S5P_EINT_16_31_BASE))

#define EINT_REG_NR(x)			(eint_offset(x) >> 3)

#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_ARCH_REGS_GPIO_H */
+5 −0
Original line number Original line Diff line number Diff line
@@ -24,3 +24,8 @@ config PLAT_S5P
	select SAMSUNG_IRQ_UART
	select SAMSUNG_IRQ_UART
	help
	help
	  Base platform code for Samsung's S5P series SoC.
	  Base platform code for Samsung's S5P series SoC.

config S5P_EXT_INT
	bool
	help
	  Use the external interrupts (other than GPIO interrupts.)
+2 −0
Original line number Original line Diff line number Diff line
@@ -16,3 +16,5 @@ obj-y += dev-uart.o
obj-y				+= cpu.o
obj-y				+= cpu.o
obj-y				+= clock.o
obj-y				+= clock.o
obj-y				+= irq.o
obj-y				+= irq.o
obj-$(CONFIG_S5P_EXT_INT)	+= irq-eint.o
obj-y				+= setup-i2c0.o
Loading