//-----------------------------------------------
/*
NR_IRQS定义in linux/arch/arm/plat-s3c64xx/include/mach/irqs.h
*/
#define NR_IRQS (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1)
asmlinkage void __init start_kernel(void)
-->early_irq_init();
-->init_IRQ();
-->init_arch_irq();
/*
arch/arm/kernel/irq.c中声明init_arch_irq函数指针
*/
void (*init_arch_irq)(void) __initdata = NULL; /*全局函数指针*/
void __init setup_arch(char **cmdline_p)
-->init_arch_irq = mdesc->init_irq;//s3c6410_init_irq
/*
linux/arch/arm/mach-s3c6410/mach-smdk6410.c中定义machine_desc结构体
*/
MACHINE_START(SMDK6410, 'SMDK6410')
/* Maintainer: Ben Dooks .phys_io = S3C_PA_UART & 0xfff00000, .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, .boot_params = S3C64XX_PA_SDRAM + 0x100, .init_irq = s3c6410_init_irq, .map_io = smdk6410_map_io, .init_machine = smdk6410_machine_init, .timer = &s3c24xx_timer, MACHINE_END /* s3c6410_init_irq in linux/arch/arm/mach-s3c6410/cpu.c */ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) { int uart, irq; printk(KERN_DEBUG '%s: initialising interruptsn', __func__); /* initialise the pair of VICs */ vic_init(S3C_VA_VIC0, S3C_VIC0_BASE, vic0_valid); vic_init(S3C_VA_VIC1, S3C_VIC1_BASE, vic1_valid); /* add the timer sub-irqs */ set_irq_chained_handler(IRQ_TIMER0_VIC, s3c_irq_demux_timer0); set_irq_chained_handler(IRQ_TIMER1_VIC, s3c_irq_demux_timer1); set_irq_chained_handler(IRQ_TIMER2_VIC, s3c_irq_demux_timer2); set_irq_chained_handler(IRQ_TIMER3_VIC, s3c_irq_demux_timer3); set_irq_chained_handler(IRQ_TIMER4_VIC, s3c_irq_demux_timer4); for (irq = IRQ_TIMER0; irq <= IRQ_TIMER4; irq++) { set_irq_chip(irq, &s3c_irq_timer); set_irq_handler(irq, handle_level_irq); set_irq_flags(irq, IRQF_VALID); } for (uart = 0; uart < ARRAY_SIZE(uart_irqs); uart++) s3c64xx_uart_irq(&uart_irqs[uart]); } #define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no)) /* IRQ_EINT_GROUP(1, 3)展开为 IRQ_EINT_GROUP1_BASE + 3 */
上一篇:Linux异常处理体系结构
下一篇:u-boot.bin生成过程分析
推荐阅读最新更新时间:2024-11-07 19:26
设计资源 培训 开发板 精华推荐
- NCP-NCV51561D2PAK7LGEVB:隔离式双通道栅极驱动器NCP/NCV51561 EVB OPN
- RTL8821CU的USB无线网卡
- MAXREFDES1184:采用MAX17595的3.5W,12V离线反激转换器
- 使用 Nuvoton Technology Corporation 的 AU9110LF3AN 的参考设计
- LT3663IDCB、2.5V 降压转换器的典型应用
- TA8126SG 3V DC/DC转换器电调典型应用
- 400W、400V 交流转直流单路输出电源,适用于台式电脑电源
- 使用 Analog Devices 的 LT124XCJ8 的参考设计
- 【实物已验证】DC转MICROTYPEC
- 基于ADP1051的1/8砖电源模块