summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/syncpt.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-04-08 19:16:20 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:37:09 -0800
commitfe27dabb1699dc63caaac0a798cfbeed6320311f (patch)
treec97045a51898b784d8f1245ab2a687cf9fcaf4ed /arch/arm/mach-tegra/syncpt.c
parent74308585cee3a39aa3025997af44c12ed1acbb2a (diff)
ARM: tegra: syncpt: Fix irq calls for 2.6.39
Change-Id: Ic69e022649bae71dd6d9a034c4da97e4197e5dc2 Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/syncpt.c')
-rw-r--r--arch/arm/mach-tegra/syncpt.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/arm/mach-tegra/syncpt.c b/arch/arm/mach-tegra/syncpt.c
index bb649a9fe51a..8ebab3801a8a 100644
--- a/arch/arm/mach-tegra/syncpt.c
+++ b/arch/arm/mach-tegra/syncpt.c
@@ -23,6 +23,8 @@
#include <linux/irq.h>
#include <linux/io.h>
+#include <asm/mach/irq.h>
+
#include <mach/iomap.h>
#include <mach/irqs.h>
@@ -33,38 +35,37 @@ enum {
HOST1X_SYNC_SYNCPT_THRESH_INT_DISABLE = 0x60
};
-static void syncpt_thresh_mask(unsigned int irq)
+static void syncpt_thresh_mask(struct irq_data *data)
{
- (void)irq;
+ (void)data;
}
-static void syncpt_thresh_unmask(unsigned int irq)
+static void syncpt_thresh_unmask(struct irq_data *data)
{
- (void)irq;
+ (void)data;
}
static void syncpt_thresh_cascade(unsigned int irq, struct irq_desc *desc)
{
- void __iomem *sync_regs = get_irq_desc_data(desc);
- u32 reg;
+ void __iomem *sync_regs = irq_desc_get_handler_data(desc);
+ unsigned long reg;
int id;
+ struct irq_chip *chip = irq_desc_get_chip(desc);
- desc->chip->ack(irq);
+ chained_irq_enter(chip, desc);
reg = readl(sync_regs + HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS);
- while ((id = __fls(reg)) >= 0) {
- reg ^= BIT(id);
+ for_each_set_bit(id, &reg, 32)
generic_handle_irq(id + INT_SYNCPT_THRESH_BASE);
- }
- desc->chip->unmask(irq);
+ chained_irq_exit(chip, desc);
}
static struct irq_chip syncpt_thresh_irq = {
.name = "syncpt",
- .mask = syncpt_thresh_mask,
- .unmask = syncpt_thresh_unmask
+ .irq_mask = syncpt_thresh_mask,
+ .irq_unmask = syncpt_thresh_unmask
};
static int __init syncpt_init_irq(void)
@@ -84,15 +85,14 @@ static int __init syncpt_init_irq(void)
for (i = 0; i < INT_SYNCPT_THRESH_NR; i++) {
irq = INT_SYNCPT_THRESH_BASE + i;
- set_irq_chip(irq, &syncpt_thresh_irq);
- set_irq_chip_data(irq, sync_regs);
- set_irq_handler(irq, handle_simple_irq);
+ irq_set_chip_and_handler(irq, &syncpt_thresh_irq,
+ handle_simple_irq);
+ irq_set_chip_data(irq, sync_regs);
set_irq_flags(irq, IRQF_VALID);
}
- if (set_irq_data(INT_HOST1X_MPCORE_SYNCPT, sync_regs))
- BUG();
- set_irq_chained_handler(INT_HOST1X_MPCORE_SYNCPT,
- syncpt_thresh_cascade);
+ irq_set_chained_handler(INT_HOST1X_MPCORE_SYNCPT,
+ syncpt_thresh_cascade);
+ irq_set_handler_data(INT_HOST1X_MPCORE_SYNCPT, sync_regs);
return 0;
}