Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d1839136
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d1839136
编写于
11月 20, 2007
作者:
P
Paul Mundt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sh: Plug in simple SH-5 subtype probing.
Signed-off-by:
N
Paul Mundt
<
lethal@linux-sh.org
>
上级
92b59258
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
2 deletion
+78
-2
arch/sh/kernel/cpu/sh5/Makefile
arch/sh/kernel/cpu/sh5/Makefile
+2
-2
arch/sh/kernel/cpu/sh5/probe.c
arch/sh/kernel/cpu/sh5/probe.c
+76
-0
未找到文件。
arch/sh/kernel/cpu/sh5/Makefile
浏览文件 @
d1839136
obj-y
:=
entry.o switchto.o
obj-y
:=
entry.o
probe.o
switchto.o
obj-$(CONFIG_KALLSYMS)
+=
unwind.o
obj-$(CONFIG_SH_FPU)
+=
fpu.o
obj-$(CONFIG_KALLSYMS)
+=
unwind.o
arch/sh/kernel/cpu/sh5/probe.c
0 → 100644
浏览文件 @
d1839136
/*
* arch/sh/kernel/cpu/sh5/probe.c
*
* CPU Subtype Probing for SH-5.
*
* Copyright (C) 2000, 2001 Paolo Alberelli
* Copyright (C) 2003 - 2007 Paul Mundt
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/init.h>
#include <linux/io.h>
#include <linux/string.h>
#include <asm/processor.h>
#include <asm/cache.h>
int
__init
detect_cpu_and_cache_system
(
void
)
{
unsigned
long
long
cir
;
/* Do peeks in real mode to avoid having to set up a mapping for the
WPC registers. On SH5-101 cut2, such a mapping would be exposed to
an address translation erratum which would make it hard to set up
correctly. */
cir
=
peek_real_address_q
(
0x0d000008
);
if
((
cir
&
0xffff
)
==
0x5103
)
{
boot_cpu_data
.
type
=
CPU_SH5_103
;
}
else
if
(((
cir
>>
32
)
&
0xffff
)
==
0x51e2
)
{
/* CPU.VCR aliased at CIR address on SH5-101 */
boot_cpu_data
.
type
=
CPU_SH5_101
;
}
else
{
boot_cpu_data
.
type
=
CPU_SH_NONE
;
}
/*
* First, setup some sane values for the I-cache.
*/
boot_cpu_data
.
icache
.
ways
=
4
;
boot_cpu_data
.
icache
.
sets
=
256
;
boot_cpu_data
.
icache
.
linesz
=
L1_CACHE_BYTES
;
#if 0
/*
* FIXME: This can probably be cleaned up a bit as well.. for example,
* do we really need the way shift _and_ the way_step_shift ?? Judging
* by the existing code, I would guess no.. is there any valid reason
* why we need to be tracking this around?
*/
boot_cpu_data.icache.way_shift = 13;
boot_cpu_data.icache.entry_shift = 5;
boot_cpu_data.icache.set_shift = 4;
boot_cpu_data.icache.way_step_shift = 16;
boot_cpu_data.icache.asid_shift = 2;
/*
* way offset = cache size / associativity, so just don't factor in
* associativity in the first place..
*/
boot_cpu_data.icache.way_ofs = boot_cpu_data.icache.sets *
boot_cpu_data.icache.linesz;
boot_cpu_data.icache.asid_mask = 0x3fc;
boot_cpu_data.icache.idx_mask = 0x1fe0;
boot_cpu_data.icache.epn_mask = 0xffffe000;
#endif
boot_cpu_data
.
icache
.
flags
=
0
;
/* A trivial starting point.. */
memcpy
(
&
boot_cpu_data
.
dcache
,
&
boot_cpu_data
.
icache
,
sizeof
(
struct
cache_info
));
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录