@@ -337,6 +337,29 @@ static void vic_unmask_irq(struct irq_data *d)
writel(1 << irq, base + VIC_INT_ENABLE);
}
+static DEFINE_SPINLOCK(vic_intselect_lock);
+int vic_set_fiq(unsigned int irq, bool enable)
+{
+ u32 int_select;
+ u32 mask;
+ unsigned long irq_flags;
+ void __iomem *base = irq_get_chip_data(irq);
+ irq &= 31;
+ mask = 1 << irq;
+
+ spin_lock_irqsave(&vic_intselect_lock, irq_flags);
+ int_select = readl(base + VIC_INT_SELECT);
+ if (enable)
+ int_select |= mask;
+ else
+ int_select &= ~mask;
+ writel(int_select, base + VIC_INT_SELECT);
+ spin_unlock_irqrestore(&vic_intselect_lock, irq_flags);
+
+ return 0;
+}
+EXPORT_SYMBOL(vic_set_fiq);
+
#if defined(CONFIG_PM)
static struct vic_device *vic_from_irq(unsigned int irq)
{
@@ -34,5 +34,6 @@ void __vic_init(void __iomem *base, int parent_irq, int irq_start,
void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
int vic_init_cascaded(void __iomem *base, unsigned int parent_irq,
u32 vic_sources, u32 resume_sources);
+int vic_set_fiq(unsigned int irq, bool enable);
#endif