Skip to contentSkip to conversation

ARM: shmobile: r8a7779: Generic SoC CCF and timer support

PATCH Superseded Magnus Damm 2 participants 2 messages Feb 18, 2015

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 2/5 ARM: shmobile: r8a7779: Generic SoC CCF and timer support

From: Magnus Damm <[email protected]>

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.

---

 arch/arm/mach-shmobile/setup-r8a7779.c |    9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/mach-shmobile/setup-r8a7779.c +9 -0
@@ -14,6 +14,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#include <linux/clk/shmobile.h>
+#include <linux/clocksource.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
@@ -761,6 +763,12 @@ u32 __init r8a7779_read_mode_pins(void)
 	return mode;
 }
 
+static void __init r8a7779_init_time(void)
+{
+	r8a7779_clocks_init(r8a7779_read_mode_pins());
+	clocksource_of_init();
+}
+
 static const char *r8a7779_compat_dt[] __initdata = {
 	"renesas,r8a7779",
 	NULL,
@@ -769,6 +777,7 @@ static const char *r8a7779_compat_dt[] _
 DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
 	.map_io		= r8a7779_map_io,
 	.init_early	= shmobile_init_delay,
+	.init_time	= r8a7779_init_time,
 	.init_irq	= r8a7779_init_irq_dt,
 	.init_late	= shmobile_init_late,
 	.dt_compat	= r8a7779_compat_dt,
Acked-by on v1 2/5
#1 lore raw
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds