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
a157f26b
Commit
a157f26b
authored
Nov 29, 2010
by
Lennert Buytenhek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: mmp: irq_data conversion.
Signed-off-by:
Lennert Buytenhek
<
buytenh@secretlab.ca
>
parent
56385381
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
31 deletions
+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
No files found.
arch/arm/mach-mmp/irq-mmp2.c
View file @
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
View file @
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
);
...
...
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