Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
f74c31d5
Commit
f74c31d5
authored
Nov 29, 2007
by
Jesper Nilsson
Committed by
Jesper Nilsson
Feb 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRIS v32: Add L2 cache initialization code.
parent
58d08319
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
arch/cris/arch-v32/mm/l2cache.c
arch/cris/arch-v32/mm/l2cache.c
+29
-0
No files found.
arch/cris/arch-v32/mm/l2cache.c
0 → 100644
View file @
f74c31d5
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <memmap.h>
#include <hwregs/reg_map.h>
#include <hwregs/reg_rdwr.h>
#include <hwregs/l2cache_defs.h>
#include <asm/io.h>
#define L2CACHE_SIZE 64
int
__init
l2cache_init
(
void
)
{
reg_l2cache_rw_ctrl
ctrl
=
{
0
};
reg_l2cache_rw_cfg
cfg
=
{.
en
=
regk_l2cache_yes
};
ctrl
.
csize
=
L2CACHE_SIZE
;
ctrl
.
cbase
=
L2CACHE_SIZE
/
4
+
(
L2CACHE_SIZE
%
4
?
1
:
0
);
REG_WR
(
l2cache
,
regi_l2cache
,
rw_ctrl
,
ctrl
);
/* Flush the tag memory */
memset
((
void
*
)(
MEM_INTMEM_START
|
MEM_NON_CACHEABLE
),
0
,
2
*
1024
);
/* Enable the cache */
REG_WR
(
l2cache
,
regi_l2cache
,
rw_cfg
,
cfg
);
return
0
;
}
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