/* * linux/arch/arm/mach-omap2/irq.c * * Interrupt handler for OMAP2 boards. * * Copyright (C) 2005 Nokia Corporation * Author: Paul Mundt <paul.mundt@nokia.com> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details.
*/ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h>
for (i = 0; i < omap_nr_irqs; i++)
intc_writel(INTC_ILR0 + 0x4 * i,
intc_context.ilr[i]);
for (i = 0; i < INTCPS_NR_MIR_REGS; i++)
intc_writel(INTC_MIR0 + 0x20 * i,
intc_context.mir[i]); /* MIRs are saved and restore with other PRCM registers */
}
void omap3_intc_prepare_idle(void)
{ /* * Disable autoidle as it can stall interrupt controller, * cf. errata ID i540 for 3430 (all revisions up to 3.1.x)
*/
intc_writel(INTC_SYSCONFIG, 0);
intc_writel(INTC_IDLE, INTC_IDLE_TURBO);
}
staticint __init omap_init_irq(u32 base, struct device_node *node)
{ int ret;
/* * FIXME legacy OMAP DMA driver sitting under arch/arm/plat-omap/dma.c * depends is still not ready for linear IRQ domains; because of that * we need to temporarily "blacklist" OMAP2 and OMAP3 devices from using * linear IRQ Domain until that driver is finally fixed.
*/ if (of_device_is_compatible(node, "ti,omap2-intc") ||
of_device_is_compatible(node, "ti,omap3-intc")) { struct resource res;
if (of_address_to_resource(node, 0, &res)) return -ENOMEM;
base = res.start;
ret = omap_init_irq_legacy(base, node);
} elseif (node) {
ret = omap_init_irq_of(node);
} else {
ret = omap_init_irq_legacy(base, NULL);
}
/* * A spurious IRQ can result if interrupt that triggered the * sorting is no longer active during the sorting (10 INTC * functional clock cycles after interrupt assertion). Or a * change in interrupt mask affected the result during sorting * time. There is no special handling required except ignoring * the SIR register value just read and retrying. * See section 6.2.5 of AM335x TRM Literature Number: SPRUH73K * * Many a times, a spurious interrupt situation has been fixed * by adding a flush for the posted write acking the IRQ in * the device driver. Typically, this is going be the device * driver whose interrupt was handled just before the spurious * IRQ occurred. Pay attention to those device drivers if you * run into hitting the spurious IRQ condition below.
*/ if (unlikely((irqnr & SPURIOUSIRQ_MASK) == SPURIOUSIRQ_MASK)) {
pr_err_once("%s: spurious irq!\n", __func__);
irq_err_count++;
omap_ack_irq(NULL); return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.