Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e129fdb9
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看板
提交
e129fdb9
编写于
3月 26, 2015
作者:
T
Tony Lindgren
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'omap-for-v4.1/ocp2scp' into omap-for-v4.1/fixes-not-urgent
上级
afda768f
cdf61240
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
3 deletion
+38
-3
Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
+2
-1
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/am4372.dtsi
+2
-2
drivers/bus/omap-ocp2scp.c
drivers/bus/omap-ocp2scp.c
+34
-0
未找到文件。
Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
浏览文件 @
e129fdb9
* OMAP OCP2SCP - ocp interface to scp interface
properties:
- compatible : Should be "ti,omap-ocp2scp"
- compatible : Should be "ti,am437x-ocp2scp" for AM437x processor
Should be "ti,omap-ocp2scp" for all others
- reg : Address and length of the register set for the device
- #address-cells, #size-cells : Must be present if the device has sub-nodes
- ranges : the child address space are mapped 1:1 onto the parent address space
...
...
arch/arm/boot/dts/am4372.dtsi
浏览文件 @
e129fdb9
...
...
@@ -787,7 +787,7 @@
};
ocp2scp0: ocp2scp@483a8000 {
compatible = "ti,omap-ocp2scp";
compatible = "ti,
am437x-ocp2scp", "ti,
omap-ocp2scp";
#address-cells = <1>;
#size-cells = <1>;
ranges;
...
...
@@ -806,7 +806,7 @@
};
ocp2scp1: ocp2scp@483e8000 {
compatible = "ti,omap-ocp2scp";
compatible = "ti,
am437x-ocp2scp", "ti,
omap-ocp2scp";
#address-cells = <1>;
#size-cells = <1>;
ranges;
...
...
drivers/bus/omap-ocp2scp.c
浏览文件 @
e129fdb9
...
...
@@ -16,6 +16,7 @@
*
*/
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/err.h>
...
...
@@ -23,6 +24,9 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#define OCP2SCP_TIMING 0x18
#define SYNC2_MASK 0xf
static
int
ocp2scp_remove_devices
(
struct
device
*
dev
,
void
*
c
)
{
struct
platform_device
*
pdev
=
to_platform_device
(
dev
);
...
...
@@ -35,6 +39,9 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
static
int
omap_ocp2scp_probe
(
struct
platform_device
*
pdev
)
{
int
ret
;
u32
reg
;
void
__iomem
*
regs
;
struct
resource
*
res
;
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
if
(
np
)
{
...
...
@@ -47,6 +54,32 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
}
pm_runtime_enable
(
&
pdev
->
dev
);
/*
* As per AM572x TRM: http://www.ti.com/lit/ug/spruhz6/spruhz6.pdf
* under section 26.3.2.2, table 26-26 OCP2SCP TIMING Caution;
* As per OMAP4430 TRM: http://www.ti.com/lit/ug/swpu231ap/swpu231ap.pdf
* under section 23.12.6.2.2 , Table 23-1213 OCP2SCP TIMING Caution;
* As per OMAP4460 TRM: http://www.ti.com/lit/ug/swpu235ab/swpu235ab.pdf
* under section 23.12.6.2.2, Table 23-1213 OCP2SCP TIMING Caution;
* As per OMAP543x TRM http://www.ti.com/lit/pdf/swpu249
* under section 27.3.2.2, Table 27-27 OCP2SCP TIMING Caution;
*
* Read path of OCP2SCP is not working properly due to low reset value
* of SYNC2 parameter in OCP2SCP. Suggested reset value is 0x6 or more.
*/
if
(
!
of_device_is_compatible
(
np
,
"ti,am437x-ocp2scp"
))
{
res
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
regs
=
devm_ioremap_resource
(
&
pdev
->
dev
,
res
);
if
(
IS_ERR
(
regs
))
goto
err0
;
pm_runtime_get_sync
(
&
pdev
->
dev
);
reg
=
readl_relaxed
(
regs
+
OCP2SCP_TIMING
);
reg
&=
~
(
SYNC2_MASK
);
reg
|=
0x6
;
writel_relaxed
(
reg
,
regs
+
OCP2SCP_TIMING
);
pm_runtime_put_sync
(
&
pdev
->
dev
);
}
return
0
;
...
...
@@ -67,6 +100,7 @@ static int omap_ocp2scp_remove(struct platform_device *pdev)
#ifdef CONFIG_OF
static
const
struct
of_device_id
omap_ocp2scp_id_table
[]
=
{
{
.
compatible
=
"ti,omap-ocp2scp"
},
{
.
compatible
=
"ti,am437x-ocp2scp"
},
{}
};
MODULE_DEVICE_TABLE
(
of
,
omap_ocp2scp_id_table
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录