#include <linux/of_irq.h>
#include <linux/irqchip.h>
#include <linux/irqdomain.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
#include <asm/exception.h>
#include <asm/mach/irq.h>
void __iomem *enable[NR_BANKS];
void __iomem *disable[NR_BANKS];
struct irq_domain *domain;
- struct regmap *local_regmap;
+ void __iomem *local_base;
};
static struct armctrl_ic intc __read_mostly;
if (d->hwirq >= NUMBER_IRQS) {
if (num_online_cpus() > 1) {
unsigned int data;
- int ret;
- if (!intc.local_regmap) {
- pr_err("FIQ is disabled due to missing regmap\n");
+ if (!intc.local_base) {
+ pr_err("FIQ is disabled due to missing arm_local_intc\n");
return;
}
- ret = regmap_read(intc.local_regmap,
- ARM_LOCAL_GPU_INT_ROUTING, &data);
- if (ret) {
- pr_err("Failed to read int routing %d\n", ret);
- return;
- }
+ data = readl_relaxed(intc.local_base +
+ ARM_LOCAL_GPU_INT_ROUTING);
data &= ~0xc;
data |= (1 << 2);
- regmap_write(intc.local_regmap,
- ARM_LOCAL_GPU_INT_ROUTING, data);
+ writel_relaxed(data,
+ intc.local_base +
+ ARM_LOCAL_GPU_INT_ROUTING);
}
writel_relaxed(REG_FIQ_ENABLE | hwirq_to_fiq(d->hwirq),
}
if (is_2836) {
- intc.local_regmap =
- syscon_regmap_lookup_by_compatible("brcm,bcm2836-arm-local");
- if (IS_ERR(intc.local_regmap)) {
- pr_err("Failed to get local register map. FIQ is disabled for cpus > 1\n");
- intc.local_regmap = NULL;
- }
+ extern void __iomem * __attribute__((weak)) arm_local_intc;
+ intc.local_base = arm_local_intc;
+ if (!intc.local_base)
+ pr_err("Failed to get local intc base. FIQ is disabled for cpus > 1\n");
}
/* Make a duplicate irq range which is used to enable FIQ */
static struct bcm2836_arm_irqchip_intc intc __read_mostly;
+void __iomem *arm_local_intc;
+EXPORT_SYMBOL_GPL(arm_local_intc);
+
static void bcm2836_arm_irqchip_mask_per_cpu_irq(unsigned int reg_offset,
unsigned int bit,
int cpu)
panic("%pOF: unable to map local interrupt registers\n", node);
}
+ arm_local_intc = intc.base;
+
bcm2835_init_local_timer_frequency();
intc.domain = irq_domain_add_linear(node, LAST_IRQ + 1,