Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
5b88128f
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看板
提交
5b88128f
编写于
11月 29, 2010
作者:
L
Lennert Buytenhek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: plat-stmp3xxx: irq_data conversion.
Signed-off-by:
N
Lennert Buytenhek
<
buytenh@secretlab.ca
>
上级
0e60e117
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
arch/arm/plat-stmp3xxx/irq.c
arch/arm/plat-stmp3xxx/irq.c
+1
-1
arch/arm/plat-stmp3xxx/pinmux.c
arch/arm/plat-stmp3xxx/pinmux.c
+16
-16
未找到文件。
arch/arm/plat-stmp3xxx/irq.c
浏览文件 @
5b88128f
...
...
@@ -34,7 +34,7 @@ void __init stmp3xxx_init_irq(struct irq_chip *chip)
/* Disable all interrupts initially */
for
(
i
=
0
;
i
<
NR_REAL_IRQS
;
i
++
)
{
chip
->
mask
(
i
);
chip
->
irq_mask
(
irq_get_irq_data
(
i
)
);
set_irq_chip
(
i
,
chip
);
set_irq_handler
(
i
,
handle_level_irq
);
set_irq_flags
(
i
,
IRQF_VALID
|
IRQF_PROBE
);
...
...
arch/arm/plat-stmp3xxx/pinmux.c
浏览文件 @
5b88128f
...
...
@@ -351,27 +351,27 @@ void stmp3xxx_release_pin_group(struct pin_group *pin_group, const char *label)
}
EXPORT_SYMBOL
(
stmp3xxx_release_pin_group
);
static
int
stmp3xxx_irq_
to_gpio
(
int
irq
,
static
int
stmp3xxx_irq_
data_to_gpio
(
struct
irq_data
*
d
,
struct
stmp3xxx_pinmux_bank
**
bank
,
unsigned
*
gpio
)
{
struct
stmp3xxx_pinmux_bank
*
pm
;
for
(
pm
=
pinmux_banks
;
pm
<
pinmux_banks
+
NR_BANKS
;
pm
++
)
if
(
pm
->
virq
<=
irq
&&
irq
<
pm
->
virq
+
32
)
{
if
(
pm
->
virq
<=
d
->
irq
&&
d
->
irq
<
pm
->
virq
+
32
)
{
*
bank
=
pm
;
*
gpio
=
irq
-
pm
->
virq
;
*
gpio
=
d
->
irq
-
pm
->
virq
;
return
0
;
}
return
-
ENOENT
;
}
static
int
stmp3xxx_set_irqtype
(
unsigned
irq
,
unsigned
type
)
static
int
stmp3xxx_set_irqtype
(
struct
irq_data
*
d
,
unsigned
type
)
{
struct
stmp3xxx_pinmux_bank
*
pm
;
unsigned
gpio
;
int
l
,
p
;
stmp3xxx_irq_
to_gpio
(
irq
,
&
pm
,
&
gpio
);
stmp3xxx_irq_
data_to_gpio
(
d
,
&
pm
,
&
gpio
);
switch
(
type
)
{
case
IRQ_TYPE_EDGE_RISING
:
l
=
0
;
p
=
1
;
break
;
...
...
@@ -398,33 +398,33 @@ static int stmp3xxx_set_irqtype(unsigned irq, unsigned type)
return
0
;
}
static
void
stmp3xxx_pin_ack_irq
(
unsigned
irq
)
static
void
stmp3xxx_pin_ack_irq
(
struct
irq_data
*
d
)
{
u32
stat
;
struct
stmp3xxx_pinmux_bank
*
pm
;
unsigned
gpio
;
stmp3xxx_irq_
to_gpio
(
irq
,
&
pm
,
&
gpio
);
stmp3xxx_irq_
data_to_gpio
(
d
,
&
pm
,
&
gpio
);
stat
=
__raw_readl
(
pm
->
irqstat
)
&
(
1
<<
gpio
);
stmp3xxx_clearl
(
stat
,
pm
->
irqstat
);
}
static
void
stmp3xxx_pin_mask_irq
(
unsigned
irq
)
static
void
stmp3xxx_pin_mask_irq
(
struct
irq_data
*
d
)
{
struct
stmp3xxx_pinmux_bank
*
pm
;
unsigned
gpio
;
stmp3xxx_irq_
to_gpio
(
irq
,
&
pm
,
&
gpio
);
stmp3xxx_irq_
data_to_gpio
(
d
,
&
pm
,
&
gpio
);
stmp3xxx_clearl
(
1
<<
gpio
,
pm
->
irqen
);
stmp3xxx_clearl
(
1
<<
gpio
,
pm
->
pin2irq
);
}
static
void
stmp3xxx_pin_unmask_irq
(
unsigned
irq
)
static
void
stmp3xxx_pin_unmask_irq
(
struct
irq_data
*
d
)
{
struct
stmp3xxx_pinmux_bank
*
pm
;
unsigned
gpio
;
stmp3xxx_irq_
to_gpio
(
irq
,
&
pm
,
&
gpio
);
stmp3xxx_irq_
data_to_gpio
(
d
,
&
pm
,
&
gpio
);
stmp3xxx_setl
(
1
<<
gpio
,
pm
->
irqen
);
stmp3xxx_setl
(
1
<<
gpio
,
pm
->
pin2irq
);
}
...
...
@@ -503,10 +503,10 @@ static void stmp3xxx_gpio_irq(u32 irq, struct irq_desc *desc)
}
static
struct
irq_chip
gpio_irq_chip
=
{
.
ack
=
stmp3xxx_pin_ack_irq
,
.
mask
=
stmp3xxx_pin_mask_irq
,
.
unmask
=
stmp3xxx_pin_unmask_irq
,
.
set_type
=
stmp3xxx_set_irqtype
,
.
irq_
ack
=
stmp3xxx_pin_ack_irq
,
.
irq_
mask
=
stmp3xxx_pin_mask_irq
,
.
irq_
unmask
=
stmp3xxx_pin_unmask_irq
,
.
irq_set_type
=
stmp3xxx_set_irqtype
,
};
int
__init
stmp3xxx_pinmux_init
(
int
virtual_irq_start
)
...
...
@@ -533,7 +533,7 @@ int __init stmp3xxx_pinmux_init(int virtual_irq_start)
pm
->
virq
=
virtual_irq_start
+
b
*
32
;
for
(
virq
=
pm
->
virq
;
virq
<
pm
->
virq
;
virq
++
)
{
gpio_irq_chip
.
mask
(
virq
);
gpio_irq_chip
.
irq_mask
(
irq_get_irq_data
(
virq
)
);
set_irq_chip
(
virq
,
&
gpio_irq_chip
);
set_irq_handler
(
virq
,
handle_level_irq
);
set_irq_flags
(
virq
,
IRQF_VALID
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录