summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2014-11-28 15:56:13 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-12-03 16:07:31 +0000
commit0fea30c63eb09e62e2c9b271d7085ac538413973 (patch)
tree26911a8324177d79bfd4e1e02a215c83fe10e364 /arch/arm/mach-sa1100
parentff7f6d0bc5599909da2ba0221d0893cb5ee64d00 (diff)
downloadlinux-0fea30c63eb09e62e2c9b271d7085ac538413973.tar.gz
linux-0fea30c63eb09e62e2c9b271d7085ac538413973.tar.bz2
linux-0fea30c63eb09e62e2c9b271d7085ac538413973.zip
ARM: 8229/1: sa1100: replace irq numbers with names in irq driver
In preparation for further changes replace direct IRQ numbers with pre-defined names. This imposes no real code changes. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/irq.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 4a1bd5ebee1c..0b29d277d53f 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -37,14 +37,14 @@ static int GPIO_IRQ_mask = (1 << 11) - 1;
/*
* To get the GPIO number from an IRQ number
*/
-#define GPIO_11_27_IRQ(i) ((i) - 21)
+#define GPIO_11_27_IRQ(i) ((i) + 11 - IRQ_GPIO11)
#define GPIO11_27_MASK(irq) (1 << GPIO_11_27_IRQ(irq))
static int sa1100_gpio_type(struct irq_data *d, unsigned int type)
{
unsigned int mask;
- if (d->irq <= 10)
+ if (d->irq <= IRQ_GPIO10)
mask = 1 << d->irq;
else
mask = GPIO11_27_MASK(d->irq);
@@ -71,7 +71,7 @@ static int sa1100_gpio_type(struct irq_data *d, unsigned int type)
}
/*
- * GPIO IRQs must be acknowledged. This is for IRQs from 0 to 10.
+ * GPIO IRQs must be acknowledged. This is for IRQs from GPIO0 to 10.
*/
static void sa1100_low_gpio_ack(struct irq_data *d)
{
@@ -189,7 +189,7 @@ static struct irq_chip sa1100_high_gpio_chip = {
/*
* We don't need to ACK IRQs on the SA1100 unless they're GPIOs
- * this is for internal IRQs i.e. from 11 to 31.
+ * this is for internal IRQs i.e. from IRQ LCD to RTCAlrm.
*/
static void sa1100_mask_irq(struct irq_data *d)
{
@@ -332,19 +332,19 @@ void __init sa1100_init_irq(void)
*/
ICCR = 1;
- for (irq = 0; irq <= 10; irq++) {
+ for (irq = IRQ_GPIO0; irq <= IRQ_GPIO10; irq++) {
irq_set_chip_and_handler(irq, &sa1100_low_gpio_chip,
handle_edge_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
- for (irq = 12; irq <= 31; irq++) {
+ for (irq = IRQ_LCD; irq <= IRQ_RTCAlrm; irq++) {
irq_set_chip_and_handler(irq, &sa1100_normal_chip,
handle_level_irq);
set_irq_flags(irq, IRQF_VALID);
}
- for (irq = 32; irq <= 48; irq++) {
+ for (irq = IRQ_GPIO11; irq <= IRQ_GPIO27; irq++) {
irq_set_chip_and_handler(irq, &sa1100_high_gpio_chip,
handle_edge_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);