Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
a5b24110
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a5b24110
编写于
12月 23, 2016
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.denx.de/u-boot-sunxi
上级
7ceae0ea
65d2d4f2
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
45 addition
and
0 deletion
+45
-0
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
+1
-0
arch/arm/mach-sunxi/cpu_info.c
arch/arm/mach-sunxi/cpu_info.c
+44
-0
未找到文件。
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
浏览文件 @
a5b24110
...
...
@@ -97,6 +97,7 @@
#if defined(CONFIG_MACH_SUN8I_A83T) || defined(CONFIG_MACH_SUN8I_H3) || \
defined(CONFIG_MACH_SUN50I)
/* SID address space starts at 0x01c1400, but e-fuse is at offset 0x200 */
#define SUNXI_SIDC_BASE 0x01c14000
#define SUNXI_SID_BASE 0x01c14200
#else
#define SUNXI_SID_BASE 0x01c23800
...
...
arch/arm/mach-sunxi/cpu_info.c
浏览文件 @
a5b24110
...
...
@@ -99,10 +99,54 @@ int print_cpuinfo(void)
}
#endif
#ifdef CONFIG_MACH_SUN8I_H3
#define SIDC_PRCTL 0x40
#define SIDC_RDKEY 0x60
#define SIDC_OP_LOCK 0xAC
uint32_t
sun8i_efuse_read
(
uint32_t
offset
)
{
uint32_t
reg_val
;
reg_val
=
readl
(
SUNXI_SIDC_BASE
+
SIDC_PRCTL
);
reg_val
&=
~
(((
0x1ff
)
<<
16
)
|
0x3
);
reg_val
|=
(
offset
<<
16
);
writel
(
reg_val
,
SUNXI_SIDC_BASE
+
SIDC_PRCTL
);
reg_val
&=
~
(((
0xff
)
<<
8
)
|
0x3
);
reg_val
|=
(
SIDC_OP_LOCK
<<
8
)
|
0x2
;
writel
(
reg_val
,
SUNXI_SIDC_BASE
+
SIDC_PRCTL
);
while
(
readl
(
SUNXI_SIDC_BASE
+
SIDC_PRCTL
)
&
0x2
);
reg_val
&=
~
(((
0x1ff
)
<<
16
)
|
((
0xff
)
<<
8
)
|
0x3
);
writel
(
reg_val
,
SUNXI_SIDC_BASE
+
SIDC_PRCTL
);
reg_val
=
readl
(
SUNXI_SIDC_BASE
+
SIDC_RDKEY
);
return
reg_val
;
}
#endif
int
sunxi_get_sid
(
unsigned
int
*
sid
)
{
#ifdef CONFIG_AXP221_POWER
return
axp_get_sid
(
sid
);
#elif defined CONFIG_MACH_SUN8I_H3
/*
* H3 SID controller has a bug, which makes the initial value of
* SUNXI_SID_BASE at boot wrong.
* Read the value directly from SID controller, in order to get
* the correct value, and also refresh the wrong value at
* SUNXI_SID_BASE.
*/
int
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
sid
[
i
]
=
sun8i_efuse_read
(
i
*
4
);
return
0
;
#elif defined SUNXI_SID_BASE
int
i
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录