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
nexedi
linux
Commits
56385381
Commit
56385381
authored
Nov 29, 2010
by
Lennert Buytenhek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: lpc32xx: irq_data conversion.
Signed-off-by:
Lennert Buytenhek
<
buytenh@secretlab.ca
>
parent
3b7cff66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
28 deletions
+28
-28
arch/arm/mach-lpc32xx/irq.c
arch/arm/mach-lpc32xx/irq.c
+28
-28
No files found.
arch/arm/mach-lpc32xx/irq.c
View file @
56385381
...
@@ -191,38 +191,38 @@ static void get_controller(unsigned int irq, unsigned int *base,
...
@@ -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
;
unsigned
int
reg
,
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
&
~
mask
;
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
&
~
mask
;
__raw_writel
(
reg
,
LPC32XX_INTC_MASK
(
ctrl
));
__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
;
unsigned
int
reg
,
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
|
mask
;
reg
=
__raw_readl
(
LPC32XX_INTC_MASK
(
ctrl
))
|
mask
;
__raw_writel
(
reg
,
LPC32XX_INTC_MASK
(
ctrl
));
__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
;
unsigned
int
ctrl
,
mask
;
get_controller
(
irq
,
&
ctrl
,
&
mask
);
get_controller
(
d
->
irq
,
&
ctrl
,
&
mask
);
__raw_writel
(
mask
,
LPC32XX_INTC_RAW_STAT
(
ctrl
));
__raw_writel
(
mask
,
LPC32XX_INTC_RAW_STAT
(
ctrl
));
/* Also need to clear pending wake event */
/* Also need to clear pending wake event */
if
(
lpc32xx_events
[
irq
].
mask
!=
0
)
if
(
lpc32xx_events
[
d
->
irq
].
mask
!=
0
)
__raw_writel
(
lpc32xx_events
[
irq
].
mask
,
__raw_writel
(
lpc32xx_events
[
d
->
irq
].
mask
,
lpc32xx_events
[
irq
].
event_group
->
rawstat_reg
);
lpc32xx_events
[
d
->
irq
].
event_group
->
rawstat_reg
);
}
}
static
void
__lpc32xx_set_irq_type
(
unsigned
int
irq
,
int
use_high_level
,
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,
...
@@ -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
)
{
switch
(
type
)
{
case
IRQ_TYPE_EDGE_RISING
:
case
IRQ_TYPE_EDGE_RISING
:
/* Rising edge sensitive */
/* Rising edge sensitive */
__lpc32xx_set_irq_type
(
irq
,
1
,
1
);
__lpc32xx_set_irq_type
(
d
->
irq
,
1
,
1
);
break
;
break
;
case
IRQ_TYPE_EDGE_FALLING
:
case
IRQ_TYPE_EDGE_FALLING
:
/* Falling edge sensitive */
/* Falling edge sensitive */
__lpc32xx_set_irq_type
(
irq
,
0
,
1
);
__lpc32xx_set_irq_type
(
d
->
irq
,
0
,
1
);
break
;
break
;
case
IRQ_TYPE_LEVEL_LOW
:
case
IRQ_TYPE_LEVEL_LOW
:
/* Low level sensitive */
/* Low level sensitive */
__lpc32xx_set_irq_type
(
irq
,
0
,
0
);
__lpc32xx_set_irq_type
(
d
->
irq
,
0
,
0
);
break
;
break
;
case
IRQ_TYPE_LEVEL_HIGH
:
case
IRQ_TYPE_LEVEL_HIGH
:
/* High level sensitive */
/* High level sensitive */
__lpc32xx_set_irq_type
(
irq
,
1
,
0
);
__lpc32xx_set_irq_type
(
d
->
irq
,
1
,
0
);
break
;
break
;
/* Other modes are not supported */
/* Other modes are not supported */
...
@@ -290,33 +290,33 @@ static int lpc32xx_set_irq_type(unsigned int irq, unsigned int type)
...
@@ -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 */
/* 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
;
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
;
unsigned
long
eventreg
;
if
(
lpc32xx_events
[
irqno
].
mask
!=
0
)
{
if
(
lpc32xx_events
[
d
->
irq
].
mask
!=
0
)
{
eventreg
=
__raw_readl
(
lpc32xx_events
[
irqno
].
eventreg
=
__raw_readl
(
lpc32xx_events
[
d
->
irq
].
event_group
->
enab_reg
);
event_group
->
enab_reg
);
if
(
state
)
if
(
state
)
eventreg
|=
lpc32xx_events
[
irqno
].
mask
;
eventreg
|=
lpc32xx_events
[
d
->
irq
].
mask
;
else
else
eventreg
&=
~
lpc32xx_events
[
irqno
].
mask
;
eventreg
&=
~
lpc32xx_events
[
d
->
irq
].
mask
;
__raw_writel
(
eventreg
,
__raw_writel
(
eventreg
,
lpc32xx_events
[
irqno
].
event_group
->
enab_reg
);
lpc32xx_events
[
d
->
irq
].
event_group
->
enab_reg
);
return
0
;
return
0
;
}
}
/* Clear event */
/* Clear event */
__raw_writel
(
lpc32xx_events
[
irqno
].
mask
,
__raw_writel
(
lpc32xx_events
[
d
->
irq
].
mask
,
lpc32xx_events
[
irqno
].
event_group
->
rawstat_reg
);
lpc32xx_events
[
d
->
irq
].
event_group
->
rawstat_reg
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -336,11 +336,11 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr,
...
@@ -336,11 +336,11 @@ static void __init lpc32xx_set_default_mappings(unsigned int apr,
}
}
static
struct
irq_chip
lpc32xx_irq_chip
=
{
static
struct
irq_chip
lpc32xx_irq_chip
=
{
.
ack
=
lpc32xx_ack_irq
,
.
irq_
ack
=
lpc32xx_ack_irq
,
.
mask
=
lpc32xx_mask_irq
,
.
irq_
mask
=
lpc32xx_mask_irq
,
.
unmask
=
lpc32xx_unmask_irq
,
.
irq_
unmask
=
lpc32xx_unmask_irq
,
.
set_type
=
lpc32xx_set_irq_type
,
.
irq_
set_type
=
lpc32xx_set_irq_type
,
.
set_wake
=
lpc32xx_irq_wake
.
irq_
set_wake
=
lpc32xx_irq_wake
};
};
static
void
lpc32xx_sic1_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
lpc32xx_sic1_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
...
...
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