socs quark: Simplify IRQ configuration

IRQ numbers differ between x86 and ARC, as well as the bits that need to
be touched in the interrupt routing masks. QMSI abstracts some of it and
for the rest we do have the information needed.

Add a macro to select the right IRQ number based on which core we are
building for.

Change-Id: I3e6680d10a0a23c98777d2831efe6819fcb54162
Signed-off-by: Iván Briano <ivan.briano@intel.com>
This commit is contained in:
Iván Briano 2016-11-01 18:22:26 -02:00 committed by Anas Nashif
commit beb4f405d8
3 changed files with 27 additions and 0 deletions

View file

@ -48,6 +48,15 @@
/* IRQs */
/* The CPU-visible IRQ numbers change between the ARC and IA cores,
* and QMSI itself has no easy way to pick the correct one, though it
* does have the necessary information to do it ourselves (in the meantime).
* This macro will be used by the shim drivers to get the IRQ number to
* use, and it should always be called using the QM_IRQ_*_INT macro
* provided by QMSI.
*/
#define IRQ_GET_NUMBER(_irq) _irq##_VECTOR
#define IRQ_TIMER0 16
#define IRQ_TIMER1 17
#define IRQ_I2C0_RX_AVAIL 18

View file

@ -39,6 +39,15 @@
#define INT_UNMASK_IA (~0x00000001)
/* The CPU-visible IRQ numbers change between the ARC and IA cores,
* and QMSI itself has no easy way to pick the correct one, though it
* does have the necessary information to do it ourselves (in the meantime).
* This macro will be used by the shim drivers to get the IRQ number to
* use, and it should always be called using the QM_IRQ_*_INT macro
* provided by QMSI.
*/
#define IRQ_GET_NUMBER(_irq) _irq
/*
* PINMUX configuration settings
*/

View file

@ -56,6 +56,15 @@
#define ARC_RUN (ARC_HALT_INT_REDIR | ARC_RUN_REQ_A)
#define ARC_HALT (ARC_HALT_INT_REDIR | ARC_HALT_REQ_A)
/* The CPU-visible IRQ numbers change between the ARC and IA cores,
* and QMSI itself has no easy way to pick the correct one, though it
* does have the necessary information to do it ourselves (in the meantime).
* This macro will be used by the shim drivers to get the IRQ number to
* use, and it should always be called using the QM_IRQ_*_INT macro
* provided by QMSI.
*/
#define IRQ_GET_NUMBER(_irq) _irq
/*
* PINMUX configuration settings
*/