Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a157f26b
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看板
提交
a157f26b
编写于
11月 29, 2010
作者:
L
Lennert Buytenhek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: mmp: irq_data conversion.
Signed-off-by:
N
Lennert Buytenhek
<
buytenh@secretlab.ca
>
上级
56385381
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
31 deletion
+33
-31
arch/arm/mach-mmp/irq-mmp2.c
arch/arm/mach-mmp/irq-mmp2.c
+24
-22
arch/arm/mach-mmp/irq-pxa168.c
arch/arm/mach-mmp/irq-pxa168.c
+9
-9
未找到文件。
arch/arm/mach-mmp/irq-mmp2.c
浏览文件 @
a157f26b
...
...
@@ -20,48 +20,48 @@
#include "common.h"
static
void
icu_mask_irq
(
unsigned
int
irq
)
static
void
icu_mask_irq
(
struct
irq_data
*
d
)
{
uint32_t
r
=
__raw_readl
(
ICU_INT_CONF
(
irq
));
uint32_t
r
=
__raw_readl
(
ICU_INT_CONF
(
d
->
irq
));
r
&=
~
ICU_INT_ROUTE_PJ4_IRQ
;
__raw_writel
(
r
,
ICU_INT_CONF
(
irq
));
__raw_writel
(
r
,
ICU_INT_CONF
(
d
->
irq
));
}
static
void
icu_unmask_irq
(
unsigned
int
irq
)
static
void
icu_unmask_irq
(
struct
irq_data
*
d
)
{
uint32_t
r
=
__raw_readl
(
ICU_INT_CONF
(
irq
));
uint32_t
r
=
__raw_readl
(
ICU_INT_CONF
(
d
->
irq
));
r
|=
ICU_INT_ROUTE_PJ4_IRQ
;
__raw_writel
(
r
,
ICU_INT_CONF
(
irq
));
__raw_writel
(
r
,
ICU_INT_CONF
(
d
->
irq
));
}
static
struct
irq_chip
icu_irq_chip
=
{
.
name
=
"icu_irq"
,
.
mask
=
icu_mask_irq
,
.
mask_ack
=
icu_mask_irq
,
.
unmask
=
icu_unmask_irq
,
.
irq_mask
=
icu_mask_irq
,
.
irq_
mask_ack
=
icu_mask_irq
,
.
irq_unmask
=
icu_unmask_irq
,
};
static
void
pmic_irq_ack
(
unsigned
int
irq
)
static
void
pmic_irq_ack
(
struct
irq_data
*
d
)
{
if
(
irq
==
IRQ_MMP2_PMIC
)
if
(
d
->
irq
==
IRQ_MMP2_PMIC
)
mmp2_clear_pmic_int
();
}
#define SECOND_IRQ_MASK(_name_, irq_base, prefix) \
static void _name_##_mask_irq(
unsigned int irq)
\
static void _name_##_mask_irq(
struct irq_data *d)
\
{ \
uint32_t r; \
r = __raw_readl(prefix##_MASK) | (1 << (irq - irq_base)); \
r = __raw_readl(prefix##_MASK) | (1 << (
d->
irq - irq_base)); \
__raw_writel(r, prefix##_MASK); \
}
#define SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \
static void _name_##_unmask_irq(
unsigned int irq
) \
static void _name_##_unmask_irq(
struct irq_data *d
) \
{ \
uint32_t r; \
r = __raw_readl(prefix##_MASK) & ~(1 << (irq - irq_base)); \
r = __raw_readl(prefix##_MASK) & ~(1 << (
d->
irq - irq_base)); \
__raw_writel(r, prefix##_MASK); \
}
...
...
@@ -88,8 +88,8 @@ SECOND_IRQ_UNMASK(_name_, irq_base, prefix) \
SECOND_IRQ_DEMUX(_name_, irq_base, prefix) \
static struct irq_chip _name_##_irq_chip = { \
.name = #_name_, \
.
mask
= _name_##_mask_irq, \
.
unmask
= _name_##_unmask_irq, \
.
irq_mask
= _name_##_mask_irq, \
.
irq_unmask
= _name_##_unmask_irq, \
}
SECOND_IRQ_CHIP
(
pmic
,
IRQ_MMP2_PMIC_BASE
,
MMP2_ICU_INT4
);
...
...
@@ -103,10 +103,12 @@ static void init_mux_irq(struct irq_chip *chip, int start, int num)
int
irq
;
for
(
irq
=
start
;
num
>
0
;
irq
++
,
num
--
)
{
struct
irq_data
*
d
=
irq_get_irq_data
(
irq
);
/* mask and clear the IRQ */
chip
->
mask
(
irq
);
if
(
chip
->
ack
)
chip
->
ack
(
irq
);
chip
->
irq_mask
(
d
);
if
(
chip
->
irq_
ack
)
chip
->
irq_ack
(
d
);
set_irq_chip
(
irq
,
chip
);
set_irq_flags
(
irq
,
IRQF_VALID
);
...
...
@@ -119,7 +121,7 @@ void __init mmp2_init_icu(void)
int
irq
;
for
(
irq
=
0
;
irq
<
IRQ_MMP2_MUX_BASE
;
irq
++
)
{
icu_mask_irq
(
irq
);
icu_mask_irq
(
irq
_get_irq_data
(
irq
)
);
set_irq_chip
(
irq
,
&
icu_irq_chip
);
set_irq_flags
(
irq
,
IRQF_VALID
);
...
...
@@ -139,7 +141,7 @@ void __init mmp2_init_icu(void)
/* NOTE: IRQ_MMP2_PMIC requires the PMIC MFPR register
* to be written to clear the interrupt
*/
pmic_irq_chip
.
ack
=
pmic_irq_ack
;
pmic_irq_chip
.
irq_
ack
=
pmic_irq_ack
;
init_mux_irq
(
&
pmic_irq_chip
,
IRQ_MMP2_PMIC_BASE
,
2
);
init_mux_irq
(
&
rtc_irq_chip
,
IRQ_MMP2_RTC_BASE
,
2
);
...
...
arch/arm/mach-mmp/irq-pxa168.c
浏览文件 @
a157f26b
...
...
@@ -25,21 +25,21 @@
#define PRIORITY_DEFAULT 0x1
#define PRIORITY_NONE 0x0
/* means IRQ disabled */
static
void
icu_mask_irq
(
unsigned
int
irq
)
static
void
icu_mask_irq
(
struct
irq_data
*
d
)
{
__raw_writel
(
PRIORITY_NONE
,
ICU_INT_CONF
(
irq
));
__raw_writel
(
PRIORITY_NONE
,
ICU_INT_CONF
(
d
->
irq
));
}
static
void
icu_unmask_irq
(
unsigned
int
irq
)
static
void
icu_unmask_irq
(
struct
irq_data
*
d
)
{
__raw_writel
(
IRQ_ROUTE_TO_AP
|
PRIORITY_DEFAULT
,
ICU_INT_CONF
(
irq
));
__raw_writel
(
IRQ_ROUTE_TO_AP
|
PRIORITY_DEFAULT
,
ICU_INT_CONF
(
d
->
irq
));
}
static
struct
irq_chip
icu_irq_chip
=
{
.
name
=
"icu_irq"
,
.
ack
=
icu_mask_irq
,
.
mask
=
icu_mask_irq
,
.
unmask
=
icu_unmask_irq
,
.
name
=
"icu_irq"
,
.
irq_
ack
=
icu_mask_irq
,
.
irq_
mask
=
icu_mask_irq
,
.
irq_
unmask
=
icu_unmask_irq
,
};
void
__init
icu_init_irq
(
void
)
...
...
@@ -47,7 +47,7 @@ void __init icu_init_irq(void)
int
irq
;
for
(
irq
=
0
;
irq
<
64
;
irq
++
)
{
icu_mask_irq
(
irq
);
icu_mask_irq
(
irq
_get_irq_data
(
irq
)
);
set_irq_chip
(
irq
,
&
icu_irq_chip
);
set_irq_handler
(
irq
,
handle_level_irq
);
set_irq_flags
(
irq
,
IRQF_VALID
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录