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
79335a2c
Commit
79335a2c
authored
Jun 04, 2015
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARCv2: SLC: Allow boot time disable
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
f2b0b25a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
arch/arc/mm/cache.c
arch/arc/mm/cache.c
+19
-2
No files found.
arch/arc/mm/cache.c
View file @
79335a2c
...
...
@@ -23,6 +23,7 @@
static
int
l2_line_sz
;
int
ioc_exists
;
volatile
int
slc_enable
=
1
;
void
(
*
_cache_line_loop_ic_fn
)(
unsigned
long
paddr
,
unsigned
long
vaddr
,
unsigned
long
sz
,
const
int
cacheop
);
...
...
@@ -36,6 +37,7 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
int
n
=
0
;
struct
cpuinfo_arc_cache
*
p
;
#define IS_USED_RUN(v) ((v) ? "" : "(disabled) ")
#define PR_CACHE(p, cfg, str) \
if (!(p)->ver) \
n += scnprintf(buf + n, len - n, str"\t\t: N/A\n"); \
...
...
@@ -53,7 +55,8 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
p
=
&
cpuinfo_arc700
[
c
].
slc
;
if
(
p
->
ver
)
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
"SLC
\t\t
: %uK, %uB Line
\n
"
,
p
->
sz_k
,
p
->
line_len
);
"SLC
\t\t
: %uK, %uB Line%s
\n
"
,
p
->
sz_k
,
p
->
line_len
,
IS_USED_RUN
(
slc_enable
));
if
(
ioc_exists
)
n
+=
scnprintf
(
buf
+
n
,
len
-
n
,
"IOC
\t\t
: exists
\n
"
);
...
...
@@ -908,6 +911,20 @@ void arc_cache_init(void)
}
}
if
(
is_isa_arcv2
()
&&
l2_line_sz
&&
!
slc_enable
)
{
/* IM set : flush before invalidate */
write_aux_reg
(
ARC_REG_SLC_CTRL
,
read_aux_reg
(
ARC_REG_SLC_CTRL
)
|
SLC_CTRL_IM
);
write_aux_reg
(
ARC_REG_SLC_INVALIDATE
,
1
);
/* Important to wait for flush to complete */
while
(
read_aux_reg
(
ARC_REG_SLC_CTRL
)
&
SLC_CTRL_BUSY
);
write_aux_reg
(
ARC_REG_SLC_CTRL
,
read_aux_reg
(
ARC_REG_SLC_CTRL
)
|
SLC_CTRL_DISABLE
);
}
if
(
is_isa_arcv2
()
&&
ioc_exists
)
{
/* IO coherency base - 0x8z */
write_aux_reg
(
ARC_REG_IO_COH_AP0_BASE
,
0x80000
);
...
...
@@ -921,7 +938,7 @@ void arc_cache_init(void)
__dma_cache_wback_inv
=
__dma_cache_wback_inv_ioc
;
__dma_cache_inv
=
__dma_cache_inv_ioc
;
__dma_cache_wback
=
__dma_cache_wback_ioc
;
}
else
if
(
is_isa_arcv2
()
&&
l2_line_sz
)
{
}
else
if
(
is_isa_arcv2
()
&&
l2_line_sz
&&
slc_enable
)
{
__dma_cache_wback_inv
=
__dma_cache_wback_inv_slc
;
__dma_cache_inv
=
__dma_cache_inv_slc
;
__dma_cache_wback
=
__dma_cache_wback_slc
;
...
...
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