From 6bb27d7349db51b50c40534710fe164ca0d58902 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 8 Nov 2012 12:40:59 -0700 Subject: ARM: delete struct sys_timer Now that the only field in struct sys_timer is .init, delete the struct, and replace the machine descriptor .timer field with the initialization function itself. This will enable moving timer drivers into drivers/clocksource without having to place a public prototype of each struct sys_timer object into include/linux; the intent is to create a single of_clocksource_init() function that determines which timer driver to initialize by scanning the device dtree, much like the proposed irqchip_init() at: http://www.spinics.net/lists/arm-kernel/msg203686.html Includes mach-omap2 fixes from Igor Grinberg. Tested-by: Robert Jarzmik Signed-off-by: Stephen Warren --- arch/arm/mach-w90x900/mach-nuc910evb.c | 2 +- arch/arm/mach-w90x900/mach-nuc950evb.c | 2 +- arch/arm/mach-w90x900/mach-nuc960evb.c | 2 +- arch/arm/mach-w90x900/nuc9xx.h | 3 +-- arch/arm/mach-w90x900/time.c | 6 +----- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'arch/arm/mach-w90x900') diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c index b4243e4f156..92f1c978f35 100644 --- a/arch/arm/mach-w90x900/mach-nuc910evb.c +++ b/arch/arm/mach-w90x900/mach-nuc910evb.c @@ -37,6 +37,6 @@ MACHINE_START(W90P910EVB, "W90P910EVB") .map_io = nuc910evb_map_io, .init_irq = nuc900_init_irq, .init_machine = nuc910evb_init, - .timer = &nuc900_timer, + .init_time = nuc900_timer_init, .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c index 500fe5932ce..26f7189056e 100644 --- a/arch/arm/mach-w90x900/mach-nuc950evb.c +++ b/arch/arm/mach-w90x900/mach-nuc950evb.c @@ -40,6 +40,6 @@ MACHINE_START(W90P950EVB, "W90P950EVB") .map_io = nuc950evb_map_io, .init_irq = nuc900_init_irq, .init_machine = nuc950evb_init, - .timer = &nuc900_timer, + .init_time = nuc900_timer_init, .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c index cbb3adc3db1..9b4e73fe10e 100644 --- a/arch/arm/mach-w90x900/mach-nuc960evb.c +++ b/arch/arm/mach-w90x900/mach-nuc960evb.c @@ -37,6 +37,6 @@ MACHINE_START(W90N960EVB, "W90N960EVB") .map_io = nuc960evb_map_io, .init_irq = nuc900_init_irq, .init_machine = nuc960evb_init, - .timer = &nuc900_timer, + .init_time = nuc900_timer_init, .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h index 91acb404779..88ef4b26708 100644 --- a/arch/arm/mach-w90x900/nuc9xx.h +++ b/arch/arm/mach-w90x900/nuc9xx.h @@ -15,10 +15,9 @@ * */ struct map_desc; -struct sys_timer; /* core initialisation functions */ extern void nuc900_init_irq(void); -extern struct sys_timer nuc900_timer; +extern void nuc900_timer_init(void); extern void nuc9xx_restart(char, const char *); diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index fa27c498ac0..d9c3d6b801c 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c @@ -167,12 +167,8 @@ static void __init nuc900_clocksource_init(void) TDR_SHIFT, clocksource_mmio_readl_down); } -static void __init nuc900_timer_init(void) +void __init nuc900_timer_init(void) { nuc900_clocksource_init(); nuc900_clockevents_init(); } - -struct sys_timer nuc900_timer = { - .init = nuc900_timer_init, -}; -- cgit v1.2.3 From b632a30e8b9f861d543728443203e4c674610ed3 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 12 Dec 2012 21:06:21 +0800 Subject: ARM: remove unused arch_decomp_wdog() With ARCH_HAS_DECOMP_WDOG removed from arch/arm/boot/compressed/decompress.c, all the arch_decomp_wdog() definition at platform level is unneeded. Remmove it. Signed-off-by: Shawn Guo Acked-by: Nicolas Pitre Acked-by: Jason Cooper --- arch/arm/mach-w90x900/include/mach/uncompress.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-w90x900') diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h index 03130212ace..4b7c324ff66 100644 --- a/arch/arm/mach-w90x900/include/mach/uncompress.h +++ b/arch/arm/mach-w90x900/include/mach/uncompress.h @@ -24,8 +24,6 @@ #include #include -#define arch_decomp_wdog() - #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) static volatile u32 * const uart_base = (u32 *)UART0_PA; -- cgit v1.2.3 From 838a2ae80a6ab52139fb1bf0a93ea8c5eff94488 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sat, 12 Jan 2013 11:50:05 +0000 Subject: ARM: use clockevents_config_and_register() where possible The clockevent core is able to figure out the best mult and shift, calculate min_delta_ns and max_delta_ns, with the necessary info passed into clockevents_config_and_register(). Use this combined configure and register function where possible to make the codes less error prone and gain some positive diff stat. Signed-off-by: Shawn Guo Cc: Nicolas Ferre Reviewed-by: Anton Vorontsov Acked-by: Kukjin Kim Cc: Russell King Cc: Sascha Hauer Cc: Jason Cooper Tested-by: Roland Stigge Acked-by: Eric Miao Cc: Haojian Zhuang Cc: David Brown Tested-by: Tony Lindgren Acked-by: Barry Song Tested-by: Stephen Warren Acked-by: Tony Prisk Cc: Lennert Buytenhek Cc: Wan ZongShun Acked-by: Viresh Kumar Acked-by: Arnd Bergmann Acked-by: Jason Cooper Reviewed-by: Thomas Gleixner Signed-off-by: Olof Johansson --- arch/arm/mach-w90x900/time.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'arch/arm/mach-w90x900') diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index fa27c498ac0..b61ab3ed361 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c @@ -91,7 +91,6 @@ static int nuc900_clockevent_setnextevent(unsigned long evt, static struct clock_event_device nuc900_clockevent_device = { .name = "nuc900-timer0", - .shift = 32, .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .set_mode = nuc900_clockevent_setmode, .set_next_event = nuc900_clockevent_setnextevent, @@ -133,15 +132,10 @@ static void __init nuc900_clockevents_init(void) __raw_writel(RESETINT, REG_TISR); setup_irq(IRQ_TIMER0, &nuc900_timer0_irq); - nuc900_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC, - nuc900_clockevent_device.shift); - nuc900_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff, - &nuc900_clockevent_device); - nuc900_clockevent_device.min_delta_ns = clockevent_delta2ns(0xf, - &nuc900_clockevent_device); nuc900_clockevent_device.cpumask = cpumask_of(0); - clockevents_register_device(&nuc900_clockevent_device); + clockevents_config_and_register(&nuc900_clockevent_device, rate, + 0xf, 0xffffffff); } static void __init nuc900_clocksource_init(void) -- cgit v1.2.3