HelenOS sources
#ifndef KERN_S3C24XX_IRQC_H_
#define KERN_S3C24XX_IRQC_H_
#include <typedefs.h>
#define S3C24XX_IRQC_ADDRESS 0x4a000000
typedef struct {
ioport32_t srcpnd;
ioport32_t intmod;
ioport32_t intmsk;
ioport32_t priority;
ioport32_t intpnd;
ioport32_t intoffset;
ioport32_t subsrcpnd;
ioport32_t intsubmsk;
} s3c24xx_irqc_regs_t;
enum s3c24xx_int_source {
S3C24XX_INT_ADC = 31,
S3C24XX_INT_RTC = 30,
S3C24XX_INT_SPI1 = 29,
S3C24XX_INT_UART0 = 28,
S3C24XX_INT_IIC = 27,
S3C24XX_INT_USBH = 26,
S3C24XX_INT_USBD = 25,
S3C24XX_INT_NFCON = 24,
S3C24XX_INT_UART1 = 23,
S3C24XX_INT_SPI0 = 22,
S3C24XX_INT_SDI = 21,
S3C24XX_INT_DMA3 = 20,
S3C24XX_INT_DMA2 = 19,
S3C24XX_INT_DMA1 = 18,
S3C24XX_INT_DMA0 = 17,
S3C24XX_INT_LCD = 16,
S3C24XX_INT_UART2 = 15,
S3C24XX_INT_TIMER4 = 14,
S3C24XX_INT_TIMER3 = 13,
S3C24XX_INT_TIMER2 = 12,
S3C24XX_INT_TIMER1 = 11,
S3C24XX_INT_TIMER0 = 10,
S3C24XX_INT_WDT_AC97 = 9,
S3C24XX_INT_TICK = 8,
S3C24XX_nBATT_FLT = 7,
S3C24XX_INT_CAM = 6,
S3C24XX_EINT8_23 = 5,
S3C24XX_EINT4_7 = 4,
S3C24XX_EINT3 = 3,
S3C24XX_EINT2 = 2,
S3C24XX_EINT1 = 1,
S3C24XX_EINT0 = 0
};
enum s3c24xx_int_subsource {
S3C24XX_SUBINT_AC97 = 14,
S3C24XX_SUBINT_WDT = 13,
S3C24XX_SUBINT_CAM_P = 12,
S3C24XX_SUBINT_CAM_C = 11,
S3C24XX_SUBINT_ADC_S = 10,
S3C24XX_SUBINT_TC = 9,
S3C24XX_SUBINT_ERR2 = 8,
S3C24XX_SUBINT_TXD2 = 7,
S3C24XX_SUBINT_RXD2 = 6,
S3C24XX_SUBINT_ERR1 = 5,
S3C24XX_SUBINT_TXD1 = 4,
S3C24XX_SUBINT_RXD1 = 3,
S3C24XX_SUBINT_ERR0 = 2,
S3C24XX_SUBINT_TXD0 = 1,
S3C24XX_SUBINT_RXD0 = 0
};
#define S3C24XX_INT_BIT(source) (1 << (source))
#define S3C24XX_SUBINT_BIT(subsource) (1 << (subsource))
typedef struct {
s3c24xx_irqc_regs_t *regs;
} s3c24xx_irqc_t;
extern void s3c24xx_irqc_init(s3c24xx_irqc_t *, s3c24xx_irqc_regs_t *);
extern unsigned s3c24xx_irqc_inum_get(s3c24xx_irqc_t *);
extern void s3c24xx_irqc_clear(s3c24xx_irqc_t *, unsigned);
extern void s3c24xx_irqc_src_enable(s3c24xx_irqc_t *, unsigned);
extern void s3c24xx_irqc_src_disable(s3c24xx_irqc_t *, unsigned);
extern void s3c24xx_irqc_subsrc_enable(s3c24xx_irqc_t *, unsigned);
extern void s3c24xx_irqc_subsrc_disable(s3c24xx_irqc_t *, unsigned);
#endif
HelenOS homepage, sources at GitHub