mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
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 <robert.jarzmik@free.fr> Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
|
||||
struct tag;
|
||||
struct meminfo;
|
||||
struct sys_timer;
|
||||
struct pt_regs;
|
||||
struct smp_operations;
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -48,7 +47,7 @@ struct machine_desc {
|
||||
void (*map_io)(void);/* IO mapping function */
|
||||
void (*init_early)(void);
|
||||
void (*init_irq)(void);
|
||||
struct sys_timer *timer; /* system tick timer */
|
||||
void (*init_time)(void);
|
||||
void (*init_machine)(void);
|
||||
void (*init_late)(void);
|
||||
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
||||
|
||||
@@ -10,22 +10,6 @@
|
||||
#ifndef __ASM_ARM_MACH_TIME_H
|
||||
#define __ASM_ARM_MACH_TIME_H
|
||||
|
||||
/*
|
||||
* This is our kernel timer structure.
|
||||
*
|
||||
* - init
|
||||
* Initialise the kernels jiffy timer source, claim interrupt
|
||||
* using setup_irq. This is called early on during initialisation
|
||||
* while interrupts are still disabled on the local CPU.
|
||||
* - offset
|
||||
* Return the timer offset in microseconds since the last timer
|
||||
* interrupt. Note: this must take account of any unprocessed
|
||||
* timer interrupt which may be pending.
|
||||
*/
|
||||
struct sys_timer {
|
||||
void (*init)(void);
|
||||
};
|
||||
|
||||
extern void timer_tick(void);
|
||||
|
||||
struct timespec;
|
||||
|
||||
@@ -30,11 +30,6 @@
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
/*
|
||||
* Our system timer.
|
||||
*/
|
||||
static struct sys_timer *system_timer;
|
||||
|
||||
#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
|
||||
defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
|
||||
/* this needs a better home */
|
||||
@@ -120,8 +115,6 @@ int __init register_persistent_clock(clock_access_fn read_boot,
|
||||
|
||||
void __init time_init(void)
|
||||
{
|
||||
system_timer = machine_desc->timer;
|
||||
system_timer->init();
|
||||
machine_desc->init_time();
|
||||
sched_clock_postinit();
|
||||
}
|
||||
|
||||
|
||||
@@ -274,8 +274,3 @@ void __init at91rm9200_timer_init(void)
|
||||
/* register clocksource */
|
||||
clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);
|
||||
}
|
||||
|
||||
struct sys_timer at91rm9200_timer = {
|
||||
.init = at91rm9200_timer_init,
|
||||
};
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ static int __init of_at91sam926x_pit_init(void)
|
||||
/*
|
||||
* Set up both clocksource and clockevent support.
|
||||
*/
|
||||
static void __init at91sam926x_pit_init(void)
|
||||
void __init at91sam926x_pit_init(void)
|
||||
{
|
||||
unsigned long pit_rate;
|
||||
unsigned bits;
|
||||
@@ -279,7 +279,3 @@ void __init at91sam926x_ioremap_pit(u32 addr)
|
||||
if (!pit_base_addr)
|
||||
panic("Impossible to ioremap PIT\n");
|
||||
}
|
||||
|
||||
struct sys_timer at91sam926x_timer = {
|
||||
.init = at91sam926x_pit_init,
|
||||
};
|
||||
|
||||
@@ -82,8 +82,3 @@ void __init at91x40_timer_init(void)
|
||||
|
||||
at91_tc_write(AT91_TC_CLK1BASE + AT91_TC_CCR, (AT91_TC_SWTRG | AT91_TC_CLKEN));
|
||||
}
|
||||
|
||||
struct sys_timer at91x40_timer = {
|
||||
.init = at91x40_timer_init,
|
||||
};
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ static void __init onearm_board_init(void)
|
||||
|
||||
MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
|
||||
/* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = onearm_init_early,
|
||||
|
||||
@@ -210,7 +210,7 @@ static void __init afeb9260_board_init(void)
|
||||
|
||||
MACHINE_START(AFEB9260, "Custom afeb9260 board")
|
||||
/* Maintainer: Sergey Lapin <slapin@ossfans.org> */
|
||||
.timer = &at91sam926x_timer,
|
||||
.init_time = at91sam926x_pit_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = afeb9260_init_early,
|
||||
|
||||
@@ -187,7 +187,7 @@ static void __init cam60_board_init(void)
|
||||
|
||||
MACHINE_START(CAM60, "KwikByte CAM60")
|
||||
/* Maintainer: KwikByte */
|
||||
.timer = &at91sam926x_timer,
|
||||
.init_time = at91sam926x_pit_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = cam60_init_early,
|
||||
|
||||
@@ -157,7 +157,7 @@ static void __init carmeva_board_init(void)
|
||||
|
||||
MACHINE_START(CARMEVA, "Carmeva")
|
||||
/* Maintainer: Conitec Datasystems */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = carmeva_init_early,
|
||||
|
||||
@@ -374,7 +374,7 @@ MACHINE_START(CPUAT9260, "Eukrea CPU9260")
|
||||
MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
|
||||
#endif
|
||||
/* Maintainer: Eric Benard - EUKREA Electromatique */
|
||||
.timer = &at91sam926x_timer,
|
||||
.init_time = at91sam926x_pit_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = cpu9krea_init_early,
|
||||
|
||||
@@ -178,7 +178,7 @@ static void __init cpuat91_board_init(void)
|
||||
|
||||
MACHINE_START(CPUAT91, "Eukrea")
|
||||
/* Maintainer: Eric Benard - EUKREA Electromatique */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = cpuat91_init_early,
|
||||
|
||||
@@ -251,7 +251,7 @@ static void __init csb337_board_init(void)
|
||||
|
||||
MACHINE_START(CSB337, "Cogent CSB337")
|
||||
/* Maintainer: Bill Gatliff */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = csb337_init_early,
|
||||
|
||||
@@ -132,7 +132,7 @@ static void __init csb637_board_init(void)
|
||||
|
||||
MACHINE_START(CSB637, "Cogent CSB637")
|
||||
/* Maintainer: Bill Gatliff */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = csb637_init_early,
|
||||
|
||||
@@ -49,7 +49,7 @@ static const char *at91_dt_board_compat[] __initdata = {
|
||||
|
||||
DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
|
||||
/* Maintainer: Atmel */
|
||||
.timer = &at91sam926x_timer,
|
||||
.init_time = at91sam926x_pit_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = at91_dt_initialize,
|
||||
|
||||
@@ -44,7 +44,7 @@ static void __init at91eb01_init_early(void)
|
||||
|
||||
MACHINE_START(AT91EB01, "Atmel AT91 EB01")
|
||||
/* Maintainer: Greg Ungerer <gerg@snapgear.com> */
|
||||
.timer = &at91x40_timer,
|
||||
.init_time = at91x40_timer_init,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = at91eb01_init_early,
|
||||
.init_irq = at91eb01_init_irq,
|
||||
|
||||
@@ -116,7 +116,7 @@ static void __init eb9200_board_init(void)
|
||||
}
|
||||
|
||||
MACHINE_START(ATEB9200, "Embest ATEB9200")
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = eb9200_init_early,
|
||||
|
||||
@@ -181,7 +181,7 @@ static void __init ecb_at91board_init(void)
|
||||
|
||||
MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
|
||||
/* Maintainer: emQbit.com */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = ecb_at91init_early,
|
||||
|
||||
@@ -149,7 +149,7 @@ static void __init eco920_board_init(void)
|
||||
|
||||
MACHINE_START(ECO920, "eco920")
|
||||
/* Maintainer: Sascha Hauer */
|
||||
.timer = &at91rm9200_timer,
|
||||
.init_time = at91rm9200_timer_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = eco920_init_early,
|
||||
|
||||
@@ -159,7 +159,7 @@ static void __init flexibity_board_init(void)
|
||||
|
||||
MACHINE_START(FLEXIBITY, "Flexibity Connect")
|
||||
/* Maintainer: Maxim Osipov */
|
||||
.timer = &at91sam926x_timer,
|
||||
.init_time = at91sam926x_pit_init,
|
||||
.map_io = at91_map_io,
|
||||
.handle_irq = at91_aic_handle_irq,
|
||||
.init_early = flexibity_init_early,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user