⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 irq.c

📁 上传linux-jx2410的源代码
💻 C
字号:
/* *  linux/arch/arm/mach-anakin/irq.c * *  Copyright (C) 2001 Aleph One Ltd. for Acunia N.V. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * *  Changelog: *   10-Apr-2001 TTC	Created */#include <linux/ptrace.h>#include <linux/sched.h>#include <linux/interrupt.h>#include <linux/init.h>#include <asm/irq.h>#include <asm/mach/irq.h>extern unsigned int anakin_irq_mask, anakin_active_irqs;extern void do_IRQ(int, struct pt_regs *);static voidanakin_mask_irq(unsigned int irq){	anakin_irq_mask &= ~(1 << irq);}static voidanakin_unmask_irq(unsigned int irq){	anakin_irq_mask |= (1 << irq);}/* * This is a faked interrupt to deal with parallel interrupt requests * on the Anakin.  Make sure that its interrupt number is not in any * way conflicting with the hardware interrupt numbers!  Check * IRQ_ANAKIN in linux/include/asm-arm/arch-anakin/irqs.h. */static voidanakin_interrupt(int irq, void *dev_id, struct pt_regs *regs){	for (irq = 0; irq < NR_IRQS; irq++)		if (anakin_active_irqs & (1 << irq))			do_IRQ(irq, regs);}static struct irqaction anakin_irq = {	name:		"Anakin IRQ",	handler:	anakin_interrupt,	flags:		SA_INTERRUPT}; void __initirq_init_irq(void){	unsigned int irq;	for (irq = 0; irq < NR_IRQS; irq++) {		switch (irq) {		case IRQ_UART0:		case IRQ_UART1:		case IRQ_UART2:		case IRQ_TICK:		case IRQ_CODEC:		case IRQ_UART4:		case IRQ_TOUCHSCREEN:		case IRQ_UART3:		case IRQ_FIFO:		case IRQ_CAN:		case IRQ_COMPACTFLASH:		case IRQ_BOSH:		case IRQ_ANAKIN:			irq_desc[irq].valid = 1;			irq_desc[irq].mask_ack = anakin_mask_irq;			irq_desc[irq].mask = anakin_mask_irq;			irq_desc[irq].unmask = anakin_unmask_irq;		}	}	setup_arm_irq(IRQ_ANAKIN, &anakin_irq);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -