Chinaunix首页 | 论坛 | 博客
  • 博客访问: 488503
  • 博文数量: 104
  • 博客积分: 3045
  • 博客等级: 少校
  • 技术积分: 1230
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 10:18
文章分类

全部博文(104)

文章存档

2011年(72)

2010年(1)

2009年(1)

2008年(30)

分类: LINUX

2008-09-07 16:08:03

Irq 分析

in the /kernel/irq/manage.c

int request_irq(unsigned int irq, irq_handler_t handler,

unsigned long irqflags, const char *devname, void *dev_id) {

*request_irq - allocate an interrupt line

* @irq: Interrupt line to allocate

* @handler: Function to be called when the IRQ occurs

* @irqflags: Interrupt type flags

* @devname: An ascii name for the claiming device

  • @dev_id: A cookie passed back to the handler function

This call allocates interrupt resources and enables the interrupt line and IRQ handling .

void free_irq(unsigned int irq, void *dev_id)

{

}

free_irq - free an interrupt

* @irq: Interrupt line to free

* @dev_id: Device identity to free

Remove an interrupt handler . The handler is removed an if the interrupt line is no longer in use by any driver int is disabled.

int setup_irq(unsigned int irq, struct irqaction *new)

{

internal function to register an irqaction – typically used to allocate special interrupts that are part of the architecture

linux/arch/arm/kernel/irq.c

This file contains the code used by various IRQ handling routines: installing new handlers should be easier

linux/arch/arm/kernel/fiq.c

set_fiq_handler

set_fiq_regs

get_fiq_regs

release_fiq

enable_fiq














阅读(1047) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~