Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
56385381
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
56385381
编写于
11月 29, 2010
作者:
L
Lennert Buytenhek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: lpc32xx: irq_data conversion.
Signed-off-by:
N
Lennert Buytenhek
<
buytenh@secretlab.ca
>
上级
3b7cff66
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
28 deletion
+28
-28
arch/arm/mach-lpc32xx/irq.c
arch/arm/mach-lpc32xx/irq.c
+28
-28
未找到文件。
arch/arm/mach-lpc32xx/irq.c
浏览文件 @
56385381
...
...
@@ -191,38 +191,38 @@ static void get_controller(unsigned int irq, unsigned int *base,
}
}
static
void
lpc32xx_mask_irq
(
unsigned
int
irq
)
static
void
lpc32xx_mask_irq
(
struct
irq_data
*
d
)
{
unsigned
int
reg
,
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
&
~
mask
;
__raw_writel
(
reg
,
LPC32XX_INTC_MASK
(
ctrl
));
}
static
void
lpc32xx_unmask_irq
(
unsigned
int
irq
)
static
void
lpc32xx_unmask_irq
(
struct
irq_data
*
d
)
{
unsigned
int
reg
,
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
|
mask
;
__raw_writel
(
reg
,
LPC32XX_INTC_MASK
(
ctrl
));
}
static
void
lpc32xx_ack_irq
(
unsigned
int
irq
)
static
void
lpc32xx_ack_irq
(
struct
irq_data
*
d
)
{
unsigned
int
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
__raw_writel
(
mask
,
LPC32XX_INTC_RAW_STAT
(
ctrl
));
/* Also need to clear pending wake event */
if
(
lpc32xx_events
[
irq
].
mask
!=
0
)
__raw_writel
(
lpc32xx_events
[
irq
].
mask
,
lpc32xx_events
[
irq
].
event_group
->
rawstat_reg
);
if
(
lpc32xx_events
[
d
->
irq
].
mask
!=
0
)
__raw_writel
(
lpc32xx_events
[
d
->
irq
].
mask
,
lpc32xx_events
[
d
->
irq
].
event_group
->
rawstat_reg
);
}
static
void
__lpc32xx_set_irq_type
(
unsigned
int
irq
,
int
use_high_level
,
...
...
@@ -261,27 +261,27 @@ static void __lpc32xx_set_irq_type(unsigned int irq, int use_high_level,
}
}
static
int
lpc32xx_set_irq_type
(
unsigned
int
irq
,
unsigned
int
type
)
static
int
lpc32xx_set_irq_type
(
struct
irq_data
*
d
,
unsigned
int
type
)
{
switch
(
type
)
{
case
IRQ_TYPE_EDGE_RISING
:
/* Rising edge sensitive */
__lpc32xx_set_irq_type
(
irq
,
1
,
1
);
__lpc32xx_set_irq_type
(
d
->
irq
,
1
,
1
);
break
;
case
IRQ_TYPE_EDGE_FALLING
:
/* Falling edge sensitive */
__lpc32xx_set_irq_type
(
irq
,
0
,
1
);
__lpc32xx_set_irq_type
(
d
->
irq
,
0
,
1
);
break
;
case
IRQ_TYPE_LEVEL_LOW
:
/* Low level sensitive */
__lpc32xx_set_irq_type
(
irq
,
0
,
0
);
__lpc32xx_set_irq_type
(
d
->
irq
,
0
,
0
);
break
;
case
IRQ_TYPE_LEVEL_HIGH
:
/* High level sensitive */
__lpc32xx_set_irq_type
(
irq
,
1
,
0
);
__lpc32xx_set_irq_type
(
d
->
irq
,
1
,
0
);
break
;
/* Other modes are not supported */
...
...
@@ -290,33 +290,33 @@ static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type)
}
/* Ok to use the level handler for all types */
set_irq_handler
(
irq
,
handle_level_irq
);
set_irq_handler
(
d
->
irq
,
handle_level_irq
);
return
0
;
}
static
int
lpc32xx_irq_wake
(
unsigned
int
irqno
,
unsigned
int
state
)
static
int
lpc32xx_irq_wake
(
struct
irq_data
*
d
,
unsigned
int
state
)
{
unsigned
long
eventreg
;
if
(
lpc32xx_events
[
irqno
].
mask
!=
0
)
{
eventreg
=
__raw_readl
(
lpc32xx_events
[
irqno
].
if
(
lpc32xx_events
[
d
->
irq
].
mask
!=
0
)
{
eventreg
=
__raw_readl
(
lpc32xx_events
[
d
->
irq
].
event_group
->
enab_reg
);
if
(
state
)
eventreg
|=
lpc32xx_events
[
irqno
].
mask
;
eventreg
|=
lpc32xx_events
[
d
->
irq
].
mask
;
else
eventreg
&=
~
lpc32xx_events
[
irqno
].
mask
;
eventreg
&=
~
lpc32xx_events
[
d
->
irq
].
mask
;
__raw_writel
(
eventreg
,
lpc32xx_events
[
irqno
].
event_group
->
enab_reg
);
lpc32xx_events
[
d
->
irq
].
event_group
->
enab_reg
);
return
0
;
}
/* Clear event */
__raw_writel
(
lpc32xx_events
[
irqno
].
mask
,
lpc32xx_events
[
irqno
].
event_group
->
rawstat_reg
);
__raw_writel
(
lpc32xx_events
[
d
->
irq
].
mask
,
lpc32xx_events
[
d
->
irq
].
event_group
->
rawstat_reg
);
return
-
ENODEV
;
}
...
...
@@ -336,11 +336,11 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr,
}
static
struct
irq_chip
lpc32xx_irq_chip
=
{
.
ack
=
lpc32xx_ack_irq
,
.
mask
=
lpc32xx_mask_irq
,
.
unmask
=
lpc32xx_unmask_irq
,
.
set_type
=
lpc32xx_set_irq_type
,
.
set_wake
=
lpc32xx_irq_wake
.
irq_
ack
=
lpc32xx_ack_irq
,
.
irq_
mask
=
lpc32xx_mask_irq
,
.
irq_
unmask
=
lpc32xx_unmask_irq
,
.
irq_
set_type
=
lpc32xx_set_irq_type
,
.
irq_
set_wake
=
lpc32xx_irq_wake
};
static
void
lpc32xx_sic1_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录