irq: Add flags to IRQ_CONNECT_STATIC() macro and irq_connect() function
Flags allow passing IRQ triggering option for x86 architecture. Each platform defines flags for a particular device and then device driver uses them when registers the interrupt handler. The change in API means that device drivers and sample applications need to use the new API. IRQ triggering configuration is now handled by device drivers by using flags passed to interrupt registering API: IRQ_CONNECT_STATIC() or irq_connect() Change-Id: Ibc4312ea2b4032a2efc5b913c6389f780a2a11d1 Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This commit is contained in:
parent
4a61c2824b
commit
f1420515a7
35 changed files with 164 additions and 469 deletions
|
@ -65,6 +65,7 @@
|
|||
*
|
||||
* @param irq virtualized IRQ
|
||||
* @param priority get vector from <priority> group
|
||||
* @param flags Interrupt flags
|
||||
*
|
||||
* @return the allocated interrupt vector
|
||||
*
|
||||
|
@ -76,7 +77,8 @@
|
|||
*/
|
||||
int _SysIntVecAlloc(
|
||||
unsigned int irq, /* virtualized IRQ */
|
||||
unsigned int priority /* get vector from <priority> group */
|
||||
unsigned int priority, /* get vector from <priority> group */
|
||||
uint32_t flags /* interrupt flags */
|
||||
)
|
||||
{
|
||||
int vector;
|
||||
|
@ -113,7 +115,7 @@ int _SysIntVecAlloc(
|
|||
if (irq != NANO_SOFT_IRQ)
|
||||
#endif
|
||||
{
|
||||
_SysIntVecProgram(vector, irq);
|
||||
_SysIntVecProgram(vector, irq, flags);
|
||||
}
|
||||
|
||||
return vector;
|
||||
|
@ -129,7 +131,7 @@ int _SysIntVecAlloc(
|
|||
* Drivers call this routine instead of irq_connect() when interrupts are
|
||||
* configured statically.
|
||||
*
|
||||
* The Clanton board virtualizes IRQs as follows:
|
||||
* The Galileo board virtualizes IRQs as follows:
|
||||
*
|
||||
* - The first CONFIG_IOAPIC_NUM_RTES IRQs are provided by the IOAPIC so the
|
||||
* IOAPIC is programmed for these IRQs
|
||||
|
@ -138,13 +140,14 @@ int _SysIntVecAlloc(
|
|||
*
|
||||
* @param vector the vector number
|
||||
* @param irq the virtualized IRQ
|
||||
* @param flags interrupt flags
|
||||
*
|
||||
*/
|
||||
void _SysIntVecProgram(unsigned int vector, unsigned int irq)
|
||||
void _SysIntVecProgram(unsigned int vector, unsigned int irq, uint32_t flags)
|
||||
{
|
||||
|
||||
if (irq < CONFIG_IOAPIC_NUM_RTES) {
|
||||
_ioapic_int_vec_set(irq, vector);
|
||||
_ioapic_irq_set(irq, vector, flags);
|
||||
} else {
|
||||
_loapic_int_vec_set(irq - CONFIG_IOAPIC_NUM_RTES, vector);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue