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

Commit 198678b0 authored by Binghua Duan's avatar Binghua Duan Committed by Mike Turquette
Browse files

ARM: PRIMA2: convert to common clk and finish full clk tree



Commit 02c981c0 only implements a little part of primaII clk tree
due to common clk framework was not ready at that time.
This patch converts the old driver to common clk and finish the full clk
tree.

Signed-off-by: default avatarBinghua Duan <Binghua.Duan@csr.com>
Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent fea7a08a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ config ARCH_PRIMA2
	select NO_IOPORT
	select ARCH_REQUIRE_GPIOLIB
	select GENERIC_CLOCKEVENTS
	select CLKDEV_LOOKUP
	select COMMON_CLK
	select GENERIC_IRQ_CHIP
	select MIGHT_HAVE_CACHE_L2X0
	select PINCTRL
+925 −264

File changed.

Preview size limit exceeded, changes collapsed.

+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ static const char *prima2cb_dt_match[] __initdata = {
MACHINE_START(PRIMA2_EVB, "prima2cb")
	/* Maintainer: Barry Song <baohua.song@csr.com> */
	.atag_offset	= 0x100,
	.init_early     = sirfsoc_of_clk_init,
	.map_io         = sirfsoc_map_lluart,
	.init_irq	= sirfsoc_of_irq_init,
	.timer		= &sirfsoc_timer,
+7 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#include <asm/sched_clock.h>
#include <asm/mach/time.h>

#include "common.h"

#define SIRFSOC_TIMER_COUNTER_LO	0x0000
#define SIRFSOC_TIMER_COUNTER_HI	0x0004
#define SIRFSOC_TIMER_MATCH_0		0x0008
@@ -188,9 +190,13 @@ static void __init sirfsoc_clockevent_init(void)
static void __init sirfsoc_timer_init(void)
{
	unsigned long rate;
	struct clk *clk;

	/* initialize clocking early, we want to set the OS timer */
	sirfsoc_of_clk_init();

	/* timer's input clock is io clock */
	struct clk *clk = clk_get_sys("io", NULL);
	clk = clk_get_sys("io", NULL);

	BUG_ON(IS_ERR(clk));