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
5f010384
Commit
5f010384
authored
Oct 27, 2010
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: mach-systemh: irq_data conversion.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
949bf166
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
36 deletions
+21
-36
arch/sh/boards/mach-systemh/irq.c
arch/sh/boards/mach-systemh/irq.c
+21
-36
No files found.
arch/sh/boards/mach-systemh/irq.c
View file @
5f010384
...
...
@@ -23,54 +23,39 @@
static
unsigned
long
*
systemh_irq_mask_register
=
(
unsigned
long
*
)
0xB3F10004
;
static
unsigned
long
*
systemh_irq_request_register
=
(
unsigned
long
*
)
0xB3F10000
;
/* forward declaration */
static
void
enable_systemh_irq
(
unsigned
int
irq
);
static
void
disable_systemh_irq
(
unsigned
int
irq
);
static
void
mask_and_ack_systemh
(
unsigned
int
);
static
struct
irq_chip
systemh_irq_type
=
{
.
name
=
" SystemH Register"
,
.
unmask
=
enable_systemh_irq
,
.
mask
=
disable_systemh_irq
,
.
ack
=
mask_and_ack_systemh
,
};
static
void
disable_systemh_irq
(
unsigned
int
irq
)
static
void
disable_systemh_irq
(
struct
irq_data
*
data
)
{
if
(
systemh_irq_mask_register
)
{
unsigned
long
val
,
mask
=
0x01
<<
1
;
unsigned
long
val
,
mask
=
0x01
<<
1
;
/* Clear the "irq"th bit in the mask and set it in the request */
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_mask_register
);
val
&=
~
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_mask_register
);
/* Clear the "irq"th bit in the mask and set it in the request */
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_mask_register
);
val
&=
~
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_mask_register
);
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_request_register
);
val
|=
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_request_register
);
}
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_request_register
);
val
|=
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_request_register
);
}
static
void
enable_systemh_irq
(
unsigned
int
irq
)
static
void
enable_systemh_irq
(
struct
irq_data
*
data
)
{
if
(
systemh_irq_mask_register
)
{
unsigned
long
val
,
mask
=
0x01
<<
1
;
unsigned
long
val
,
mask
=
0x01
<<
1
;
/* Set "irq"th bit in the mask register */
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_mask_register
);
val
|=
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_mask_register
);
}
/* Set "irq"th bit in the mask register */
val
=
__raw_readl
((
unsigned
long
)
systemh_irq_mask_register
);
val
|=
mask
;
__raw_writel
(
val
,
(
unsigned
long
)
systemh_irq_mask_register
);
}
static
void
mask_and_ack_systemh
(
unsigned
int
irq
)
{
disable_systemh_irq
(
irq
);
}
static
struct
irq_chip
systemh_irq_type
=
{
.
name
=
"SystemH Register"
,
.
irq_unmask
=
enable_systemh_irq
,
.
irq_mask
=
disable_systemh_irq
,
};
void
make_systemh_irq
(
unsigned
int
irq
)
{
disable_irq_nosync
(
irq
);
set_irq_chip_and_handler
(
irq
,
&
systemh_irq_type
,
handle_level_irq
);
disable_systemh_irq
(
irq
);
disable_systemh_irq
(
irq
_get_irq_data
(
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