* [PATCH 1/2] ARM: mmp: do not divide the clock rate
2019-12-18 19:04 [PATCH 0/2] Unbreak parent selection on MMP2 timer mux Lubomir Rintel
@ 2019-12-18 19:04 ` Lubomir Rintel
2019-12-18 19:04 ` [PATCH 2/2] clk: mmp2: Fix the order of timer mux parents Lubomir Rintel
1 sibling, 0 replies; 4+ messages in thread
From: Lubomir Rintel @ 2019-12-18 19:04 UTC (permalink / raw)
To: Olof Johansson
Cc: Arnd Bergmann, Stephen Boyd, Michael Turquette, linux-kernel,
Lubomir Rintel, soc, linux-clk, linux-arm-kernel
This was done because the clock driver returned the wrong rate, which is
fixed in "clk: mmp2: Fix the order of timer mux parents" patch.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
arch/arm/mach-mmp/time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 110dcb3314d13..c65cfc1ad99b4 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -207,7 +207,7 @@ static int __init mmp_dt_init_timer(struct device_node *np)
ret = clk_prepare_enable(clk);
if (ret)
return ret;
- rate = clk_get_rate(clk) / 2;
+ rate = clk_get_rate(clk);
} else if (cpu_is_pj4()) {
rate = 6500000;
} else {
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] clk: mmp2: Fix the order of timer mux parents
2019-12-18 19:04 [PATCH 0/2] Unbreak parent selection on MMP2 timer mux Lubomir Rintel
2019-12-18 19:04 ` [PATCH 1/2] ARM: mmp: do not divide the clock rate Lubomir Rintel
@ 2019-12-18 19:04 ` Lubomir Rintel
2019-12-19 5:14 ` Stephen Boyd
1 sibling, 1 reply; 4+ messages in thread
From: Lubomir Rintel @ 2019-12-18 19:04 UTC (permalink / raw)
To: Olof Johansson
Cc: Arnd Bergmann, Stephen Boyd, Michael Turquette, linux-kernel,
Lubomir Rintel, soc, linux-clk, linux-arm-kernel
Determined empirically, no documentation is available.
The OLPC XO-1.75 laptop used parent 1, that one being VCTCXO/4 (65MHz), but
thought it's a VCTCXO/2 (130MHz). The mmp2 timer driver, not knowing
what is going on, ended up just dividing the rate as of
commit f36797ee4380 ("ARM: mmp/mmp2: dt: enable the clock")'
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
drivers/clk/mmp/clk-of-mmp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c
index e7e264f26a50d..24af9241bfa06 100644
--- a/drivers/clk/mmp/clk-of-mmp2.c
+++ b/drivers/clk/mmp/clk-of-mmp2.c
@@ -154,7 +154,7 @@ static DEFINE_SPINLOCK(ssp3_lock);
static const char *ssp_parent_names[] = {"vctcxo_4", "vctcxo_2", "vctcxo", "pll1_16"};
static DEFINE_SPINLOCK(timer_lock);
-static const char *timer_parent_names[] = {"clk32", "vctcxo_2", "vctcxo_4", "vctcxo"};
+static const char *timer_parent_names[] = {"clk32", "vctcxo_4", "vctcxo_2", "vctcxo"};
static DEFINE_SPINLOCK(reset_lock);
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread