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

Commit 131c2e04 authored by Magnus Damm's avatar Magnus Damm Committed by Simon Horman
Browse files

ARM: shmobile: r8a7779: Generic CCF and timer support



Add a r8a7779-specific callback to initialize CCF and
clocksources. With this in place we are one step closer
to be able to use r8a7779 without C board code.

Also add a multiplatform wrapper to avoid breaking the
r8a7779 marzen legacy case.

Signed-off-by: default avatarMagnus Damm <damm+renesas@opensource.se>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent d770e558
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,8 @@
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * GNU General Public License for more details.
 */
 */
#include <linux/clk/shmobile.h>
#include <linux/clocksource.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
@@ -756,6 +758,14 @@ u32 __init r8a7779_read_mode_pins(void)
	return mode;
	return mode;
}
}


#ifdef CONFIG_ARCH_SHMOBILE_MULTI

static void __init r8a7779_init_time(void)
{
	r8a7779_clocks_init(r8a7779_read_mode_pins());
	clocksource_of_init();
}

static const char *r8a7779_compat_dt[] __initdata = {
static const char *r8a7779_compat_dt[] __initdata = {
	"renesas,r8a7779",
	"renesas,r8a7779",
	NULL,
	NULL,
@@ -764,8 +774,10 @@ static const char *r8a7779_compat_dt[] __initdata = {
DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
	.map_io		= r8a7779_map_io,
	.map_io		= r8a7779_map_io,
	.init_early	= shmobile_init_delay,
	.init_early	= shmobile_init_delay,
	.init_time	= r8a7779_init_time,
	.init_irq	= r8a7779_init_irq_dt,
	.init_irq	= r8a7779_init_irq_dt,
	.init_late	= shmobile_init_late,
	.init_late	= shmobile_init_late,
	.dt_compat	= r8a7779_compat_dt,
	.dt_compat	= r8a7779_compat_dt,
MACHINE_END
MACHINE_END
#endif /* CONFIG_ARCH_SHMOBILE_MULTI */
#endif /* CONFIG_USE_OF */
#endif /* CONFIG_USE_OF */