Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
c1d065e6
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看板
提交
c1d065e6
编写于
11月 29, 2010
作者:
L
Lennert Buytenhek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: ixp23xx: irq_data conversion.
Signed-off-by:
N
Lennert Buytenhek
<
buytenh@secretlab.ca
>
上级
6e8f54fa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
49 addition
and
42 deletion
+49
-42
arch/arm/mach-ixp23xx/core.c
arch/arm/mach-ixp23xx/core.c
+31
-24
arch/arm/mach-ixp23xx/ixdp2351.c
arch/arm/mach-ixp23xx/ixdp2351.c
+18
-18
未找到文件。
arch/arm/mach-ixp23xx/core.c
浏览文件 @
c1d065e6
...
...
@@ -111,9 +111,9 @@ enum ixp23xx_irq_type {
static
void
ixp23xx_config_irq
(
unsigned
int
,
enum
ixp23xx_irq_type
);
static
int
ixp23xx_irq_set_type
(
unsigned
int
irq
,
unsigned
int
type
)
static
int
ixp23xx_irq_set_type
(
struct
irq_data
*
d
,
unsigned
int
type
)
{
int
line
=
irq
-
IRQ_IXP23XX_GPIO6
+
6
;
int
line
=
d
->
irq
-
IRQ_IXP23XX_GPIO6
+
6
;
u32
int_style
;
enum
ixp23xx_irq_type
irq_type
;
volatile
u32
*
int_reg
;
...
...
@@ -149,7 +149,7 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type)
return
-
EINVAL
;
}
ixp23xx_config_irq
(
irq
,
irq_type
);
ixp23xx_config_irq
(
d
->
irq
,
irq_type
);
if
(
line
>=
8
)
{
/* pins 8-15 */
line
-=
8
;
...
...
@@ -173,9 +173,10 @@ static int ixp23xx_irq_set_type(unsigned int irq, unsigned int type)
return
0
;
}
static
void
ixp23xx_irq_mask
(
unsigned
int
irq
)
static
void
ixp23xx_irq_mask
(
struct
irq_data
*
d
)
{
volatile
unsigned
long
*
intr_reg
;
unsigned
int
irq
=
d
->
irq
;
if
(
irq
>=
56
)
irq
+=
8
;
...
...
@@ -184,9 +185,9 @@ static void ixp23xx_irq_mask(unsigned int irq)
*
intr_reg
&=
~
(
1
<<
(
irq
%
32
));
}
static
void
ixp23xx_irq_ack
(
unsigned
int
irq
)
static
void
ixp23xx_irq_ack
(
struct
irq_data
*
d
)
{
int
line
=
irq
-
IRQ_IXP23XX_GPIO6
+
6
;
int
line
=
d
->
irq
-
IRQ_IXP23XX_GPIO6
+
6
;
if
((
line
<
6
)
||
(
line
>
15
))
return
;
...
...
@@ -198,11 +199,12 @@ static void ixp23xx_irq_ack(unsigned int irq)
* Level triggered interrupts on GPIO lines can only be cleared when the
* interrupt condition disappears.
*/
static
void
ixp23xx_irq_level_unmask
(
unsigned
int
irq
)
static
void
ixp23xx_irq_level_unmask
(
struct
irq_data
*
d
)
{
volatile
unsigned
long
*
intr_reg
;
unsigned
int
irq
=
d
->
irq
;
ixp23xx_irq_ack
(
irq
);
ixp23xx_irq_ack
(
d
);
if
(
irq
>=
56
)
irq
+=
8
;
...
...
@@ -211,9 +213,10 @@ static void ixp23xx_irq_level_unmask(unsigned int irq)
*
intr_reg
|=
(
1
<<
(
irq
%
32
));
}
static
void
ixp23xx_irq_edge_unmask
(
unsigned
int
irq
)
static
void
ixp23xx_irq_edge_unmask
(
struct
irq_data
*
d
)
{
volatile
unsigned
long
*
intr_reg
;
unsigned
int
irq
=
d
->
irq
;
if
(
irq
>=
56
)
irq
+=
8
;
...
...
@@ -223,26 +226,30 @@ static void ixp23xx_irq_edge_unmask(unsigned int irq)
}
static
struct
irq_chip
ixp23xx_irq_level_chip
=
{
.
ack
=
ixp23xx_irq_mask
,
.
mask
=
ixp23xx_irq_mask
,
.
unmask
=
ixp23xx_irq_level_unmask
,
.
set_type
=
ixp23xx_irq_set_type
.
irq_ack
=
ixp23xx_irq_mask
,
.
irq_mask
=
ixp23xx_irq_mask
,
.
irq_unmask
=
ixp23xx_irq_level_unmask
,
.
irq_
set_type
=
ixp23xx_irq_set_type
};
static
struct
irq_chip
ixp23xx_irq_edge_chip
=
{
.
ack
=
ixp23xx_irq_ack
,
.
mask
=
ixp23xx_irq_mask
,
.
unmask
=
ixp23xx_irq_edge_unmask
,
.
set_type
=
ixp23xx_irq_set_type
.
irq_ack
=
ixp23xx_irq_ack
,
.
irq_mask
=
ixp23xx_irq_mask
,
.
irq_unmask
=
ixp23xx_irq_edge_unmask
,
.
irq_
set_type
=
ixp23xx_irq_set_type
};
static
void
ixp23xx_pci_irq_mask
(
unsigned
int
irq
)
static
void
ixp23xx_pci_irq_mask
(
struct
irq_data
*
d
)
{
unsigned
int
irq
=
d
->
irq
;
*
IXP23XX_PCI_XSCALE_INT_ENABLE
&=
~
(
1
<<
(
IRQ_IXP23XX_INTA
+
27
-
irq
));
}
static
void
ixp23xx_pci_irq_unmask
(
unsigned
int
irq
)
static
void
ixp23xx_pci_irq_unmask
(
struct
irq_data
*
d
)
{
unsigned
int
irq
=
d
->
irq
;
*
IXP23XX_PCI_XSCALE_INT_ENABLE
|=
(
1
<<
(
IRQ_IXP23XX_INTA
+
27
-
irq
));
}
...
...
@@ -256,7 +263,7 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
pci_interrupt
=
*
IXP23XX_PCI_XSCALE_INT_STATUS
;
desc
->
chip
->
ack
(
irq
);
desc
->
irq_data
.
chip
->
irq_ack
(
&
desc
->
irq_data
);
/* See which PCI_INTA, or PCI_INTB interrupted */
if
(
pci_interrupt
&
(
1
<<
26
))
{
...
...
@@ -269,13 +276,13 @@ static void pci_handler(unsigned int irq, struct irq_desc *desc)
generic_handle_irq
(
irqno
);
desc
->
chip
->
unmask
(
irq
);
desc
->
irq_data
.
chip
->
irq_unmask
(
&
desc
->
irq_data
);
}
static
struct
irq_chip
ixp23xx_pci_irq_chip
=
{
.
ack
=
ixp23xx_pci_irq_mask
,
.
mask
=
ixp23xx_pci_irq_mask
,
.
unmask
=
ixp23xx_pci_irq_unmask
.
irq_
ack
=
ixp23xx_pci_irq_mask
,
.
irq_
mask
=
ixp23xx_pci_irq_mask
,
.
irq_
unmask
=
ixp23xx_pci_irq_unmask
};
static
void
ixp23xx_config_irq
(
unsigned
int
irq
,
enum
ixp23xx_irq_type
type
)
...
...
arch/arm/mach-ixp23xx/ixdp2351.c
浏览文件 @
c1d065e6
...
...
@@ -48,14 +48,14 @@
/*
* IXDP2351 Interrupt Handling
*/
static
void
ixdp2351_inta_mask
(
unsigned
int
irq
)
static
void
ixdp2351_inta_mask
(
struct
irq_data
*
d
)
{
*
IXDP2351_CPLD_INTA_MASK_SET_REG
=
IXDP2351_INTA_IRQ_MASK
(
irq
);
*
IXDP2351_CPLD_INTA_MASK_SET_REG
=
IXDP2351_INTA_IRQ_MASK
(
d
->
irq
);
}
static
void
ixdp2351_inta_unmask
(
unsigned
int
irq
)
static
void
ixdp2351_inta_unmask
(
struct
irq_data
*
d
)
{
*
IXDP2351_CPLD_INTA_MASK_CLR_REG
=
IXDP2351_INTA_IRQ_MASK
(
irq
);
*
IXDP2351_CPLD_INTA_MASK_CLR_REG
=
IXDP2351_INTA_IRQ_MASK
(
d
->
irq
);
}
static
void
ixdp2351_inta_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
...
...
@@ -64,7 +64,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc)
*
IXDP2351_CPLD_INTA_STAT_REG
&
IXDP2351_INTA_IRQ_VALID
;
int
i
;
desc
->
chip
->
mask
(
irq
);
desc
->
irq_data
.
chip
->
irq_mask
(
&
desc
->
irq_data
);
for
(
i
=
0
;
i
<
IXDP2351_INTA_IRQ_NUM
;
i
++
)
{
if
(
ex_interrupt
&
(
1
<<
i
))
{
...
...
@@ -74,23 +74,23 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irq_desc *desc)
}
}
desc
->
chip
->
unmask
(
irq
);
desc
->
irq_data
.
chip
->
irq_unmask
(
&
desc
->
irq_data
);
}
static
struct
irq_chip
ixdp2351_inta_chip
=
{
.
ack
=
ixdp2351_inta_mask
,
.
mask
=
ixdp2351_inta_mask
,
.
unmask
=
ixdp2351_inta_unmask
.
irq_
ack
=
ixdp2351_inta_mask
,
.
irq_
mask
=
ixdp2351_inta_mask
,
.
irq_
unmask
=
ixdp2351_inta_unmask
};
static
void
ixdp2351_intb_mask
(
unsigned
int
irq
)
static
void
ixdp2351_intb_mask
(
struct
irq_data
*
d
)
{
*
IXDP2351_CPLD_INTB_MASK_SET_REG
=
IXDP2351_INTB_IRQ_MASK
(
irq
);
*
IXDP2351_CPLD_INTB_MASK_SET_REG
=
IXDP2351_INTB_IRQ_MASK
(
d
->
irq
);
}
static
void
ixdp2351_intb_unmask
(
unsigned
int
irq
)
static
void
ixdp2351_intb_unmask
(
struct
irq_data
*
d
)
{
*
IXDP2351_CPLD_INTB_MASK_CLR_REG
=
IXDP2351_INTB_IRQ_MASK
(
irq
);
*
IXDP2351_CPLD_INTB_MASK_CLR_REG
=
IXDP2351_INTB_IRQ_MASK
(
d
->
irq
);
}
static
void
ixdp2351_intb_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
...
...
@@ -99,7 +99,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc)
*
IXDP2351_CPLD_INTB_STAT_REG
&
IXDP2351_INTB_IRQ_VALID
;
int
i
;
desc
->
chip
->
ack
(
irq
);
desc
->
irq_data
.
chip
->
irq_ack
(
&
desc
->
irq_data
);
for
(
i
=
0
;
i
<
IXDP2351_INTB_IRQ_NUM
;
i
++
)
{
if
(
ex_interrupt
&
(
1
<<
i
))
{
...
...
@@ -109,13 +109,13 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irq_desc *desc)
}
}
desc
->
chip
->
unmask
(
irq
);
desc
->
irq_data
.
chip
->
irq_unmask
(
&
desc
->
irq_data
);
}
static
struct
irq_chip
ixdp2351_intb_chip
=
{
.
ack
=
ixdp2351_intb_mask
,
.
mask
=
ixdp2351_intb_mask
,
.
unmask
=
ixdp2351_intb_unmask
.
irq_
ack
=
ixdp2351_intb_mask
,
.
irq_
mask
=
ixdp2351_intb_mask
,
.
irq_
unmask
=
ixdp2351_intb_unmask
};
void
__init
ixdp2351_init_irq
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录