From: Stephen Boyd <sboyd@kernel.org>
To: "Alim Akhtar" <alim.akhtar@samsung.com>,
"André Draszik" <andre.draszik@linaro.org>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Sam Protsenko" <semen.protsenko@linaro.org>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"Tudor Ambarus" <tudor.ambarus@linaro.org>
Cc: "Tudor Ambarus" <tudor.ambarus@linaro.org>,
"Will McVicker" <willmcvicker@google.com>,
kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
"André Draszik" <andre.draszik@linaro.org>
Subject: Re: [PATCH v4 1/2] clk: samsung: gs101: allow earlycon to work unconditionally
Date: Thu, 18 Jul 2024 13:46:22 -0700 [thread overview]
Message-ID: <c2c2b51d30f551bf8a9c1fb6507301bb.sboyd@kernel.org> (raw)
In-Reply-To: <20240712-gs101-non-essential-clocks-2-v4-1-310aee0de46e@linaro.org>
Quoting André Draszik (2024-07-12 10:09:43)
> diff --git a/drivers/clk/samsung/clk-gs101.c b/drivers/clk/samsung/clk-gs101.c
> index 85098c61c15e..429690757923 100644
> --- a/drivers/clk/samsung/clk-gs101.c
> +++ b/drivers/clk/samsung/clk-gs101.c
> @@ -4381,6 +4386,99 @@ static const struct samsung_cmu_info peric1_cmu_info __initconst = {
>
> /* ---- platform_driver ----------------------------------------------------- */
>
> +static struct {
> + struct mutex lock;
> +
> + bool bump_refs;
> +
> + struct clk **clks;
> + size_t n_clks;
> +} gs101_stdout_clks __initdata = {
> + .lock = __MUTEX_INITIALIZER(gs101_stdout_clks.lock),
> +};
> +
> +static int __init gs101_keep_uart_clocks_param(char *str)
> +{
> + gs101_stdout_clks.bump_refs = true;
> + return 0;
> +}
> +early_param("earlycon", gs101_keep_uart_clocks_param);
> +
> +static void __init gs101_bump_uart_clock_references(void)
> +{
> + size_t n_clks;
> +
> + /* We only support device trees - do nothing if not available. */
> + if (!IS_ENABLED(CONFIG_OF))
> + return;
> +
> + n_clks = of_clk_get_parent_count(of_stdout);
> + if (!n_clks || !of_stdout)
> + return;
I don't see anything in here that's driver specific. Please move this to
the clk framework, hook something like of_clk_add_provider() similar to
how of_clk_set_defaults(), and have it look at the of_stdout node for
'clocks' to munge the clks in the core framework for the serial console.
next prev parent reply other threads:[~2024-07-18 20:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 17:09 [PATCH v4 0/2] gs101 oriole: UART clock fixes André Draszik
2024-07-12 17:09 ` [PATCH v4 1/2] clk: samsung: gs101: allow earlycon to work unconditionally André Draszik
2024-07-18 20:46 ` Stephen Boyd [this message]
2024-07-25 7:14 ` André Draszik
2024-07-12 17:09 ` [PATCH v4 2/2] clk: samsung: gs101: don't mark non-essential (UART) clocks critical André Draszik
2024-07-18 20:55 ` [PATCH v4 0/2] gs101 oriole: UART clock fixes Stephen Boyd
2024-07-25 7:12 ` André Draszik
2024-07-26 16:44 ` Stephen Boyd
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=c2c2b51d30f551bf8a9c1fb6507301bb.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=cw00.choi@samsung.com \
--cc=kernel-team@android.com \
--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=peter.griffin@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=semen.protsenko@linaro.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;
as well as URLs for NNTP newsgroup(s).