All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 06/13] dt-bindings: timer: Add new OST support for the upcoming new driver.
Date: Thu,  3 Dec 2020 20:32:54 +0100	[thread overview]
Message-ID: <20201203193301.2405835-6-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <20201203193301.2405835-1-daniel.lezcano@linaro.org>

From: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>

The new OST has one global timer and two or four percpu timers, so there
will be three combinations in the upcoming new OST driver: the original
GLOBAL_TIMER + PERCPU_TIMER, the new GLOBAL_TIMER + PERCPU_TIMER0/1 and
GLOBAL_TIMER + PERCPU_TIMER0/1/2/3, For this, add the macro definition
about OST_CLK_PERCPU_TIMER0/1/2/3. And in order to ensure that all the
combinations work normally, the original ABI values of OST_CLK_PERCPU_TIMER
and OST_CLK_GLOBAL_TIMER need to be exchanged to ensure that in any
combinations, the clock can be registered (by calling clk_hw_register())
from index 0.

Before this patch, OST_CLK_PERCPU_TIMER and OST_CLK_GLOBAL_TIMER are only
used in two places, one is when using "assigned-clocks" to configure the
clocks in the DTS file; the other is when registering the clocks in the
sysost driver. When the values of these two ABIs are exchanged, the ABI
value used by sysost driver when registering the clock, and the ABI value
used by DTS when configuring the clock using "assigned-clocks" will also
change accordingly. Therefore, there is no situation that causes the wrong
clock to the configured. Therefore, exchanging ABI values will not cause
errors in the existing codes when registering and configuring the clocks.

Currently, in the mainline, only X1000 and X1830 are using sysost driver,
and the upcoming X2000 will also use sysost driver. This patch has been
tested on all three SoCs and all works fine.

Tested-by: 周正 (Zhou Zheng) <sernia.zhou@foxmail.com>
Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201026155842.10196-2-zhouyanjie@wanyeetech.com
---
 include/dt-bindings/clock/ingenic,sysost.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/dt-bindings/clock/ingenic,sysost.h b/include/dt-bindings/clock/ingenic,sysost.h
index 9ac88e90babf..063791b01ab3 100644
--- a/include/dt-bindings/clock/ingenic,sysost.h
+++ b/include/dt-bindings/clock/ingenic,sysost.h
@@ -1,12 +1,16 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * This header provides clock numbers for the ingenic,tcu DT binding.
+ * This header provides clock numbers for the Ingenic OST DT binding.
  */
 
 #ifndef __DT_BINDINGS_CLOCK_INGENIC_OST_H__
 #define __DT_BINDINGS_CLOCK_INGENIC_OST_H__
 
-#define OST_CLK_PERCPU_TIMER	0
-#define OST_CLK_GLOBAL_TIMER	1
+#define OST_CLK_PERCPU_TIMER	1
+#define OST_CLK_GLOBAL_TIMER	0
+#define OST_CLK_PERCPU_TIMER0	1
+#define OST_CLK_PERCPU_TIMER1	2
+#define OST_CLK_PERCPU_TIMER2	3
+#define OST_CLK_PERCPU_TIMER3	4
 
 #endif /* __DT_BINDINGS_CLOCK_INGENIC_OST_H__ */
-- 
2.25.1


  parent reply	other threads:[~2020-12-03 19:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 19:23 [GIT PULL] timer drivers for v5.11 Daniel Lezcano
2020-12-03 19:32 ` [PATCH 01/13] clocksource/drivers/sp804: Add static for functions such as sp804_clockevents_init() Daniel Lezcano
2020-12-03 19:32   ` [PATCH 02/13] clocksource/drivers/sp804: Make some symbol static Daniel Lezcano
2020-12-03 19:32   ` [PATCH 03/13] clocksource/drivers/sp804: Use clk_prepare_enable and clk_disable_unprepare Daniel Lezcano
2020-12-03 19:32   ` [PATCH 04/13] clocksource/drivers/sp804: Correct clk_get_rate handle Daniel Lezcano
2020-12-03 19:32   ` [PATCH 05/13] clocksource/drivers/sp804: Use pr_fmt Daniel Lezcano
2020-12-03 19:32   ` Daniel Lezcano [this message]
2020-12-03 19:32   ` [PATCH 07/13] clocksource/drivers/nps: Remove EZChip NPS clocksource driver Daniel Lezcano
2020-12-03 19:32   ` [PATCH 08/13] clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path Daniel Lezcano
2020-12-03 19:32   ` [PATCH 09/13] dt-bindings: timer: renesas: tmu: Document r8a774e1 bindings Daniel Lezcano
2020-12-03 19:32   ` [PATCH 10/13] dt-bindings: timer: renesas: tmu: Convert to json-schema Daniel Lezcano
2020-12-03 19:32   ` [PATCH 11/13] clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() Daniel Lezcano
2020-12-03 19:33   ` [PATCH 12/13] clocksource/drivers/ingenic: Fix section mismatch Daniel Lezcano
2020-12-03 19:33   ` [PATCH 13/13] clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI Daniel Lezcano
2020-12-03 23:41 ` [GIT PULL] timer drivers for v5.11 Thomas Gleixner
2020-12-03 23:47 ` [tip: timers/core] Merge tag 'timers-v5.11' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core tip-bot2 for Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203193301.2405835-6-daniel.lezcano@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.