Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ee04087a
Commit
ee04087a
authored
Nov 29, 2010
by
Lennert Buytenhek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: ixp4xx: irq_data conversion.
Signed-off-by:
Lennert Buytenhek
<
buytenh@secretlab.ca
>
parent
c1d065e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/common.c
+21
-21
No files found.
arch/arm/mach-ixp4xx/common.c
View file @
ee04087a
...
...
@@ -128,9 +128,9 @@ int irq_to_gpio(unsigned int irq)
}
EXPORT_SYMBOL
(
irq_to_gpio
);
static
int
ixp4xx_set_irq_type
(
unsigned
int
irq
,
unsigned
int
type
)
static
int
ixp4xx_set_irq_type
(
struct
irq_data
*
d
,
unsigned
int
type
)
{
int
line
=
irq2gpio
[
irq
];
int
line
=
irq2gpio
[
d
->
irq
];
u32
int_style
;
enum
ixp4xx_irq_type
irq_type
;
volatile
u32
*
int_reg
;
...
...
@@ -167,9 +167,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
}
if
(
irq_type
==
IXP4XX_IRQ_EDGE
)
ixp4xx_irq_edge
|=
(
1
<<
irq
);
ixp4xx_irq_edge
|=
(
1
<<
d
->
irq
);
else
ixp4xx_irq_edge
&=
~
(
1
<<
irq
);
ixp4xx_irq_edge
&=
~
(
1
<<
d
->
irq
);
if
(
line
>=
8
)
{
/* pins 8-15 */
line
-=
8
;
...
...
@@ -188,22 +188,22 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
*
int_reg
|=
(
int_style
<<
(
line
*
IXP4XX_GPIO_STYLE_SIZE
));
/* Configure the line as an input */
gpio_line_config
(
irq2gpio
[
irq
],
IXP4XX_GPIO_IN
);
gpio_line_config
(
irq2gpio
[
d
->
irq
],
IXP4XX_GPIO_IN
);
return
0
;
}
static
void
ixp4xx_irq_mask
(
unsigned
int
irq
)
static
void
ixp4xx_irq_mask
(
struct
irq_data
*
d
)
{
if
((
cpu_is_ixp46x
()
||
cpu_is_ixp43x
())
&&
irq
>=
32
)
*
IXP4XX_ICMR2
&=
~
(
1
<<
(
irq
-
32
));
if
((
cpu_is_ixp46x
()
||
cpu_is_ixp43x
())
&&
d
->
irq
>=
32
)
*
IXP4XX_ICMR2
&=
~
(
1
<<
(
d
->
irq
-
32
));
else
*
IXP4XX_ICMR
&=
~
(
1
<<
irq
);
*
IXP4XX_ICMR
&=
~
(
1
<<
d
->
irq
);
}
static
void
ixp4xx_irq_ack
(
unsigned
int
irq
)
static
void
ixp4xx_irq_ack
(
struct
irq_data
*
d
)
{
int
line
=
(
irq
<
32
)
?
irq2gpio
[
irq
]
:
-
1
;
int
line
=
(
d
->
irq
<
32
)
?
irq2gpio
[
d
->
irq
]
:
-
1
;
if
(
line
>=
0
)
*
IXP4XX_GPIO_GPISR
=
(
1
<<
line
);
...
...
@@ -213,23 +213,23 @@ static void ixp4xx_irq_ack(unsigned int irq)
* Level triggered interrupts on GPIO lines can only be cleared when the
* interrupt condition disappears.
*/
static
void
ixp4xx_irq_unmask
(
unsigned
int
irq
)
static
void
ixp4xx_irq_unmask
(
struct
irq_data
*
d
)
{
if
(
!
(
ixp4xx_irq_edge
&
(
1
<<
irq
)))
ixp4xx_irq_ack
(
irq
);
if
(
!
(
ixp4xx_irq_edge
&
(
1
<<
d
->
irq
)))
ixp4xx_irq_ack
(
d
);
if
((
cpu_is_ixp46x
()
||
cpu_is_ixp43x
())
&&
irq
>=
32
)
*
IXP4XX_ICMR2
|=
(
1
<<
(
irq
-
32
));
if
((
cpu_is_ixp46x
()
||
cpu_is_ixp43x
())
&&
d
->
irq
>=
32
)
*
IXP4XX_ICMR2
|=
(
1
<<
(
d
->
irq
-
32
));
else
*
IXP4XX_ICMR
|=
(
1
<<
irq
);
*
IXP4XX_ICMR
|=
(
1
<<
d
->
irq
);
}
static
struct
irq_chip
ixp4xx_irq_chip
=
{
.
name
=
"IXP4xx"
,
.
ack
=
ixp4xx_irq_ack
,
.
mask
=
ixp4xx_irq_mask
,
.
unmask
=
ixp4xx_irq_unmask
,
.
set_type
=
ixp4xx_set_irq_type
,
.
irq_ack
=
ixp4xx_irq_ack
,
.
irq_mask
=
ixp4xx_irq_mask
,
.
irq_unmask
=
ixp4xx_irq_unmask
,
.
irq_
set_type
=
ixp4xx_set_irq_type
,
};
void
__init
ixp4xx_init_irq
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment