Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
406b0050
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
406b0050
编写于
11月 29, 2010
作者:
L
Lennert Buytenhek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: pnx4008: irq_data conversion.
Signed-off-by:
N
Lennert Buytenhek
<
buytenh@secretlab.ca
>
上级
df303477
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
29 deletion
+33
-29
arch/arm/mach-pnx4008/irq.c
arch/arm/mach-pnx4008/irq.c
+33
-29
未找到文件。
arch/arm/mach-pnx4008/irq.c
浏览文件 @
406b0050
...
...
@@ -36,44 +36,44 @@
static
u8
pnx4008_irq_type
[
NR_IRQS
]
=
PNX4008_IRQ_TYPES
;
static
void
pnx4008_mask_irq
(
unsigned
int
irq
)
static
void
pnx4008_mask_irq
(
struct
irq_data
*
d
)
{
__raw_writel
(
__raw_readl
(
INTC_ER
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_ER
(
irq
));
/* mask interrupt */
__raw_writel
(
__raw_readl
(
INTC_ER
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_ER
(
d
->
irq
));
/* mask interrupt */
}
static
void
pnx4008_unmask_irq
(
unsigned
int
irq
)
static
void
pnx4008_unmask_irq
(
struct
irq_data
*
d
)
{
__raw_writel
(
__raw_readl
(
INTC_ER
(
irq
))
|
INTC_BIT
(
irq
),
INTC_ER
(
irq
));
/* unmask interrupt */
__raw_writel
(
__raw_readl
(
INTC_ER
(
d
->
irq
))
|
INTC_BIT
(
d
->
irq
),
INTC_ER
(
d
->
irq
));
/* unmask interrupt */
}
static
void
pnx4008_mask_ack_irq
(
unsigned
int
irq
)
static
void
pnx4008_mask_ack_irq
(
struct
irq_data
*
d
)
{
__raw_writel
(
__raw_readl
(
INTC_ER
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_ER
(
irq
));
/* mask interrupt */
__raw_writel
(
INTC_BIT
(
irq
),
INTC_SR
(
irq
));
/* clear interrupt status */
__raw_writel
(
__raw_readl
(
INTC_ER
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_ER
(
d
->
irq
));
/* mask interrupt */
__raw_writel
(
INTC_BIT
(
d
->
irq
),
INTC_SR
(
d
->
irq
));
/* clear interrupt status */
}
static
int
pnx4008_set_irq_type
(
unsigned
int
irq
,
unsigned
int
type
)
static
int
pnx4008_set_irq_type
(
struct
irq_data
*
d
,
unsigned
int
type
)
{
switch
(
type
)
{
case
IRQ_TYPE_EDGE_RISING
:
__raw_writel
(
__raw_readl
(
INTC_ATR
(
irq
))
|
INTC_BIT
(
irq
),
INTC_ATR
(
irq
));
/*edge sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
irq
))
|
INTC_BIT
(
irq
),
INTC_APR
(
irq
));
/*rising edge */
set_irq_handler
(
irq
,
handle_edge_irq
);
__raw_writel
(
__raw_readl
(
INTC_ATR
(
d
->
irq
))
|
INTC_BIT
(
d
->
irq
),
INTC_ATR
(
d
->
irq
));
/*edge sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
d
->
irq
))
|
INTC_BIT
(
d
->
irq
),
INTC_APR
(
d
->
irq
));
/*rising edge */
set_irq_handler
(
d
->
irq
,
handle_edge_irq
);
break
;
case
IRQ_TYPE_EDGE_FALLING
:
__raw_writel
(
__raw_readl
(
INTC_ATR
(
irq
))
|
INTC_BIT
(
irq
),
INTC_ATR
(
irq
));
/*edge sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_APR
(
irq
));
/*falling edge */
set_irq_handler
(
irq
,
handle_edge_irq
);
__raw_writel
(
__raw_readl
(
INTC_ATR
(
d
->
irq
))
|
INTC_BIT
(
d
->
irq
),
INTC_ATR
(
d
->
irq
));
/*edge sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_APR
(
d
->
irq
));
/*falling edge */
set_irq_handler
(
d
->
irq
,
handle_edge_irq
);
break
;
case
IRQ_TYPE_LEVEL_LOW
:
__raw_writel
(
__raw_readl
(
INTC_ATR
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_ATR
(
irq
));
/*level sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_APR
(
irq
));
/*low level */
set_irq_handler
(
irq
,
handle_level_irq
);
__raw_writel
(
__raw_readl
(
INTC_ATR
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_ATR
(
d
->
irq
));
/*level sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_APR
(
d
->
irq
));
/*low level */
set_irq_handler
(
d
->
irq
,
handle_level_irq
);
break
;
case
IRQ_TYPE_LEVEL_HIGH
:
__raw_writel
(
__raw_readl
(
INTC_ATR
(
irq
))
&
~
INTC_BIT
(
irq
),
INTC_ATR
(
irq
));
/*level sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
irq
))
|
INTC_BIT
(
irq
),
INTC_APR
(
irq
));
/* high level */
set_irq_handler
(
irq
,
handle_level_irq
);
__raw_writel
(
__raw_readl
(
INTC_ATR
(
d
->
irq
))
&
~
INTC_BIT
(
d
->
irq
),
INTC_ATR
(
d
->
irq
));
/*level sensitive */
__raw_writel
(
__raw_readl
(
INTC_APR
(
d
->
irq
))
|
INTC_BIT
(
d
->
irq
),
INTC_APR
(
d
->
irq
));
/* high level */
set_irq_handler
(
d
->
irq
,
handle_level_irq
);
break
;
/* IRQ_TYPE_EDGE_BOTH is not supported */
...
...
@@ -85,10 +85,10 @@ static int pnx4008_set_irq_type(unsigned int irq, unsigned int type)
}
static
struct
irq_chip
pnx4008_irq_chip
=
{
.
ack
=
pnx4008_mask_ack_irq
,
.
mask
=
pnx4008_mask_irq
,
.
unmask
=
pnx4008_unmask_irq
,
.
set_type
=
pnx4008_set_irq_type
,
.
irq_
ack
=
pnx4008_mask_ack_irq
,
.
irq_
mask
=
pnx4008_mask_irq
,
.
irq_
unmask
=
pnx4008_unmask_irq
,
.
irq_
set_type
=
pnx4008_set_irq_type
,
};
void
__init
pnx4008_init_irq
(
void
)
...
...
@@ -99,14 +99,18 @@ void __init pnx4008_init_irq(void)
for
(
i
=
0
;
i
<
NR_IRQS
;
i
++
)
{
set_irq_flags
(
i
,
IRQF_VALID
);
set_irq_chip
(
i
,
&
pnx4008_irq_chip
);
pnx4008_set_irq_type
(
i
,
pnx4008_irq_type
[
i
]);
pnx4008_set_irq_type
(
i
rq_get_irq_data
(
i
)
,
pnx4008_irq_type
[
i
]);
}
/* configure and enable IRQ 0,1,30,31 (cascade interrupts) */
pnx4008_set_irq_type
(
SUB1_IRQ_N
,
pnx4008_irq_type
[
SUB1_IRQ_N
]);
pnx4008_set_irq_type
(
SUB2_IRQ_N
,
pnx4008_irq_type
[
SUB2_IRQ_N
]);
pnx4008_set_irq_type
(
SUB1_FIQ_N
,
pnx4008_irq_type
[
SUB1_FIQ_N
]);
pnx4008_set_irq_type
(
SUB2_FIQ_N
,
pnx4008_irq_type
[
SUB2_FIQ_N
]);
pnx4008_set_irq_type
(
irq_get_irq_data
(
SUB1_IRQ_N
),
pnx4008_irq_type
[
SUB1_IRQ_N
]);
pnx4008_set_irq_type
(
irq_get_irq_data
(
SUB2_IRQ_N
),
pnx4008_irq_type
[
SUB2_IRQ_N
]);
pnx4008_set_irq_type
(
irq_get_irq_data
(
SUB1_FIQ_N
),
pnx4008_irq_type
[
SUB1_FIQ_N
]);
pnx4008_set_irq_type
(
irq_get_irq_data
(
SUB2_FIQ_N
),
pnx4008_irq_type
[
SUB2_FIQ_N
]);
/* mask all others */
__raw_writel
((
1
<<
SUB2_FIQ_N
)
|
(
1
<<
SUB1_FIQ_N
)
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录