/* * intc-2.c * * General interrupt controller code for the many ColdFire cores that use * interrupt controllers with 63 interrupt sources, organized as 56 fully- * programmable + 7 fixed-level interrupt sources. This includes the 523x * family, the 5270, 5271, 5274, 5275, and the 528x family which have two such * controllers, and the 547x and 548x families which have only one of them. * * The external 7 fixed interrupts are part of the Edge Port unit of these * ColdFire parts. They can be configured as level or edge triggered. * * (C) Copyright 2009-2011, Greg Ungerer <gerg@snapgear.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.
*/
/* * Bit definitions for the ICR family of registers.
*/ #define MCFSIM_ICR_LEVEL(l) ((l)<<3) /* Level l intr */ #define MCFSIM_ICR_PRI(p) (p) /* Priority p intr */
/* * The EDGE Port interrupts are the fixed 7 external interrupts. * They need some special treatment, for example they need to be acked.
*/ #define EINT0 64 /* Is not actually used, but spot reserved for it */ #define EINT1 65 /* EDGE Port interrupt 1 */ #define EINT7 71 /* EDGE Port interrupt 7 */
/* Don't set the "maskall" bit! */ if ((irq & 0x20) == 0)
imrbit |= 0x1;
val = __raw_readl(imraddr);
__raw_writel(val & ~imrbit, imraddr);
}
/* * Only the external (or EDGE Port) interrupts need to be acknowledged * here, as part of the IRQ handler. They only really need to be ack'ed * if they are in edge triggered mode, but there is no harm in doing it * for all types.
*/ staticvoid intc_irq_ack(struct irq_data *d)
{ unsignedint irq = d->irq;
/* * Each vector needs a unique priority and level associated with it. * We don't really care so much what they are, we don't rely on the * traditional priority interrupt scheme of the m68k/ColdFire. This * only needs to be set once for an interrupt, and we will never change * these values once we have set them.
*/ static u8 intc_intpri = MCFSIM_ICR_LEVEL(6) | MCFSIM_ICR_PRI(6);
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.