Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
3ed628a8
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3ed628a8
编写于
4月 01, 2013
作者:
S
Shawn Guo
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into mxs/cleanup
上级
07961ac7
da4a686a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
49 addition
and
106 deletion
+49
-106
arch/arm/Kconfig
arch/arm/Kconfig
+1
-0
arch/arm/include/asm/smp_twd.h
arch/arm/include/asm/smp_twd.h
+0
-8
arch/arm/kernel/smp_twd.c
arch/arm/kernel/smp_twd.c
+4
-13
arch/arm/mach-highbank/highbank.c
arch/arm/mach-highbank/highbank.c
+2
-3
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6q.c
+2
-3
arch/arm/mach-omap2/timer.c
arch/arm/mach-omap2/timer.c
+1
-1
arch/arm/mach-spear13xx/spear13xx.c
arch/arm/mach-spear13xx/spear13xx.c
+2
-2
arch/arm/mach-ux500/timer.c
arch/arm/mach-ux500/timer.c
+2
-1
arch/arm/mach-vexpress/v2m.c
arch/arm/mach-vexpress/v2m.c
+3
-3
drivers/clocksource/bcm2835_timer.c
drivers/clocksource/bcm2835_timer.c
+1
-11
drivers/clocksource/clksrc-of.c
drivers/clocksource/clksrc-of.c
+2
-2
drivers/clocksource/tegra20_timer.c
drivers/clocksource/tegra20_timer.c
+27
-46
drivers/clocksource/vt8500_timer.c
drivers/clocksource/vt8500_timer.c
+1
-13
include/linux/clocksource.h
include/linux/clocksource.h
+1
-0
未找到文件。
arch/arm/Kconfig
浏览文件 @
3ed628a8
...
...
@@ -1593,6 +1593,7 @@ config HAVE_ARM_ARCH_TIMER
config HAVE_ARM_TWD
bool
depends on SMP
select CLKSRC_OF if OF
help
This options enables support for the ARM timer and watchdog unit
...
...
arch/arm/include/asm/smp_twd.h
浏览文件 @
3ed628a8
...
...
@@ -34,12 +34,4 @@ struct twd_local_timer name __initdata = { \
int
twd_local_timer_register
(
struct
twd_local_timer
*
);
#ifdef CONFIG_HAVE_ARM_TWD
void
twd_local_timer_of_register
(
void
);
#else
static
inline
void
twd_local_timer_of_register
(
void
)
{
}
#endif
#endif
arch/arm/kernel/smp_twd.c
浏览文件 @
3ed628a8
...
...
@@ -362,25 +362,13 @@ int __init twd_local_timer_register(struct twd_local_timer *tlt)
}
#ifdef CONFIG_OF
const
static
struct
of_device_id
twd_of_match
[]
__initconst
=
{
{
.
compatible
=
"arm,cortex-a9-twd-timer"
,
},
{
.
compatible
=
"arm,cortex-a5-twd-timer"
,
},
{
.
compatible
=
"arm,arm11mp-twd-timer"
,
},
{
},
};
void
__init
twd_local_timer_of_register
(
void
)
static
void
__init
twd_local_timer_of_register
(
struct
device_node
*
np
)
{
struct
device_node
*
np
;
int
err
;
if
(
!
is_smp
()
||
!
setup_max_cpus
)
return
;
np
=
of_find_matching_node
(
NULL
,
twd_of_match
);
if
(
!
np
)
return
;
twd_ppi
=
irq_of_parse_and_map
(
np
,
0
);
if
(
!
twd_ppi
)
{
err
=
-
EINVAL
;
...
...
@@ -398,4 +386,7 @@ void __init twd_local_timer_of_register(void)
out:
WARN
(
err
,
"twd_local_timer_of_register failed (%d)
\n
"
,
err
);
}
CLOCKSOURCE_OF_DECLARE
(
arm_twd_a9
,
"arm,cortex-a9-twd-timer"
,
twd_local_timer_of_register
);
CLOCKSOURCE_OF_DECLARE
(
arm_twd_a5
,
"arm,cortex-a5-twd-timer"
,
twd_local_timer_of_register
);
CLOCKSOURCE_OF_DECLARE
(
arm_twd_11mp
,
"arm,arm11mp-twd-timer"
,
twd_local_timer_of_register
);
#endif
arch/arm/mach-highbank/highbank.c
浏览文件 @
3ed628a8
...
...
@@ -32,7 +32,6 @@
#include <asm/cacheflush.h>
#include <asm/cputype.h>
#include <asm/smp_plat.h>
#include <asm/smp_twd.h>
#include <asm/hardware/arm_timer.h>
#include <asm/hardware/timer-sp.h>
#include <asm/hardware/cache-l2x0.h>
...
...
@@ -119,10 +118,10 @@ static void __init highbank_timer_init(void)
sp804_clocksource_and_sched_clock_init
(
timer_base
+
0x20
,
"timer1"
);
sp804_clockevents_init
(
timer_base
,
irq
,
"timer0"
);
twd_local_timer_of_register
();
arch_timer_of_register
();
arch_timer_sched_clock_init
();
clocksource_of_init
();
}
static
void
highbank_power_off
(
void
)
...
...
arch/arm/mach-imx/mach-imx6q.c
浏览文件 @
3ed628a8
...
...
@@ -12,6 +12,7 @@
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clocksource.h>
#include <linux/cpu.h>
#include <linux/delay.h>
#include <linux/export.h>
...
...
@@ -28,11 +29,9 @@
#include <linux/regmap.h>
#include <linux/micrel_phy.h>
#include <linux/mfd/syscon.h>
#include <asm/smp_twd.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <asm/system_misc.h>
#include "common.h"
...
...
@@ -292,7 +291,7 @@ static void __init imx6q_init_irq(void)
static
void
__init
imx6q_timer_init
(
void
)
{
mx6q_clocks_init
();
twd_local_timer_of_register
();
clocksource_of_init
();
imx_print_silicon_rev
(
"i.MX6Q"
,
imx6q_revision
());
}
...
...
arch/arm/mach-omap2/timer.c
浏览文件 @
3ed628a8
...
...
@@ -597,7 +597,7 @@ void __init omap4_local_timer_init(void)
int
err
;
if
(
of_have_populated_dt
())
{
twd_local_timer_of_register
();
clocksource_of_init
();
return
;
}
...
...
arch/arm/mach-spear13xx/spear13xx.c
浏览文件 @
3ed628a8
...
...
@@ -15,12 +15,12 @@
#include <linux/amba/pl022.h>
#include <linux/clk.h>
#include <linux/clocksource.h>
#include <linux/dw_dmac.h>
#include <linux/err.h>
#include <linux/of.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/map.h>
#include <asm/smp_twd.h>
#include <mach/dma.h>
#include <mach/generic.h>
#include <mach/spear.h>
...
...
@@ -179,5 +179,5 @@ void __init spear13xx_timer_init(void)
clk_put
(
pclk
);
spear_setup_of_timer
();
twd_local_timer_of_register
();
clocksource_of_init
();
}
arch/arm/mach-ux500/timer.c
浏览文件 @
3ed628a8
...
...
@@ -7,6 +7,7 @@
#include <linux/io.h>
#include <linux/errno.h>
#include <linux/clksrc-dbx500-prcmu.h>
#include <linux/clocksource.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_data/clocksource-nomadik-mtu.h>
...
...
@@ -32,7 +33,7 @@ static void __init ux500_twd_init(void)
twd_local_timer
=
&
u8500_twd_local_timer
;
if
(
of_have_populated_dt
())
twd_local_timer_of_register
();
clocksource_of_init
();
else
{
err
=
twd_local_timer_register
(
twd_local_timer
);
if
(
err
)
...
...
arch/arm/mach-vexpress/v2m.c
浏览文件 @
3ed628a8
...
...
@@ -5,6 +5,7 @@
#include <linux/amba/bus.h>
#include <linux/amba/mmci.h>
#include <linux/io.h>
#include <linux/clocksource.h>
#include <linux/smp.h>
#include <linux/init.h>
#include <linux/irqchip.h>
...
...
@@ -25,7 +26,6 @@
#include <asm/arch_timer.h>
#include <asm/mach-types.h>
#include <asm/sizes.h>
#include <asm/smp_twd.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
...
...
@@ -435,6 +435,7 @@ static void __init v2m_dt_timer_init(void)
vexpress_clk_of_init
();
clocksource_of_init
();
do
{
node
=
of_find_compatible_node
(
node
,
NULL
,
"arm,sp804"
);
}
while
(
node
&&
vexpress_get_site_by_node
(
node
)
!=
VEXPRESS_SITE_MB
);
...
...
@@ -445,8 +446,7 @@ static void __init v2m_dt_timer_init(void)
irq_of_parse_and_map
(
node
,
0
));
}
if
(
arch_timer_of_register
()
!=
0
)
twd_local_timer_of_register
();
arch_timer_of_register
();
if
(
arch_timer_sched_clock_init
()
!=
0
)
versatile_sched_clock_init
(
vexpress_get_24mhz_clock_base
(),
...
...
drivers/clocksource/bcm2835_timer.c
浏览文件 @
3ed628a8
...
...
@@ -95,23 +95,13 @@ static irqreturn_t bcm2835_time_interrupt(int irq, void *dev_id)
}
}
static
struct
of_device_id
bcm2835_time_match
[]
__initconst
=
{
{
.
compatible
=
"brcm,bcm2835-system-timer"
},
{}
};
static
void
__init
bcm2835_timer_init
(
void
)
static
void
__init
bcm2835_timer_init
(
struct
device_node
*
node
)
{
struct
device_node
*
node
;
void
__iomem
*
base
;
u32
freq
;
int
irq
;
struct
bcm2835_timer
*
timer
;
node
=
of_find_matching_node
(
NULL
,
bcm2835_time_match
);
if
(
!
node
)
panic
(
"No bcm2835 timer node"
);
base
=
of_iomap
(
node
,
0
);
if
(
!
base
)
panic
(
"Can't remap registers"
);
...
...
drivers/clocksource/clksrc-of.c
浏览文件 @
3ed628a8
...
...
@@ -26,10 +26,10 @@ void __init clocksource_of_init(void)
{
struct
device_node
*
np
;
const
struct
of_device_id
*
match
;
void
(
*
init_func
)(
void
);
void
(
*
init_func
)(
struct
device_node
*
);
for_each_matching_node_and_match
(
np
,
__clksrc_of_table
,
&
match
)
{
init_func
=
match
->
data
;
init_func
();
init_func
(
np
);
}
}
drivers/clocksource/tegra20_timer.c
浏览文件 @
3ed628a8
...
...
@@ -154,29 +154,12 @@ static struct irqaction tegra_timer_irq = {
.
dev_id
=
&
tegra_clockevent
,
};
static
const
struct
of_device_id
timer_match
[]
__initconst
=
{
{
.
compatible
=
"nvidia,tegra20-timer"
},
{}
};
static
const
struct
of_device_id
rtc_match
[]
__initconst
=
{
{
.
compatible
=
"nvidia,tegra20-rtc"
},
{}
};
static
void
__init
tegra20_init_timer
(
void
)
static
void
__init
tegra20_init_timer
(
struct
device_node
*
np
)
{
struct
device_node
*
np
;
struct
clk
*
clk
;
unsigned
long
rate
;
int
ret
;
np
=
of_find_matching_node
(
NULL
,
timer_match
);
if
(
!
np
)
{
pr_err
(
"Failed to find timer DT node
\n
"
);
BUG
();
}
timer_reg_base
=
of_iomap
(
np
,
0
);
if
(
!
timer_reg_base
)
{
pr_err
(
"Can't map timer registers
\n
"
);
...
...
@@ -200,30 +183,6 @@ static void __init tegra20_init_timer(void)
of_node_put
(
np
);
np
=
of_find_matching_node
(
NULL
,
rtc_match
);
if
(
!
np
)
{
pr_err
(
"Failed to find RTC DT node
\n
"
);
BUG
();
}
rtc_base
=
of_iomap
(
np
,
0
);
if
(
!
rtc_base
)
{
pr_err
(
"Can't map RTC registers"
);
BUG
();
}
/*
* rtc registers are used by read_persistent_clock, keep the rtc clock
* enabled
*/
clk
=
clk_get_sys
(
"rtc-tegra"
,
NULL
);
if
(
IS_ERR
(
clk
))
pr_warn
(
"Unable to get rtc-tegra clock
\n
"
);
else
clk_prepare_enable
(
clk
);
of_node_put
(
np
);
switch
(
rate
)
{
case
12000000
:
timer_writel
(
0x000b
,
TIMERUS_USEC_CFG
);
...
...
@@ -259,12 +218,34 @@ static void __init tegra20_init_timer(void)
tegra_clockevent
.
irq
=
tegra_timer_irq
.
irq
;
clockevents_config_and_register
(
&
tegra_clockevent
,
1000000
,
0x1
,
0x1fffffff
);
#ifdef CONFIG_HAVE_ARM_TWD
twd_local_timer_of_register
();
#endif
}
CLOCKSOURCE_OF_DECLARE
(
tegra20_timer
,
"nvidia,tegra20-timer"
,
tegra20_init_timer
);
static
void
__init
tegra20_init_rtc
(
struct
device_node
*
np
)
{
struct
clk
*
clk
;
rtc_base
=
of_iomap
(
np
,
0
);
if
(
!
rtc_base
)
{
pr_err
(
"Can't map RTC registers"
);
BUG
();
}
/*
* rtc registers are used by read_persistent_clock, keep the rtc clock
* enabled
*/
clk
=
clk_get_sys
(
"rtc-tegra"
,
NULL
);
if
(
IS_ERR
(
clk
))
pr_warn
(
"Unable to get rtc-tegra clock
\n
"
);
else
clk_prepare_enable
(
clk
);
of_node_put
(
np
);
register_persistent_clock
(
NULL
,
tegra_read_persistent_clock
);
}
CLOCKSOURCE_OF_DECLARE
(
tegra20
,
"nvidia,tegra20-timer"
,
tegra20_init_timer
);
CLOCKSOURCE_OF_DECLARE
(
tegra20
_rtc
,
"nvidia,tegra20-rtc"
,
tegra20_init_rtc
);
#ifdef CONFIG_PM
static
u32
usec_config
;
...
...
drivers/clocksource/vt8500_timer.c
浏览文件 @
3ed628a8
...
...
@@ -129,22 +129,10 @@ static struct irqaction irq = {
.
dev_id
=
&
clockevent
,
};
static
struct
of_device_id
vt8500_timer_ids
[]
=
{
{
.
compatible
=
"via,vt8500-timer"
},
{
}
};
static
void
__init
vt8500_timer_init
(
void
)
static
void
__init
vt8500_timer_init
(
struct
device_node
*
np
)
{
struct
device_node
*
np
;
int
timer_irq
;
np
=
of_find_matching_node
(
NULL
,
vt8500_timer_ids
);
if
(
!
np
)
{
pr_err
(
"%s: Timer description missing from Device Tree
\n
"
,
__func__
);
return
;
}
regbase
=
of_iomap
(
np
,
0
);
if
(
!
regbase
)
{
pr_err
(
"%s: Missing iobase description in Device Tree
\n
"
,
...
...
include/linux/clocksource.h
浏览文件 @
3ed628a8
...
...
@@ -340,6 +340,7 @@ extern void clocksource_of_init(void);
__used __section(__clksrc_of_table) \
= { .compatible = compat, .data = fn };
#else
static
inline
void
clocksource_of_init
(
void
)
{}
#define CLOCKSOURCE_OF_DECLARE(name, compat, fn)
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录