Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
d1914c7e
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d1914c7e
编写于
1月 14, 2010
作者:
R
Russell King
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: Make Integrator/Versatile/Reaview VCO code similar
Signed-off-by:
N
Russell King
<
rmk+kernel@arm.linux.org.uk
>
上级
f5fc0082
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
32 deletion
+26
-32
arch/arm/mach-integrator/impd1.c
arch/arm/mach-integrator/impd1.c
+4
-12
arch/arm/mach-integrator/include/mach/clkdev.h
arch/arm/mach-integrator/include/mach/clkdev.h
+2
-1
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-integrator/integrator_cp.c
+5
-4
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.c
+8
-8
arch/arm/mach-realview/include/mach/clkdev.h
arch/arm/mach-realview/include/mach/clkdev.h
+1
-1
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/core.c
+5
-5
arch/arm/mach-versatile/include/mach/clkdev.h
arch/arm/mach-versatile/include/mach/clkdev.h
+1
-1
未找到文件。
arch/arm/mach-integrator/impd1.c
浏览文件 @
d1914c7e
...
...
@@ -55,20 +55,10 @@ static const struct icst_params impd1_vco_params = {
static
void
impd1_setvco
(
struct
clk
*
clk
,
struct
icst_vco
vco
)
{
struct
impd1_module
*
impd1
=
clk
->
data
;
int
vconr
=
clk
-
impd1
->
vcos
;
u32
val
;
val
=
vco
.
v
|
(
vco
.
r
<<
9
)
|
(
vco
.
s
<<
16
);
u32
val
=
vco
.
v
|
(
vco
.
r
<<
9
)
|
(
vco
.
s
<<
16
);
writel
(
0xa05f
,
impd1
->
base
+
IMPD1_LOCK
);
switch
(
vconr
)
{
case
0
:
writel
(
val
,
impd1
->
base
+
IMPD1_OSC1
);
break
;
case
1
:
writel
(
val
,
impd1
->
base
+
IMPD1_OSC2
);
break
;
}
writel
(
val
,
clk
->
vcoreg
);
writel
(
0
,
impd1
->
base
+
IMPD1_LOCK
);
#ifdef DEBUG
...
...
@@ -381,6 +371,8 @@ static int impd1_probe(struct lm_device *dev)
impd1
->
vcos
[
i
].
data
=
impd1
,
impd1
->
vcos
[
i
].
setvco
=
impd1_setvco
;
}
impd1
->
vcos
[
0
].
vcoreg
=
impd1
->
base
+
IMPD1_OSC1
;
impd1
->
vcos
[
1
].
vcoreg
=
impd1
->
base
+
IMPD1_OSC2
;
impd1
->
clks
[
0
]
=
clkdev_alloc
(
&
impd1
->
vcos
[
0
],
NULL
,
"lm%x:01000"
,
dev
->
id
);
...
...
arch/arm/mach-integrator/include/mach/clkdev.h
浏览文件 @
d1914c7e
...
...
@@ -8,8 +8,9 @@ struct clk {
unsigned
long
rate
;
struct
module
*
owner
;
const
struct
icst_params
*
params
;
void
*
data
;
void
__iomem
*
vcoreg
;
void
(
*
setvco
)(
struct
clk
*
,
struct
icst_vco
vco
);
void
*
data
;
};
static
inline
int
__clk_get
(
struct
clk
*
clk
)
...
...
arch/arm/mach-integrator/integrator_cp.c
浏览文件 @
d1914c7e
...
...
@@ -266,8 +266,8 @@ static void __init intcp_init_irq(void)
/*
* Clock handling
*/
#define CM_LOCK
IO_ADDRESS(INTEGRATOR_HDR_LOCK
)
#define CM_AUXOSC
IO_ADDRESS(INTEGRATOR_HDR_BASE +
0x1c)
#define CM_LOCK
(__io_address(INTEGRATOR_HDR_BASE)+INTEGRATOR_HDR_LOCK_OFFSET
)
#define CM_AUXOSC
(__io_address(INTEGRATOR_HDR_BASE)+
0x1c)
static
const
struct
icst_params
cp_auxvco_params
=
{
.
ref
=
24000000
,
...
...
@@ -285,16 +285,17 @@ static void cp_auxvco_set(struct clk *clk, struct icst_vco vco)
{
u32
val
;
val
=
readl
(
CM_AUXOSC
)
&
~
0x7ffff
;
val
=
readl
(
clk
->
vcoreg
)
&
~
0x7ffff
;
val
|=
vco
.
v
|
(
vco
.
r
<<
9
)
|
(
vco
.
s
<<
16
);
writel
(
0xa05f
,
CM_LOCK
);
writel
(
val
,
CM_AUXOSC
);
writel
(
val
,
clk
->
vcoreg
);
writel
(
0
,
CM_LOCK
);
}
static
struct
clk
cp_auxclk
=
{
.
params
=
&
cp_auxvco_params
,
.
vcoreg
=
CM_AUXOSC
,
.
setvco
=
cp_auxvco_set
,
};
...
...
arch/arm/mach-realview/core.c
浏览文件 @
d1914c7e
...
...
@@ -271,19 +271,13 @@ static const struct icst_params realview_oscvco_params = {
static
void
realview_oscvco_set
(
struct
clk
*
clk
,
struct
icst_vco
vco
)
{
void
__iomem
*
sys_lock
=
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_LOCK_OFFSET
;
void
__iomem
*
sys_osc
;
u32
val
;
if
(
machine_is_realview_pb1176
())
sys_osc
=
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_OSC0_OFFSET
;
else
sys_osc
=
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_OSC4_OFFSET
;
val
=
readl
(
sys_osc
)
&
~
0x7ffff
;
val
=
readl
(
clk
->
vcoreg
)
&
~
0x7ffff
;
val
|=
vco
.
v
|
(
vco
.
r
<<
9
)
|
(
vco
.
s
<<
16
);
writel
(
0xa05f
,
sys_lock
);
writel
(
val
,
sys_osc
);
writel
(
val
,
clk
->
vcoreg
);
writel
(
0
,
sys_lock
);
}
...
...
@@ -332,7 +326,13 @@ static struct clk_lookup lookups[] = {
static
int
__init
clk_init
(
void
)
{
if
(
machine_is_realview_pb1176
())
oscvco_clk
.
vcoreg
=
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_OSC0_OFFSET
;
else
oscvco_clk
.
vcoreg
=
__io_address
(
REALVIEW_SYS_BASE
)
+
REALVIEW_SYS_OSC4_OFFSET
;
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
return
0
;
}
arch_initcall
(
clk_init
);
...
...
arch/arm/mach-realview/include/mach/clkdev.h
浏览文件 @
d1914c7e
...
...
@@ -6,7 +6,7 @@
struct
clk
{
unsigned
long
rate
;
const
struct
icst_params
*
params
;
u32
oscoff
;
void
__iomem
*
vcoreg
;
void
(
*
setvco
)(
struct
clk
*
,
struct
icst_vco
vco
);
};
...
...
arch/arm/mach-versatile/core.c
浏览文件 @
d1914c7e
...
...
@@ -370,21 +370,19 @@ static const struct icst_params versatile_oscvco_params = {
static
void
versatile_oscvco_set
(
struct
clk
*
clk
,
struct
icst_vco
vco
)
{
void
__iomem
*
sys
=
__io_address
(
VERSATILE_SYS_BASE
);
void
__iomem
*
sys_lock
=
sys
+
VERSATILE_SYS_LOCK_OFFSET
;
void
__iomem
*
sys_lock
=
__io_address
(
VERSATILE_SYS_BASE
)
+
VERSATILE_SYS_LOCK_OFFSET
;
u32
val
;
val
=
readl
(
sys
+
clk
->
oscoff
)
&
~
0x7ffff
;
val
=
readl
(
clk
->
vcoreg
)
&
~
0x7ffff
;
val
|=
vco
.
v
|
(
vco
.
r
<<
9
)
|
(
vco
.
s
<<
16
);
writel
(
0xa05f
,
sys_lock
);
writel
(
val
,
sys
+
clk
->
oscoff
);
writel
(
val
,
clk
->
vcoreg
);
writel
(
0
,
sys_lock
);
}
static
struct
clk
osc4_clk
=
{
.
params
=
&
versatile_oscvco_params
,
.
oscoff
=
VERSATILE_SYS_OSCCLCD_OFFSET
,
.
setvco
=
versatile_oscvco_set
,
};
...
...
@@ -831,6 +829,8 @@ void __init versatile_init(void)
{
int
i
;
osc4_clk
.
vcoreg
=
__io_address
(
VERSATILE_SYS_BASE
)
+
VERSATILE_SYS_OSCCLCD_OFFSET
;
clkdev_add_table
(
lookups
,
ARRAY_SIZE
(
lookups
));
platform_device_register
(
&
versatile_flash_device
);
...
...
arch/arm/mach-versatile/include/mach/clkdev.h
浏览文件 @
d1914c7e
...
...
@@ -6,7 +6,7 @@
struct
clk
{
unsigned
long
rate
;
const
struct
icst_params
*
params
;
u32
oscoff
;
void
__iomem
*
vcoreg
;
void
(
*
setvco
)(
struct
clk
*
,
struct
icst_vco
vco
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录