Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f48039a3 authored by Simon Horman's avatar Simon Horman
Browse files

ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c



r8a7779_earlytimer_init() calls r8a7779_clock_init() and
r8a7779_clock_init() is defined in clock-r8a7779.c.

If both CONFIG_COMMON_CLK and CONFIG_ARCH_R8A7779 are enabled,
as will be the case when marzen-reference moves to use
the common clock framework, then setup-r8a7779.c is compiled
but clock-r8a7779.c is not.

As r8a7779_earlytimer_init() is not used by marzen-reference
simply move it to clock-r8a7779.c.

[horms+renesas@verge.net.au: rebase]
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 3e05f24a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/sh_clk.h>
#include <linux/clkdev.h>
#include <linux/sh_timer.h>
#include <mach/r8a7779.h>
#include "clock.h"
#include "common.h"
@@ -261,3 +262,13 @@ void __init r8a7779_clock_init(void)
	else
		panic("failed to setup r8a7779 clocks\n");
}

/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
void __init __weak r8a7779_register_twd(void) { }

void __init r8a7779_earlytimer_init(void)
{
	r8a7779_clock_init();
	r8a7779_register_twd();
	shmobile_earlytimer_init();
}
+0 −10
Original line number Diff line number Diff line
@@ -674,16 +674,6 @@ void __init r8a7779_add_standard_devices(void)
	r8a7779_register_hpb_dmae();
}

/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
void __init __weak r8a7779_register_twd(void) { }

void __init r8a7779_earlytimer_init(void)
{
	r8a7779_clock_init();
	r8a7779_register_twd();
	shmobile_earlytimer_init();
}

void __init r8a7779_add_early_devices(void)
{
	early_platform_add_devices(r8a7779_devices_dt,