9904319d4f
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>
25 lines
631 B
C
25 lines
631 B
C
#ifndef __ASM_MACH_IRQS_H
|
|
#define __ASM_MACH_IRQS_H
|
|
|
|
#include <linux/sh_intc.h>
|
|
|
|
/* GIC */
|
|
#define gic_spi(nr) ((nr) + 32)
|
|
#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
|
|
|
|
/* INTCS */
|
|
#define INTCS_VECT_BASE 0x3400
|
|
#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
|
|
#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
|
|
|
|
/* External IRQ pins */
|
|
#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 */
|