Skip to content

Commit

Permalink
ARM: at91: properly initialize timer
Browse files Browse the repository at this point in the history
Use clocksource_of_init to initialize the system timer instead of relying on a
custom function.

Signed-off-by: Alexandre Belloni <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Signed-off-by: Nicolas Ferre <[email protected]>
  • Loading branch information
alexandrebelloni authored and Nicolas Ferre committed Mar 16, 2015
1 parent d8d1c6c commit bbfc97e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
7 changes: 0 additions & 7 deletions arch/arm/mach-at91/at91rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ static const struct at91_soc rm9200_socs[] = {
{ /* sentinel */ },
};

static void __init at91rm9200_dt_timer_init(void)
{
of_clk_init(NULL);
at91rm9200_timer_init();
}

static void __init at91rm9200_dt_device_init(void)
{
struct soc_device *soc;
Expand All @@ -50,7 +44,6 @@ static const char *at91rm9200_dt_board_compat[] __initconst = {
};

DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
.init_time = at91rm9200_dt_timer_init,
.init_machine = at91rm9200_dt_device_init,
.dt_compat = at91rm9200_dt_board_compat,
MACHINE_END
4 changes: 3 additions & 1 deletion arch/arm/mach-at91/at91rm9200_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int __init of_at91rm9200_st_init(void)
/*
* ST (system timer) module supports both clockevents and clocksource.
*/
void __init at91rm9200_timer_init(void)
static void __init atmel_st_timer_init(struct device_node *node)
{
/* For device tree enabled device: initialize here */
of_at91rm9200_st_init();
Expand All @@ -249,3 +249,5 @@ void __init at91rm9200_timer_init(void)
/* register clocksource */
clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);
}
CLOCKSOURCE_OF_DECLARE(atmel_st_timer, "atmel,at91rm9200-st",
atmel_st_timer_init);
3 changes: 0 additions & 3 deletions arch/arm/mach-at91/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
extern void __init at91_map_io(void);
extern void __init at91_alt_map_io(void);

/* Timer */
extern void at91rm9200_timer_init(void);

/* idle */
extern void at91rm9200_idle(void);
extern void at91sam9_idle(void);
Expand Down

0 comments on commit bbfc97e

Please sign in to comment.