Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
d555a1a1
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d555a1a1
编写于
5月 05, 2015
作者:
T
Thierry Reding
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-4.2/ramcode' into for-4.2/emc
上级
b787f68c
6ea2609a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
0 deletion
+24
-0
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
...ation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
+2
-0
drivers/soc/tegra/fuse/tegra-apbmisc.c
drivers/soc/tegra/fuse/tegra-apbmisc.c
+21
-0
include/soc/tegra/fuse.h
include/soc/tegra/fuse.h
+1
-0
未找到文件。
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
浏览文件 @
d555a1a1
...
@@ -10,3 +10,5 @@ Required properties:
...
@@ -10,3 +10,5 @@ Required properties:
The second entry gives the physical address and length of the
The second entry gives the physical address and length of the
registers indicating the strapping options.
registers indicating the strapping options.
Optional properties:
- nvidia,long-ram-code: If present, the RAM code is long (4 bit). If not, short (2 bit).
drivers/soc/tegra/fuse/tegra-apbmisc.c
浏览文件 @
d555a1a1
...
@@ -28,8 +28,15 @@
...
@@ -28,8 +28,15 @@
#define APBMISC_SIZE 0x64
#define APBMISC_SIZE 0x64
#define FUSE_SKU_INFO 0x10
#define FUSE_SKU_INFO 0x10
#define PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT 4
#define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_LONG \
(0xf << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT)
#define PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT \
(0x3 << PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT)
static
void
__iomem
*
apbmisc_base
;
static
void
__iomem
*
apbmisc_base
;
static
void
__iomem
*
strapping_base
;
static
void
__iomem
*
strapping_base
;
static
bool
long_ram_code
;
u32
tegra_read_chipid
(
void
)
u32
tegra_read_chipid
(
void
)
{
{
...
@@ -54,6 +61,18 @@ u32 tegra_read_straps(void)
...
@@ -54,6 +61,18 @@ u32 tegra_read_straps(void)
return
0
;
return
0
;
}
}
u32
tegra_read_ram_code
(
void
)
{
u32
straps
=
tegra_read_straps
();
if
(
long_ram_code
)
straps
&=
PMC_STRAPPING_OPT_A_RAM_CODE_MASK_LONG
;
else
straps
&=
PMC_STRAPPING_OPT_A_RAM_CODE_MASK_SHORT
;
return
straps
>>
PMC_STRAPPING_OPT_A_RAM_CODE_SHIFT
;
}
static
const
struct
of_device_id
apbmisc_match
[]
__initconst
=
{
static
const
struct
of_device_id
apbmisc_match
[]
__initconst
=
{
{
.
compatible
=
"nvidia,tegra20-apbmisc"
,
},
{
.
compatible
=
"nvidia,tegra20-apbmisc"
,
},
{},
{},
...
@@ -112,4 +131,6 @@ void __init tegra_init_apbmisc(void)
...
@@ -112,4 +131,6 @@ void __init tegra_init_apbmisc(void)
strapping_base
=
of_iomap
(
np
,
1
);
strapping_base
=
of_iomap
(
np
,
1
);
if
(
!
strapping_base
)
if
(
!
strapping_base
)
pr_err
(
"ioremap tegra strapping_base failed
\n
"
);
pr_err
(
"ioremap tegra strapping_base failed
\n
"
);
long_ram_code
=
of_property_read_bool
(
np
,
"nvidia,long-ram-code"
);
}
}
include/soc/tegra/fuse.h
浏览文件 @
d555a1a1
...
@@ -56,6 +56,7 @@ struct tegra_sku_info {
...
@@ -56,6 +56,7 @@ struct tegra_sku_info {
};
};
u32
tegra_read_straps
(
void
);
u32
tegra_read_straps
(
void
);
u32
tegra_read_ram_code
(
void
);
u32
tegra_read_chipid
(
void
);
u32
tegra_read_chipid
(
void
);
int
tegra_fuse_readl
(
unsigned
long
offset
,
u32
*
value
);
int
tegra_fuse_readl
(
unsigned
long
offset
,
u32
*
value
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录