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
62429e03
Commit
62429e03
authored
Oct 01, 2008
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Use __raw_xxx() I/O accessors for INTC and IPR.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
64c9627c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
arch/sh/kernel/cpu/irq/intc.c
arch/sh/kernel/cpu/irq/intc.c
+12
-12
arch/sh/kernel/cpu/irq/ipr.c
arch/sh/kernel/cpu/irq/ipr.c
+2
-2
No files found.
arch/sh/kernel/cpu/irq/intc.c
View file @
62429e03
...
...
@@ -86,24 +86,24 @@ static inline unsigned int set_field(unsigned int value,
static
void
write_8
(
unsigned
long
addr
,
unsigned
long
h
,
unsigned
long
data
)
{
ctrl_out
b
(
set_field
(
0
,
data
,
h
),
addr
);
__raw_write
b
(
set_field
(
0
,
data
,
h
),
addr
);
}
static
void
write_16
(
unsigned
long
addr
,
unsigned
long
h
,
unsigned
long
data
)
{
ctrl_out
w
(
set_field
(
0
,
data
,
h
),
addr
);
__raw_write
w
(
set_field
(
0
,
data
,
h
),
addr
);
}
static
void
write_32
(
unsigned
long
addr
,
unsigned
long
h
,
unsigned
long
data
)
{
ctrl_out
l
(
set_field
(
0
,
data
,
h
),
addr
);
__raw_write
l
(
set_field
(
0
,
data
,
h
),
addr
);
}
static
void
modify_8
(
unsigned
long
addr
,
unsigned
long
h
,
unsigned
long
data
)
{
unsigned
long
flags
;
local_irq_save
(
flags
);
ctrl_outb
(
set_field
(
ctrl_in
b
(
addr
),
data
,
h
),
addr
);
__raw_writeb
(
set_field
(
__raw_read
b
(
addr
),
data
,
h
),
addr
);
local_irq_restore
(
flags
);
}
...
...
@@ -111,7 +111,7 @@ static void modify_16(unsigned long addr, unsigned long h, unsigned long data)
{
unsigned
long
flags
;
local_irq_save
(
flags
);
ctrl_outw
(
set_field
(
ctrl_in
w
(
addr
),
data
,
h
),
addr
);
__raw_writew
(
set_field
(
__raw_read
w
(
addr
),
data
,
h
),
addr
);
local_irq_restore
(
flags
);
}
...
...
@@ -119,7 +119,7 @@ static void modify_32(unsigned long addr, unsigned long h, unsigned long data)
{
unsigned
long
flags
;
local_irq_save
(
flags
);
ctrl_outl
(
set_field
(
ctrl_in
l
(
addr
),
data
,
h
),
addr
);
__raw_writel
(
set_field
(
__raw_read
l
(
addr
),
data
,
h
),
addr
);
local_irq_restore
(
flags
);
}
...
...
@@ -246,16 +246,16 @@ static void intc_mask_ack(unsigned int irq)
addr
=
INTC_REG
(
d
,
_INTC_ADDR_D
(
handle
),
0
);
switch
(
_INTC_FN
(
handle
))
{
case
REG_FN_MODIFY_BASE
+
0
:
/* 8bit */
ctrl_in
b
(
addr
);
ctrl_out
b
(
0xff
^
set_field
(
0
,
1
,
handle
),
addr
);
__raw_read
b
(
addr
);
__raw_write
b
(
0xff
^
set_field
(
0
,
1
,
handle
),
addr
);
break
;
case
REG_FN_MODIFY_BASE
+
1
:
/* 16bit */
ctrl_in
w
(
addr
);
ctrl_out
w
(
0xffff
^
set_field
(
0
,
1
,
handle
),
addr
);
__raw_read
w
(
addr
);
__raw_write
w
(
0xffff
^
set_field
(
0
,
1
,
handle
),
addr
);
break
;
case
REG_FN_MODIFY_BASE
+
3
:
/* 32bit */
ctrl_in
l
(
addr
);
ctrl_out
l
(
0xffffffff
^
set_field
(
0
,
1
,
handle
),
addr
);
__raw_read
l
(
addr
);
__raw_write
l
(
0xffffffff
^
set_field
(
0
,
1
,
handle
),
addr
);
break
;
default:
BUG
();
...
...
arch/sh/kernel/cpu/irq/ipr.c
View file @
62429e03
...
...
@@ -33,7 +33,7 @@ static void disable_ipr_irq(unsigned int irq)
struct
ipr_data
*
p
=
get_irq_chip_data
(
irq
);
unsigned
long
addr
=
get_ipr_desc
(
irq
)
->
ipr_offsets
[
p
->
ipr_idx
];
/* Set the priority in IPR to 0 */
ctrl_outw
(
ctrl_in
w
(
addr
)
&
(
0xffff
^
(
0xf
<<
p
->
shift
)),
addr
);
__raw_writew
(
__raw_read
w
(
addr
)
&
(
0xffff
^
(
0xf
<<
p
->
shift
)),
addr
);
}
static
void
enable_ipr_irq
(
unsigned
int
irq
)
...
...
@@ -41,7 +41,7 @@ static void enable_ipr_irq(unsigned int irq)
struct
ipr_data
*
p
=
get_irq_chip_data
(
irq
);
unsigned
long
addr
=
get_ipr_desc
(
irq
)
->
ipr_offsets
[
p
->
ipr_idx
];
/* Set priority in IPR back to original value */
ctrl_outw
(
ctrl_in
w
(
addr
)
|
(
p
->
priority
<<
p
->
shift
),
addr
);
__raw_writew
(
__raw_read
w
(
addr
)
|
(
p
->
priority
<<
p
->
shift
),
addr
);
}
/*
...
...
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