Commit f272c00e authored by Lennert Buytenhek's avatar Lennert Buytenhek

ARM: plat-nomadik: irq_data conversion.

Signed-off-by: default avatarLennert Buytenhek <buytenh@secretlab.ca>
Acked-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
parent 4d93579f
...@@ -356,13 +356,13 @@ static inline int nmk_gpio_get_bitmask(int gpio) ...@@ -356,13 +356,13 @@ static inline int nmk_gpio_get_bitmask(int gpio)
return 1 << (gpio % 32); return 1 << (gpio % 32);
} }
static void nmk_gpio_irq_ack(unsigned int irq) static void nmk_gpio_irq_ack(struct irq_data *d)
{ {
int gpio; int gpio;
struct nmk_gpio_chip *nmk_chip; struct nmk_gpio_chip *nmk_chip;
gpio = NOMADIK_IRQ_TO_GPIO(irq); gpio = NOMADIK_IRQ_TO_GPIO(d->irq);
nmk_chip = get_irq_chip_data(irq); nmk_chip = irq_data_get_irq_chip_data(d);
if (!nmk_chip) if (!nmk_chip)
return; return;
writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC);
...@@ -401,7 +401,7 @@ static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip, ...@@ -401,7 +401,7 @@ static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip,
} }
} }
static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, static int nmk_gpio_irq_modify(struct irq_data *d, enum nmk_gpio_irq_type which,
bool enable) bool enable)
{ {
int gpio; int gpio;
...@@ -409,8 +409,8 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, ...@@ -409,8 +409,8 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which,
unsigned long flags; unsigned long flags;
u32 bitmask; u32 bitmask;
gpio = NOMADIK_IRQ_TO_GPIO(irq); gpio = NOMADIK_IRQ_TO_GPIO(d->irq);
nmk_chip = get_irq_chip_data(irq); nmk_chip = irq_data_get_irq_chip_data(d);
bitmask = nmk_gpio_get_bitmask(gpio); bitmask = nmk_gpio_get_bitmask(gpio);
if (!nmk_chip) if (!nmk_chip)
return -EINVAL; return -EINVAL;
...@@ -422,24 +422,24 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which, ...@@ -422,24 +422,24 @@ static int nmk_gpio_irq_modify(unsigned int irq, enum nmk_gpio_irq_type which,
return 0; return 0;
} }
static void nmk_gpio_irq_mask(unsigned int irq) static void nmk_gpio_irq_mask(struct irq_data *d)
{ {
nmk_gpio_irq_modify(irq, NORMAL, false); nmk_gpio_irq_modify(d, NORMAL, false);
} }
static void nmk_gpio_irq_unmask(unsigned int irq) static void nmk_gpio_irq_unmask(struct irq_data *d)
{ {
nmk_gpio_irq_modify(irq, NORMAL, true); nmk_gpio_irq_modify(d, NORMAL, true);
} }
static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on) static int nmk_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
{ {
struct nmk_gpio_chip *nmk_chip; struct nmk_gpio_chip *nmk_chip;
unsigned long flags; unsigned long flags;
int gpio; int gpio;
gpio = NOMADIK_IRQ_TO_GPIO(irq); gpio = NOMADIK_IRQ_TO_GPIO(d->irq);
nmk_chip = get_irq_chip_data(irq); nmk_chip = irq_data_get_irq_chip_data(d);
if (!nmk_chip) if (!nmk_chip)
return -EINVAL; return -EINVAL;
...@@ -457,9 +457,9 @@ static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on) ...@@ -457,9 +457,9 @@ static int nmk_gpio_irq_set_wake(unsigned int irq, unsigned int on)
return 0; return 0;
} }
static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) static int nmk_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{ {
struct irq_desc *desc = irq_to_desc(irq); struct irq_desc *desc = irq_to_desc(d->irq);
bool enabled = !(desc->status & IRQ_DISABLED); bool enabled = !(desc->status & IRQ_DISABLED);
bool wake = desc->wake_depth; bool wake = desc->wake_depth;
int gpio; int gpio;
...@@ -467,8 +467,8 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) ...@@ -467,8 +467,8 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type)
unsigned long flags; unsigned long flags;
u32 bitmask; u32 bitmask;
gpio = NOMADIK_IRQ_TO_GPIO(irq); gpio = NOMADIK_IRQ_TO_GPIO(d->irq);
nmk_chip = get_irq_chip_data(irq); nmk_chip = irq_data_get_irq_chip_data(d);
bitmask = nmk_gpio_get_bitmask(gpio); bitmask = nmk_gpio_get_bitmask(gpio);
if (!nmk_chip) if (!nmk_chip)
return -EINVAL; return -EINVAL;
...@@ -507,11 +507,11 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) ...@@ -507,11 +507,11 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type)
static struct irq_chip nmk_gpio_irq_chip = { static struct irq_chip nmk_gpio_irq_chip = {
.name = "Nomadik-GPIO", .name = "Nomadik-GPIO",
.ack = nmk_gpio_irq_ack, .irq_ack = nmk_gpio_irq_ack,
.mask = nmk_gpio_irq_mask, .irq_mask = nmk_gpio_irq_mask,
.unmask = nmk_gpio_irq_unmask, .irq_unmask = nmk_gpio_irq_unmask,
.set_type = nmk_gpio_irq_set_type, .irq_set_type = nmk_gpio_irq_set_type,
.set_wake = nmk_gpio_irq_set_wake, .irq_set_wake = nmk_gpio_irq_set_wake,
}; };
static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
...@@ -522,12 +522,12 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -522,12 +522,12 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
u32 pending; u32 pending;
unsigned int first_irq; unsigned int first_irq;
if (host_chip->mask_ack) if (host_chip->irq_mask_ack)
host_chip->mask_ack(irq); host_chip->irq_mask_ack(&desc->irq_data);
else { else {
host_chip->mask(irq); host_chip->irq_mask(&desc->irq_data);
if (host_chip->ack) if (host_chip->irq_ack)
host_chip->ack(irq); host_chip->irq_ack(&desc->irq_data);
} }
nmk_chip = get_irq_data(irq); nmk_chip = get_irq_data(irq);
...@@ -537,7 +537,7 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) ...@@ -537,7 +537,7 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(gpio_irq); generic_handle_irq(gpio_irq);
} }
host_chip->unmask(irq); host_chip->irq_unmask(&desc->irq_data);
} }
static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment