2 * i.MX31 Vectored Interrupt Controller
4 * Note this is NOT the PL192 provided by ARM, but
5 * a custom implementation by Freescale.
7 * Copyright (c) 2008 OKL
8 * Copyright (c) 2011 NICTA Pty Ltd
9 * Originally written by Hans Jiang
10 * Updated by Jean-Christophe Dubois <jcd@tribudubois.net>
12 * This code is licensed under the GPL version 2 or later. See
13 * the COPYING file in the top-level directory.
15 * TODO: implement vectors.
20 #include "hw/sysbus.h"
22 #define TYPE_IMX_AVIC "imx.avic"
23 #define IMX_AVIC(obj) OBJECT_CHECK(IMXAVICState, (obj), TYPE_IMX_AVIC)
25 #define IMX_AVIC_NUM_IRQS 64
27 /* Interrupt Control Bits */
28 #define ABFLAG (1<<25)
30 #define NIDIS (1<<22) /* Normal Interrupt disable */
31 #define FIDIS (1<<21) /* Fast interrupt disable */
32 #define NIAD (1<<20) /* Normal Interrupt Arbiter Rise ARM level */
33 #define FIAD (1<<19) /* Fast Interrupt Arbiter Rise ARM level */
34 #define NM (1<<18) /* Normal interrupt mode */
36 #define PRIO_PER_WORD (sizeof(uint32_t) * 8 / 4)
37 #define PRIO_WORDS (IMX_AVIC_NUM_IRQS/PRIO_PER_WORD)
39 typedef struct IMXAVICState
{
41 SysBusDevice parent_obj
;
52 uint32_t prio
[PRIO_WORDS
]; /* Priorities are 4-bits each */
55 #endif /* IMX_AVIC_H */