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
3cdb791b
Commit
3cdb791b
authored
Nov 29, 2010
by
Lennert Buytenhek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: ks8695: irq_data conversion.
Signed-off-by:
Lennert Buytenhek
<
buytenh@secretlab.ca
>
parent
ee04087a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
arch/arm/mach-ks8695/irq.c
arch/arm/mach-ks8695/irq.c
+22
-21
No files found.
arch/arm/mach-ks8695/irq.c
View file @
3cdb791b
...
@@ -34,29 +34,29 @@
...
@@ -34,29 +34,29 @@
#include <mach/regs-irq.h>
#include <mach/regs-irq.h>
#include <mach/regs-gpio.h>
#include <mach/regs-gpio.h>
static
void
ks8695_irq_mask
(
unsigned
int
irqno
)
static
void
ks8695_irq_mask
(
struct
irq_data
*
d
)
{
{
unsigned
long
inten
;
unsigned
long
inten
;
inten
=
__raw_readl
(
KS8695_IRQ_VA
+
KS8695_INTEN
);
inten
=
__raw_readl
(
KS8695_IRQ_VA
+
KS8695_INTEN
);
inten
&=
~
(
1
<<
irqno
);
inten
&=
~
(
1
<<
d
->
irq
);
__raw_writel
(
inten
,
KS8695_IRQ_VA
+
KS8695_INTEN
);
__raw_writel
(
inten
,
KS8695_IRQ_VA
+
KS8695_INTEN
);
}
}
static
void
ks8695_irq_unmask
(
unsigned
int
irqno
)
static
void
ks8695_irq_unmask
(
struct
irq_data
*
d
)
{
{
unsigned
long
inten
;
unsigned
long
inten
;
inten
=
__raw_readl
(
KS8695_IRQ_VA
+
KS8695_INTEN
);
inten
=
__raw_readl
(
KS8695_IRQ_VA
+
KS8695_INTEN
);
inten
|=
(
1
<<
irqno
);
inten
|=
(
1
<<
d
->
irq
);
__raw_writel
(
inten
,
KS8695_IRQ_VA
+
KS8695_INTEN
);
__raw_writel
(
inten
,
KS8695_IRQ_VA
+
KS8695_INTEN
);
}
}
static
void
ks8695_irq_ack
(
unsigned
int
irqno
)
static
void
ks8695_irq_ack
(
struct
irq_data
*
d
)
{
{
__raw_writel
((
1
<<
irqno
),
KS8695_IRQ_VA
+
KS8695_INTST
);
__raw_writel
((
1
<<
d
->
irq
),
KS8695_IRQ_VA
+
KS8695_INTST
);
}
}
...
@@ -64,7 +64,7 @@ static struct irq_chip ks8695_irq_level_chip;
...
@@ -64,7 +64,7 @@ static struct irq_chip ks8695_irq_level_chip;
static
struct
irq_chip
ks8695_irq_edge_chip
;
static
struct
irq_chip
ks8695_irq_edge_chip
;
static
int
ks8695_irq_set_type
(
unsigned
int
irqno
,
unsigned
int
type
)
static
int
ks8695_irq_set_type
(
struct
irq_data
*
d
,
unsigned
int
type
)
{
{
unsigned
long
ctrl
,
mode
;
unsigned
long
ctrl
,
mode
;
unsigned
short
level_triggered
=
0
;
unsigned
short
level_triggered
=
0
;
...
@@ -93,7 +93,7 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
...
@@ -93,7 +93,7 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
switch
(
irqno
)
{
switch
(
d
->
irq
)
{
case
KS8695_IRQ_EXTERN0
:
case
KS8695_IRQ_EXTERN0
:
ctrl
&=
~
IOPC_IOEINT0TM
;
ctrl
&=
~
IOPC_IOEINT0TM
;
ctrl
|=
IOPC_IOEINT0_MODE
(
mode
);
ctrl
|=
IOPC_IOEINT0_MODE
(
mode
);
...
@@ -115,12 +115,12 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
...
@@ -115,12 +115,12 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
}
}
if
(
level_triggered
)
{
if
(
level_triggered
)
{
set_irq_chip
(
irqno
,
&
ks8695_irq_level_chip
);
set_irq_chip
(
d
->
irq
,
&
ks8695_irq_level_chip
);
set_irq_handler
(
irqno
,
handle_level_irq
);
set_irq_handler
(
d
->
irq
,
handle_level_irq
);
}
}
else
{
else
{
set_irq_chip
(
irqno
,
&
ks8695_irq_edge_chip
);
set_irq_chip
(
d
->
irq
,
&
ks8695_irq_edge_chip
);
set_irq_handler
(
irqno
,
handle_edge_irq
);
set_irq_handler
(
d
->
irq
,
handle_edge_irq
);
}
}
__raw_writel
(
ctrl
,
KS8695_GPIO_VA
+
KS8695_IOPC
);
__raw_writel
(
ctrl
,
KS8695_GPIO_VA
+
KS8695_IOPC
);
...
@@ -128,17 +128,17 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
...
@@ -128,17 +128,17 @@ static int ks8695_irq_set_type(unsigned int irqno, unsigned int type)
}
}
static
struct
irq_chip
ks8695_irq_level_chip
=
{
static
struct
irq_chip
ks8695_irq_level_chip
=
{
.
ack
=
ks8695_irq_mask
,
.
irq_ack
=
ks8695_irq_mask
,
.
mask
=
ks8695_irq_mask
,
.
irq_mask
=
ks8695_irq_mask
,
.
unmask
=
ks8695_irq_unmask
,
.
irq_unmask
=
ks8695_irq_unmask
,
.
set_type
=
ks8695_irq_set_type
,
.
irq_
set_type
=
ks8695_irq_set_type
,
};
};
static
struct
irq_chip
ks8695_irq_edge_chip
=
{
static
struct
irq_chip
ks8695_irq_edge_chip
=
{
.
ack
=
ks8695_irq_ack
,
.
irq_ack
=
ks8695_irq_ack
,
.
mask
=
ks8695_irq_mask
,
.
irq_mask
=
ks8695_irq_mask
,
.
unmask
=
ks8695_irq_unmask
,
.
irq_unmask
=
ks8695_irq_unmask
,
.
set_type
=
ks8695_irq_set_type
,
.
irq_
set_type
=
ks8695_irq_set_type
,
};
};
void
__init
ks8695_init_irq
(
void
)
void
__init
ks8695_init_irq
(
void
)
...
@@ -164,7 +164,8 @@ void __init ks8695_init_irq(void)
...
@@ -164,7 +164,8 @@ void __init ks8695_init_irq(void)
/* Edge-triggered interrupts */
/* Edge-triggered interrupts */
default:
default:
ks8695_irq_ack
(
irq
);
/* clear pending bit */
/* clear pending bit */
ks8695_irq_ack
(
irq_get_irq_data
(
irq
));
set_irq_chip
(
irq
,
&
ks8695_irq_edge_chip
);
set_irq_chip
(
irq
,
&
ks8695_irq_edge_chip
);
set_irq_handler
(
irq
,
handle_edge_irq
);
set_irq_handler
(
irq
,
handle_edge_irq
);
}
}
...
...
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