Files
codezero/include/l4/platform/pb926/irq.h
Bahadir Balban 32c0bb3a76 Converted all wait/wakeup runqueue lock/unlock paths to irq versions.
Irqs can now touch runqueues and do async wakeups. This necessitated
that we implement all wake up wait and runqueue locking work with irqs.

All this, assumes that in an SMP setup we may have cross-cpu wake ups,
runqueue manipulation. If we later decide that we only wake up threads
in the current container, (and lock containers to cpus) we won't really
need spinlocks, or irq disabling anymore. The current set up might be
trivially less responsive, but is more flexible.
2009-12-12 01:20:14 +02:00

51 lines
1.4 KiB
C

#ifndef __PLATFORM_IRQ_H__
#define __PLATFORM_IRQ_H__
#define IRQ_CHIPS_MAX 2
/*
* Globally unique irq chip offsets:
*
* A global irq number is calculated as
* chip_offset + local_irq_offset.
*
* This way, the global irq number uniquely represents
* an irq on any irq chip.
*/
#define VIC_CHIP_OFFSET 0
#define SIC_CHIP_OFFSET 32
/* Maximum irqs on VIC and SIC */
#define VIC_IRQS_MAX 32
#define SIC_IRQS_MAX 32
#define IRQS_MAX VIC_IRQS_MAX + SIC_IRQS_MAX
/* Vectored Interrupt Controller local IRQ numbers */
#define VIC_IRQ_TIMER01 4
#define VIC_IRQ_TIMER23 5
#define VIC_IRQ_RTC 10
#define VIC_IRQ_UART0 12
#define VIC_IRQ_UART1 13
#define VIC_IRQ_UART2 14
#define VIC_IRQ_SIC 31
/* Secondary Interrupt controller local IRQ numbers */
#define SIC_IRQ_SWI 0
#define SIC_IRQ_UART3 6
/* Global irq numbers, note these should reflect global device names */
#define IRQ_TIMER0 (VIC_IRQ_TIMER01 + VIC_CHIP_OFFSET)
#define IRQ_TIMER1 (VIC_IRQ_TIMER23 + VIC_CHIP_OFFSET)
#define IRQ_RTC (VIC_IRQ_RTC + VIC_CHIP_OFFSET)
#define IRQ_UART0 (VIC_IRQ_UART0 + VIC_CHIP_OFFSET)
#define IRQ_UART1 (VIC_IRQ_UART1 + VIC_CHIP_OFFSET)
#define IRQ_UART2 (VIC_IRQ_UART2 + VIC_CHIP_OFFSET)
#define IRQ_SIC (VIC_IRQ_SIC + VIC_CHIP_OFFSET)
#define IRQ_SICSWI (SIC_IRQ_SWI + SIC_CHIP_OFFSET)
#define IRQ_UART3 (SIC_IRQ_UART3 + SIC_CHIP_OFFSET)
#endif /* __PLATFORM_IRQ_H__ */