From: "André Draszik" <andre.draszik@linaro.org>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Cc: Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v5 01/20] clk: bump stdout clock usage for earlycon
Date: Thu, 08 Aug 2024 15:41:52 +0100 [thread overview]
Message-ID: <0fbc53b1c9e7b27d1363495b6fe3c8eb64efbb8e.camel@linaro.org> (raw)
In-Reply-To: <20240808-gs101-non-essential-clocks-2-v5-1-11cffef0634e@linaro.org>
On Thu, 2024-08-08 at 15:11 +0100, André Draszik wrote:
> On some platforms, earlycon depends on the bootloader setup stdout
> clocks being retained. In some cases stdout UART clocks (or their
> parents) can get disabled during loading of other drivers (e.g. i2c)
> causing earlycon to stop to work sometime into the boot, halting the
> whole system.
>
> Since there are at least two platforms where that is the case, i.MX and
> the Exynos-derivative gs101, this patch adds some logic to the clk core
> to detect these clocks if earlycon is enabled, to bump their usage
> count as part of of_clk_add_hw_provider() and of_clk_add_provider(),
> and to release them again at the end of init.
>
> This way code duplication in affected platforms can be avoided.
>
> The general idea is based on similar code in the i.MX clock driver, but
> this here is a bit more generic as in general (e.g. on gs101) clocks
> can come from various different clock units (driver instances) and
> therefore it can be necessary to run this code multiple times until all
> required stdout clocks have probed.
>
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
> ---
> drivers/clk/clk.c | 129 ++++++++++++++++++++++++++++++++++++++++
> drivers/clk/samsung/clk-gs101.c | 1 +
I shall send a v6 with the modification to clk-gs101.c dropped. This was left
by accident while moving some of the code :-(
Cheers,
Andre'
next prev parent reply other threads:[~2024-08-08 14:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 14:11 [PATCH v5 00/20] clk: help OF platforms with their stdout (earlycon) clocks during early boot André Draszik
2024-08-08 14:11 ` [PATCH v5 01/20] clk: bump stdout clock usage for earlycon André Draszik
2024-08-08 14:41 ` André Draszik [this message]
2024-08-08 14:11 ` [PATCH v5 02/20] clk: samsung: gs101: don't mark non-essential (UART) clocks critical André Draszik
2024-08-08 14:11 ` [PATCH v5 03/20] clk: imx: imx25: drop call to imx_register_uart_clocks() André Draszik
2024-08-08 14:11 ` [PATCH v5 04/20] clk: imx: imx27: " André Draszik
2024-08-08 14:11 ` [PATCH v5 05/20] clk: imx: imx35: " André Draszik
2024-08-08 14:11 ` [PATCH v5 06/20] clk: imx: imx5: " André Draszik
2024-08-08 14:11 ` [PATCH v5 07/20] clk: imx: imx6q: " André Draszik
2024-08-08 14:11 ` [PATCH v5 08/20] clk: imx: imx6sl: " André Draszik
2024-08-08 14:11 ` [PATCH v5 09/20] clk: imx: imx6sll: " André Draszik
2024-08-08 14:11 ` [PATCH v5 10/20] clk: imx: imx6sx: " André Draszik
2024-08-08 14:11 ` [PATCH v5 11/20] clk: imx: imx6ul: " André Draszik
2024-08-08 14:11 ` [PATCH v5 12/20] clk: imx: imx7d: " André Draszik
2024-08-08 14:11 ` [PATCH v5 13/20] clk: imx: imx7ulp: drop calls " André Draszik
2024-08-08 14:11 ` [PATCH v5 14/20] clk: imx: imx8mm: drop call " André Draszik
2024-08-08 14:11 ` [PATCH v5 15/20] clk: imx: imx8mn: " André Draszik
2024-08-08 14:11 ` [PATCH v5 16/20] clk: imx: imx8mp: " André Draszik
2024-08-08 14:11 ` [PATCH v5 17/20] clk: imx: imx8mq: " André Draszik
2024-08-08 14:11 ` [PATCH v5 18/20] clk: imx: imx8ulp: " André Draszik
2024-08-08 14:11 ` [PATCH v5 19/20] clk: imx: imx93: " André Draszik
2024-08-08 14:11 ` [PATCH v5 20/20] clk: imx: drop imx_register_uart_clocks() André Draszik
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=0fbc53b1c9e7b27d1363495b6fe3c8eb64efbb8e.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=abelvesa@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel-team@android.com \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=peter.griffin@linaro.org \
--cc=s.hauer@pengutronix.de \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--cc=semen.protsenko@linaro.org \
--cc=shawnguo@kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®