主题 : S3C2440的中断偏移是怎么得到的?? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 67412
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
综合积分: 38 分
注册时间: 2012-04-11
最后登录: 2013-10-18
楼主  发表于: 2012-12-04 11:54

 S3C2440的中断偏移是怎么得到的??

在头文件里 arch/arm/mach-s3c2410/include/mach/irqs.h

/* we keep the first set of CPU IRQs out of the range of
* the ISA space, so that the PC104 has them to itself
* and we don't end up having to do horrible things to the
* standard ISA drivers....
*/

#define S3C2410_CPUIRQ_OFFSET     (16)  //这里为什么是16呢?是怎么得出来的?

#define S3C2410_IRQ(x) ((x) + S3C2410_CPUIRQ_OFFSET)

/* main cpu interrupts */
#define IRQ_EINT0      S3C2410_IRQ(0)        /* 16 */
#define IRQ_EINT1      S3C2410_IRQ(1)
#define IRQ_EINT2      S3C2410_IRQ(2)
#define IRQ_EINT3      S3C2410_IRQ(3)


求大虾指导呀!!!!!!!!!!!!!!!!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2012-12-04 13:29

 回 楼主(回回123hui) 的帖子

按照我的理解,这只是那么设了,和硬件没有关系。事实上,这个offset不重要,重要的是下面这些中断号的顺序。这是中断控制器驱动通过SRCPND寄存器找出中断源的依据。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 67412
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
综合积分: 38 分
注册时间: 2012-04-11
最后登录: 2013-10-18
2楼  发表于: 2013-01-21 16:24
嗯,现在基本上明白了,它只是分配一个区间,比这个内存大的区间,方便操作