Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
82de1bc8
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
82de1bc8
编写于
9月 29, 2014
作者:
M
Mike Turquette
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-v3.18/ti-clk-driver' of github.com:t-kristo/linux-pm into clk-next
上级
6e18ff26
04ed831f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
63 addition
and
31 deletion
+63
-31
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/io.c
+10
-2
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-omap2/prm_common.c
+0
-2
drivers/clk/ti/clk-dra7-atl.c
drivers/clk/ti/clk-dra7-atl.c
+2
-0
drivers/clk/ti/clk.c
drivers/clk/ti/clk.c
+43
-25
drivers/clk/ti/clockdomain.c
drivers/clk/ti/clockdomain.c
+5
-0
drivers/clk/ti/divider.c
drivers/clk/ti/divider.c
+2
-2
include/linux/clk/ti.h
include/linux/clk/ti.h
+1
-0
未找到文件。
arch/arm/mach-omap2/io.c
浏览文件 @
82de1bc8
...
...
@@ -734,8 +734,16 @@ int __init omap_clk_init(void)
ti_clk_init_features
();
ret
=
of_prcm_init
();
if
(
!
ret
)
ret
=
omap_clk_soc_init
();
if
(
ret
)
return
ret
;
of_clk_init
(
NULL
);
ti_dt_clk_init_retry_clks
();
ti_dt_clockdomains_setup
();
ret
=
omap_clk_soc_init
();
return
ret
;
}
arch/arm/mach-omap2/prm_common.c
浏览文件 @
82de1bc8
...
...
@@ -525,8 +525,6 @@ int __init of_prcm_init(void)
memmap_index
++
;
}
ti_dt_clockdomains_setup
();
return
0
;
}
...
...
drivers/clk/ti/clk-dra7-atl.c
浏览文件 @
82de1bc8
...
...
@@ -203,6 +203,7 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
if
(
!
IS_ERR
(
clk
))
{
of_clk_add_provider
(
node
,
of_clk_src_simple_get
,
clk
);
kfree
(
parent_names
);
return
;
}
cleanup:
...
...
@@ -228,6 +229,7 @@ static int of_dra7_atl_clk_probe(struct platform_device *pdev)
cinfo
->
iobase
=
of_iomap
(
node
,
0
);
cinfo
->
dev
=
&
pdev
->
dev
;
pm_runtime_enable
(
cinfo
->
dev
);
pm_runtime_irq_safe
(
cinfo
->
dev
);
pm_runtime_get_sync
(
cinfo
->
dev
);
atl_write
(
cinfo
,
DRA7_ATL_PCLKMUX_REG
(
0
),
DRA7_ATL_PCLKMUX
);
...
...
drivers/clk/ti/clk.c
浏览文件 @
82de1bc8
...
...
@@ -25,8 +25,8 @@
#undef pr_fmt
#define pr_fmt(fmt) "%s: " fmt, __func__
static
int
ti_dt_clk_memmap_index
;
struct
ti_clk_ll_ops
*
ti_clk_ll_ops
;
static
struct
device_node
*
clocks_node_ptr
[
CLK_MAX_MEMMAPS
];
/**
* ti_dt_clocks_register - register DT alias clocks during boot
...
...
@@ -108,9 +108,21 @@ void __iomem *ti_clk_get_reg_addr(struct device_node *node, int index)
struct
clk_omap_reg
*
reg
;
u32
val
;
u32
tmp
;
int
i
;
reg
=
(
struct
clk_omap_reg
*
)
&
tmp
;
reg
->
index
=
ti_dt_clk_memmap_index
;
for
(
i
=
0
;
i
<
CLK_MAX_MEMMAPS
;
i
++
)
{
if
(
clocks_node_ptr
[
i
]
==
node
->
parent
)
break
;
}
if
(
i
==
CLK_MAX_MEMMAPS
)
{
pr_err
(
"clk-provider not found for %s!
\n
"
,
node
->
name
);
return
NULL
;
}
reg
->
index
=
i
;
if
(
of_property_read_u32_index
(
node
,
"reg"
,
index
,
&
val
))
{
pr_err
(
"%s must have reg[%d]!
\n
"
,
node
->
name
,
index
);
...
...
@@ -127,20 +139,14 @@ void __iomem *ti_clk_get_reg_addr(struct device_node *node, int index)
* @parent: master node
* @index: internal index for clk_reg_ops
*
* Initializes a master clock IP block and its child clock nodes.
* Regmap is provided for accessing the register space for the
* IP block and all the clocks under it.
* Initializes a master clock IP block. This basically sets up the
* mapping from clocks node to the memory map index. All the clocks
* are then initialized through the common of_clk_init call, and the
* clocks will access their memory maps based on the node layout.
*/
void
ti_dt_clk_init_provider
(
struct
device_node
*
parent
,
int
index
)
{
const
struct
of_device_id
*
match
;
struct
device_node
*
np
;
struct
device_node
*
clocks
;
of_clk_init_cb_t
clk_init_cb
;
struct
clk_init_item
*
retry
;
struct
clk_init_item
*
tmp
;
ti_dt_clk_memmap_index
=
index
;
/* get clocks for this parent */
clocks
=
of_get_child_by_name
(
parent
,
"clocks"
);
...
...
@@ -149,19 +155,31 @@ void ti_dt_clk_init_provider(struct device_node *parent, int index)
return
;
}
for_each_child_of_node
(
clocks
,
np
)
{
match
=
of_match_node
(
&
__clk_of_table
,
np
);
if
(
!
match
)
continue
;
clk_init_cb
=
(
of_clk_init_cb_t
)
match
->
data
;
pr_debug
(
"%s: initializing: %s
\n
"
,
__func__
,
np
->
name
);
clk_init_cb
(
np
);
}
/* add clocks node info */
clocks_node_ptr
[
index
]
=
clocks
;
}
list_for_each_entry_safe
(
retry
,
tmp
,
&
retry_list
,
link
)
{
pr_debug
(
"retry-init: %s
\n
"
,
retry
->
node
->
name
);
retry
->
func
(
retry
->
hw
,
retry
->
node
);
list_del
(
&
retry
->
link
);
kfree
(
retry
);
/**
* ti_dt_clk_init_retry_clks - init clocks from the retry list
*
* Initializes any clocks that have failed to initialize before,
* reasons being missing parent node(s) during earlier init. This
* typically happens only for DPLLs which need to have both of their
* parent clocks ready during init.
*/
void
ti_dt_clk_init_retry_clks
(
void
)
{
struct
clk_init_item
*
retry
;
struct
clk_init_item
*
tmp
;
int
retries
=
5
;
while
(
!
list_empty
(
&
retry_list
)
&&
retries
)
{
list_for_each_entry_safe
(
retry
,
tmp
,
&
retry_list
,
link
)
{
pr_debug
(
"retry-init: %s
\n
"
,
retry
->
node
->
name
);
retry
->
func
(
retry
->
hw
,
retry
->
node
);
list_del
(
&
retry
->
link
);
kfree
(
retry
);
}
retries
--
;
}
}
drivers/clk/ti/clockdomain.c
浏览文件 @
82de1bc8
...
...
@@ -36,6 +36,11 @@ static void __init of_ti_clockdomain_setup(struct device_node *node)
for
(
i
=
0
;
i
<
num_clks
;
i
++
)
{
clk
=
of_clk_get
(
node
,
i
);
if
(
IS_ERR
(
clk
))
{
pr_err
(
"%s: Failed get %s' clock nr %d (%ld)
\n
"
,
__func__
,
node
->
full_name
,
i
,
PTR_ERR
(
clk
));
continue
;
}
if
(
__clk_get_flags
(
clk
)
&
CLK_IS_BASIC
)
{
pr_warn
(
"can't setup clkdm for basic clk %s
\n
"
,
__clk_get_name
(
clk
));
...
...
drivers/clk/ti/divider.c
浏览文件 @
82de1bc8
...
...
@@ -300,8 +300,8 @@ static struct clk *_register_divider(struct device *dev, const char *name,
return
clk
;
}
static
struct
clk_div_table
__init
*
ti_clk_get_div_table
(
struct
device_node
*
node
)
static
struct
clk_div_table
*
__init
ti_clk_get_div_table
(
struct
device_node
*
node
)
{
struct
clk_div_table
*
table
;
const
__be32
*
divspec
;
...
...
include/linux/clk/ti.h
浏览文件 @
82de1bc8
...
...
@@ -292,6 +292,7 @@ void omap2xxx_clkt_vps_init(void);
void
__iomem
*
ti_clk_get_reg_addr
(
struct
device_node
*
node
,
int
index
);
void
ti_dt_clocks_register
(
struct
ti_dt_clk
*
oclks
);
void
ti_dt_clk_init_provider
(
struct
device_node
*
np
,
int
index
);
void
ti_dt_clk_init_retry_clks
(
void
);
void
ti_dt_clockdomains_setup
(
void
);
int
ti_clk_retry_init
(
struct
device_node
*
node
,
struct
clk_hw
*
hw
,
ti_of_clk_init_cb_t
func
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录