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
3b7cff66
Commit
3b7cff66
authored
Nov 29, 2010
by
Lennert Buytenhek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: lh7a40x: irq_data conversion.
Signed-off-by:
Lennert Buytenhek
<
buytenh@secretlab.ca
>
parent
3cdb791b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
78 deletions
+79
-78
arch/arm/mach-lh7a40x/arch-kev7a400.c
arch/arm/mach-lh7a40x/arch-kev7a400.c
+10
-10
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+13
-12
arch/arm/mach-lh7a40x/irq-lh7a400.c
arch/arm/mach-lh7a40x/irq-lh7a400.c
+15
-15
arch/arm/mach-lh7a40x/irq-lh7a404.c
arch/arm/mach-lh7a40x/irq-lh7a404.c
+30
-30
arch/arm/mach-lh7a40x/irq-lpd7a40x.c
arch/arm/mach-lh7a40x/irq-lpd7a40x.c
+11
-11
No files found.
arch/arm/mach-lh7a40x/arch-kev7a400.c
View file @
3b7cff66
...
@@ -46,28 +46,28 @@ void __init kev7a400_map_io(void)
...
@@ -46,28 +46,28 @@ void __init kev7a400_map_io(void)
static
u16
CPLD_IRQ_mask
;
/* Mask for CPLD IRQs, 1 == unmasked */
static
u16
CPLD_IRQ_mask
;
/* Mask for CPLD IRQs, 1 == unmasked */
static
void
kev7a400_ack_cpld_irq
(
u32
irq
)
static
void
kev7a400_ack_cpld_irq
(
struct
irq_data
*
d
)
{
{
CPLD_CL_INT
=
1
<<
(
irq
-
IRQ_KEV7A400_CPLD
);
CPLD_CL_INT
=
1
<<
(
d
->
irq
-
IRQ_KEV7A400_CPLD
);
}
}
static
void
kev7a400_mask_cpld_irq
(
u32
irq
)
static
void
kev7a400_mask_cpld_irq
(
struct
irq_data
*
d
)
{
{
CPLD_IRQ_mask
&=
~
(
1
<<
(
irq
-
IRQ_KEV7A400_CPLD
));
CPLD_IRQ_mask
&=
~
(
1
<<
(
d
->
irq
-
IRQ_KEV7A400_CPLD
));
CPLD_WR_PB_INT_MASK
=
CPLD_IRQ_mask
;
CPLD_WR_PB_INT_MASK
=
CPLD_IRQ_mask
;
}
}
static
void
kev7a400_unmask_cpld_irq
(
u32
irq
)
static
void
kev7a400_unmask_cpld_irq
(
struct
irq_data
*
d
)
{
{
CPLD_IRQ_mask
|=
1
<<
(
irq
-
IRQ_KEV7A400_CPLD
);
CPLD_IRQ_mask
|=
1
<<
(
d
->
irq
-
IRQ_KEV7A400_CPLD
);
CPLD_WR_PB_INT_MASK
=
CPLD_IRQ_mask
;
CPLD_WR_PB_INT_MASK
=
CPLD_IRQ_mask
;
}
}
static
struct
irq_chip
kev7a400_cpld_chip
=
{
static
struct
irq_chip
kev7a400_cpld_chip
=
{
.
name
=
"CPLD"
,
.
name
=
"CPLD"
,
.
ack
=
kev7a400_ack_cpld_irq
,
.
irq_
ack
=
kev7a400_ack_cpld_irq
,
.
mask
=
kev7a400_mask_cpld_irq
,
.
irq_
mask
=
kev7a400_mask_cpld_irq
,
.
unmask
=
kev7a400_unmask_cpld_irq
,
.
irq_
unmask
=
kev7a400_unmask_cpld_irq
,
};
};
...
...
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
View file @
3b7cff66
...
@@ -159,7 +159,7 @@ static void __init lpd7a40x_init (void)
...
@@ -159,7 +159,7 @@ static void __init lpd7a40x_init (void)
#endif
#endif
}
}
static
void
lh7a40x_ack_cpld_irq
(
u32
irq
)
static
void
lh7a40x_ack_cpld_irq
(
struct
irq_data
*
d
)
{
{
/* CPLD doesn't have ack capability, but some devices may */
/* CPLD doesn't have ack capability, but some devices may */
...
@@ -167,14 +167,14 @@ static void lh7a40x_ack_cpld_irq (u32 irq)
...
@@ -167,14 +167,14 @@ static void lh7a40x_ack_cpld_irq (u32 irq)
/* The touch control *must* mask the interrupt because the
/* The touch control *must* mask the interrupt because the
* interrupt bit is read by the driver to determine if the pen
* interrupt bit is read by the driver to determine if the pen
* is still down. */
* is still down. */
if
(
irq
==
IRQ_TOUCH
)
if
(
d
->
irq
==
IRQ_TOUCH
)
CPLD_INTERRUPTS
|=
CPLD_INTMASK_TOUCH
;
CPLD_INTERRUPTS
|=
CPLD_INTMASK_TOUCH
;
#endif
#endif
}
}
static
void
lh7a40x_mask_cpld_irq
(
u32
irq
)
static
void
lh7a40x_mask_cpld_irq
(
struct
irq_data
*
d
)
{
{
switch
(
irq
)
{
switch
(
d
->
irq
)
{
case
IRQ_LPD7A40X_ETH_INT
:
case
IRQ_LPD7A40X_ETH_INT
:
CPLD_INTERRUPTS
|=
CPLD_INTMASK_ETHERNET
;
CPLD_INTERRUPTS
|=
CPLD_INTMASK_ETHERNET
;
break
;
break
;
...
@@ -186,9 +186,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq)
...
@@ -186,9 +186,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq)
}
}
}
}
static
void
lh7a40x_unmask_cpld_irq
(
u32
irq
)
static
void
lh7a40x_unmask_cpld_irq
(
struct
irq_data
*
d
)
{
{
switch
(
irq
)
{
switch
(
d
->
irq
)
{
case
IRQ_LPD7A40X_ETH_INT
:
case
IRQ_LPD7A40X_ETH_INT
:
CPLD_INTERRUPTS
&=
~
CPLD_INTMASK_ETHERNET
;
CPLD_INTERRUPTS
&=
~
CPLD_INTMASK_ETHERNET
;
break
;
break
;
...
@@ -201,17 +201,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
...
@@ -201,17 +201,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
}
}
static
struct
irq_chip
lpd7a40x_cpld_chip
=
{
static
struct
irq_chip
lpd7a40x_cpld_chip
=
{
.
name
=
"CPLD"
,
.
name
=
"CPLD"
,
.
ack
=
lh7a40x_ack_cpld_irq
,
.
irq_
ack
=
lh7a40x_ack_cpld_irq
,
.
mask
=
lh7a40x_mask_cpld_irq
,
.
irq_
mask
=
lh7a40x_mask_cpld_irq
,
.
unmask
=
lh7a40x_unmask_cpld_irq
,
.
irq_
unmask
=
lh7a40x_unmask_cpld_irq
,
};
};
static
void
lpd7a40x_cpld_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
lpd7a40x_cpld_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
{
{
unsigned
int
mask
=
CPLD_INTERRUPTS
;
unsigned
int
mask
=
CPLD_INTERRUPTS
;
desc
->
chip
->
ack
(
irq
);
desc
->
irq_data
.
chip
->
irq_ack
(
&
desc
->
irq_data
);
if
((
mask
&
(
1
<<
0
))
==
0
)
/* WLAN */
if
((
mask
&
(
1
<<
0
))
==
0
)
/* WLAN */
generic_handle_irq
(
IRQ_LPD7A40X_ETH_INT
);
generic_handle_irq
(
IRQ_LPD7A40X_ETH_INT
);
...
@@ -221,7 +221,8 @@ static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
...
@@ -221,7 +221,8 @@ static void lpd7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
generic_handle_irq
(
IRQ_TOUCH
);
generic_handle_irq
(
IRQ_TOUCH
);
#endif
#endif
desc
->
chip
->
unmask
(
irq
);
/* Level-triggered need this */
/* Level-triggered need this */
desc
->
irq_data
.
chip
->
irq_unmask
(
&
desc
->
irq_data
);
}
}
...
...
arch/arm/mach-lh7a40x/irq-lh7a400.c
View file @
3b7cff66
...
@@ -21,34 +21,34 @@
...
@@ -21,34 +21,34 @@
/* CPU IRQ handling */
/* CPU IRQ handling */
static
void
lh7a400_mask_irq
(
u32
irq
)
static
void
lh7a400_mask_irq
(
struct
irq_data
*
d
)
{
{
INTC_INTENC
=
(
1
<<
irq
);
INTC_INTENC
=
(
1
<<
d
->
irq
);
}
}
static
void
lh7a400_unmask_irq
(
u32
irq
)
static
void
lh7a400_unmask_irq
(
struct
irq_data
*
d
)
{
{
INTC_INTENS
=
(
1
<<
irq
);
INTC_INTENS
=
(
1
<<
d
->
irq
);
}
}
static
void
lh7a400_ack_gpio_irq
(
u32
irq
)
static
void
lh7a400_ack_gpio_irq
(
struct
irq_data
*
d
)
{
{
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
irq
));
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
d
->
irq
));
INTC_INTENC
=
(
1
<<
irq
);
INTC_INTENC
=
(
1
<<
d
->
irq
);
}
}
static
struct
irq_chip
lh7a400_internal_chip
=
{
static
struct
irq_chip
lh7a400_internal_chip
=
{
.
name
=
"MPU"
,
.
name
=
"MPU"
,
.
ack
=
lh7a400_mask_irq
,
/* Level triggering -> mask is ack */
.
irq_
ack
=
lh7a400_mask_irq
,
/* Level triggering -> mask is ack */
.
mask
=
lh7a400_mask_irq
,
.
irq_
mask
=
lh7a400_mask_irq
,
.
unmask
=
lh7a400_unmask_irq
,
.
irq_
unmask
=
lh7a400_unmask_irq
,
};
};
static
struct
irq_chip
lh7a400_gpio_chip
=
{
static
struct
irq_chip
lh7a400_gpio_chip
=
{
.
name
=
"GPIO"
,
.
name
=
"GPIO"
,
.
ack
=
lh7a400_ack_gpio_irq
,
.
irq_
ack
=
lh7a400_ack_gpio_irq
,
.
mask
=
lh7a400_mask_irq
,
.
irq_
mask
=
lh7a400_mask_irq
,
.
unmask
=
lh7a400_unmask_irq
,
.
irq_
unmask
=
lh7a400_unmask_irq
,
};
};
...
...
arch/arm/mach-lh7a40x/irq-lh7a404.c
View file @
3b7cff66
...
@@ -43,64 +43,64 @@ static unsigned char irq_pri_vic2[] = {
...
@@ -43,64 +43,64 @@ static unsigned char irq_pri_vic2[] = {
/* CPU IRQ handling */
/* CPU IRQ handling */
static
void
lh7a404_vic1_mask_irq
(
u32
irq
)
static
void
lh7a404_vic1_mask_irq
(
struct
irq_data
*
d
)
{
{
VIC1_INTENCLR
=
(
1
<<
irq
);
VIC1_INTENCLR
=
(
1
<<
d
->
irq
);
}
}
static
void
lh7a404_vic1_unmask_irq
(
u32
irq
)
static
void
lh7a404_vic1_unmask_irq
(
struct
irq_data
*
d
)
{
{
VIC1_INTEN
=
(
1
<<
irq
);
VIC1_INTEN
=
(
1
<<
d
->
irq
);
}
}
static
void
lh7a404_vic2_mask_irq
(
u32
irq
)
static
void
lh7a404_vic2_mask_irq
(
struct
irq_data
*
d
)
{
{
VIC2_INTENCLR
=
(
1
<<
(
irq
-
32
));
VIC2_INTENCLR
=
(
1
<<
(
d
->
irq
-
32
));
}
}
static
void
lh7a404_vic2_unmask_irq
(
u32
irq
)
static
void
lh7a404_vic2_unmask_irq
(
struct
irq_data
*
d
)
{
{
VIC2_INTEN
=
(
1
<<
(
irq
-
32
));
VIC2_INTEN
=
(
1
<<
(
d
->
irq
-
32
));
}
}
static
void
lh7a404_vic1_ack_gpio_irq
(
u32
irq
)
static
void
lh7a404_vic1_ack_gpio_irq
(
struct
irq_data
*
d
)
{
{
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
irq
));
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
d
->
irq
));
VIC1_INTENCLR
=
(
1
<<
irq
);
VIC1_INTENCLR
=
(
1
<<
d
->
irq
);
}
}
static
void
lh7a404_vic2_ack_gpio_irq
(
u32
irq
)
static
void
lh7a404_vic2_ack_gpio_irq
(
struct
irq_data
*
d
)
{
{
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
irq
));
GPIO_GPIOFEOI
=
(
1
<<
IRQ_TO_GPIO
(
d
->
irq
));
VIC2_INTENCLR
=
(
1
<<
irq
);
VIC2_INTENCLR
=
(
1
<<
d
->
irq
);
}
}
static
struct
irq_chip
lh7a404_vic1_chip
=
{
static
struct
irq_chip
lh7a404_vic1_chip
=
{
.
name
=
"VIC1"
,
.
name
=
"VIC1"
,
.
ack
=
lh7a404_vic1_mask_irq
,
/* Because level-triggered */
.
irq_
ack
=
lh7a404_vic1_mask_irq
,
/* Because level-triggered */
.
mask
=
lh7a404_vic1_mask_irq
,
.
irq_
mask
=
lh7a404_vic1_mask_irq
,
.
unmask
=
lh7a404_vic1_unmask_irq
,
.
irq_
unmask
=
lh7a404_vic1_unmask_irq
,
};
};
static
struct
irq_chip
lh7a404_vic2_chip
=
{
static
struct
irq_chip
lh7a404_vic2_chip
=
{
.
name
=
"VIC2"
,
.
name
=
"VIC2"
,
.
ack
=
lh7a404_vic2_mask_irq
,
/* Because level-triggered */
.
irq_
ack
=
lh7a404_vic2_mask_irq
,
/* Because level-triggered */
.
mask
=
lh7a404_vic2_mask_irq
,
.
irq_
mask
=
lh7a404_vic2_mask_irq
,
.
unmask
=
lh7a404_vic2_unmask_irq
,
.
irq_
unmask
=
lh7a404_vic2_unmask_irq
,
};
};
static
struct
irq_chip
lh7a404_gpio_vic1_chip
=
{
static
struct
irq_chip
lh7a404_gpio_vic1_chip
=
{
.
name
=
"GPIO-VIC1"
,
.
name
=
"GPIO-VIC1"
,
.
ack
=
lh7a404_vic1_ack_gpio_irq
,
.
irq_
ack
=
lh7a404_vic1_ack_gpio_irq
,
.
mask
=
lh7a404_vic1_mask_irq
,
.
irq_
mask
=
lh7a404_vic1_mask_irq
,
.
unmask
=
lh7a404_vic1_unmask_irq
,
.
irq_
unmask
=
lh7a404_vic1_unmask_irq
,
};
};
static
struct
irq_chip
lh7a404_gpio_vic2_chip
=
{
static
struct
irq_chip
lh7a404_gpio_vic2_chip
=
{
.
name
=
"GPIO-VIC2"
,
.
name
=
"GPIO-VIC2"
,
.
ack
=
lh7a404_vic2_ack_gpio_irq
,
.
irq_
ack
=
lh7a404_vic2_ack_gpio_irq
,
.
mask
=
lh7a404_vic2_mask_irq
,
.
irq_
mask
=
lh7a404_vic2_mask_irq
,
.
unmask
=
lh7a404_vic2_unmask_irq
,
.
irq_
unmask
=
lh7a404_vic2_unmask_irq
,
};
};
/* IRQ initialization */
/* IRQ initialization */
...
...
arch/arm/mach-lh7a40x/irq-lpd7a40x.c
View file @
3b7cff66
...
@@ -20,14 +20,14 @@
...
@@ -20,14 +20,14 @@
#include "common.h"
#include "common.h"
static
void
lh7a40x_ack_cpld_irq
(
u32
irq
)
static
void
lh7a40x_ack_cpld_irq
(
struct
irq_data
*
d
)
{
{
/* CPLD doesn't have ack capability */
/* CPLD doesn't have ack capability */
}
}
static
void
lh7a40x_mask_cpld_irq
(
u32
irq
)
static
void
lh7a40x_mask_cpld_irq
(
struct
irq_data
*
d
)
{
{
switch
(
irq
)
{
switch
(
d
->
irq
)
{
case
IRQ_LPD7A40X_ETH_INT
:
case
IRQ_LPD7A40X_ETH_INT
:
CPLD_INTERRUPTS
=
CPLD_INTERRUPTS
|
0x4
;
CPLD_INTERRUPTS
=
CPLD_INTERRUPTS
|
0x4
;
break
;
break
;
...
@@ -37,9 +37,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq)
...
@@ -37,9 +37,9 @@ static void lh7a40x_mask_cpld_irq (u32 irq)
}
}
}
}
static
void
lh7a40x_unmask_cpld_irq
(
u32
irq
)
static
void
lh7a40x_unmask_cpld_irq
(
struct
irq_data
*
d
)
{
{
switch
(
irq
)
{
switch
(
d
->
irq
)
{
case
IRQ_LPD7A40X_ETH_INT
:
case
IRQ_LPD7A40X_ETH_INT
:
CPLD_INTERRUPTS
=
CPLD_INTERRUPTS
&
~
0x4
;
CPLD_INTERRUPTS
=
CPLD_INTERRUPTS
&
~
0x4
;
break
;
break
;
...
@@ -50,17 +50,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
...
@@ -50,17 +50,17 @@ static void lh7a40x_unmask_cpld_irq (u32 irq)
}
}
static
struct
irq_chip
lh7a40x_cpld_chip
=
{
static
struct
irq_chip
lh7a40x_cpld_chip
=
{
.
name
=
"CPLD"
,
.
name
=
"CPLD"
,
.
ack
=
lh7a40x_ack_cpld_irq
,
.
irq_
ack
=
lh7a40x_ack_cpld_irq
,
.
mask
=
lh7a40x_mask_cpld_irq
,
.
irq_
mask
=
lh7a40x_mask_cpld_irq
,
.
unmask
=
lh7a40x_unmask_cpld_irq
,
.
irq_
unmask
=
lh7a40x_unmask_cpld_irq
,
};
};
static
void
lh7a40x_cpld_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
static
void
lh7a40x_cpld_handler
(
unsigned
int
irq
,
struct
irq_desc
*
desc
)
{
{
unsigned
int
mask
=
CPLD_INTERRUPTS
;
unsigned
int
mask
=
CPLD_INTERRUPTS
;
desc
->
chip
->
ack
(
irq
);
desc
->
irq_data
.
chip
->
ack
(
irq
);
if
((
mask
&
0x1
)
==
0
)
/* WLAN */
if
((
mask
&
0x1
)
==
0
)
/* WLAN */
generic_handle_irq
(
IRQ_LPD7A40X_ETH_INT
);
generic_handle_irq
(
IRQ_LPD7A40X_ETH_INT
);
...
@@ -68,7 +68,7 @@ static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
...
@@ -68,7 +68,7 @@ static void lh7a40x_cpld_handler (unsigned int irq, struct irq_desc *desc)
if
((
mask
&
0x2
)
==
0
)
/* Touch */
if
((
mask
&
0x2
)
==
0
)
/* Touch */
generic_handle_irq
(
IRQ_LPD7A400_TS
);
generic_handle_irq
(
IRQ_LPD7A400_TS
);
desc
->
chip
->
unmask
(
irq
);
/* Level-triggered need this */
desc
->
irq_data
.
chip
->
unmask
(
irq
);
/* Level-triggered need this */
}
}
...
...
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