OSDN Git Service

ARM: shmobile: add GPIO IRQ macro
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 18 Apr 2013 06:41:30 +0000 (23:41 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 4 Jun 2013 12:03:57 +0000 (21:03 +0900)
R-Car series gpio_rcar driver can control GPIO IRQ today.
It needs base IRQ number for gpio_rcar_config :: .irq_base
This patch adds macro for GPIO IRQ.
This patch was tested on Bock-W board

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/include/mach/irqs.h

index b2074e2..d241bfd 100644 (file)
@@ -16,4 +16,9 @@
 #define IRQPIN_BASE            2000
 #define irq_pin(nr)            ((nr) + IRQPIN_BASE)
 
+/* GPIO IRQ */
+#define _GPIO_IRQ_BASE         2500
+#define GPIO_IRQ_BASE(x)       (_GPIO_IRQ_BASE + (32 * x))
+#define GPIO_IRQ(x, y)         (_GPIO_IRQ_BASE + (32 * x) + y)
+
 #endif /* __ASM_MACH_IRQS_H */