From: Marek Vasut <marex@nabladev.com>
To: Brian Masney <bmasney@redhat.com>
Cc: linux-clk@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Michael Walle <michael@walle.cc>, Rob Herring <robh@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/6] clk: fsl-sai: Extract clock setup into fsl_sai_clk_register()
Date: Thu, 9 Apr 2026 02:24:56 +0200 [thread overview]
Message-ID: <30942755-885c-4ecd-a719-c78f91c5abd4@nabladev.com> (raw)
In-Reply-To: <adbSxmeJDf14EtS0@redhat.com>
On 4/9/26 12:12 AM, Brian Masney wrote:
Hi,
>> - hw = devm_clk_hw_register_composite_pdata(dev, dev->of_node->name,
>> - &pdata, 1, NULL, NULL,
>> - &sai_clk->div.hw,
>> - &clk_divider_ops,
>> - &sai_clk->gate.hw,
>> - &clk_gate_ops,
>> - CLK_SET_RATE_GATE);
>> - if (IS_ERR(hw))
>> - return PTR_ERR(hw);
>> -
>> - return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, hw);
>> + ret = fsl_sai_clk_register(dev, base, &sai_clk->lock,
>> + &sai_clk->bclk_div, &sai_clk->bclk_gate,
>> + &sai_clk->bclk_hw, CSR_BCE_BIT, CR2_BCD,
>> + data->offset + I2S_CR2, "BCLK");
> ^^^^^^^^^^^^^^^^^^^^^^
> Sashiko reports the following:
> https://sashiko.dev/#/patchset/20260407211123.77602-1-marex%40nabladev.com
>
> For MCLK, this evaluates to writel(MCR_MOE, base + I2S_MCR). Does this
> overwrite the entire register and clear all other bits to 0? This could zero
> out fields like the MCLK Divider Enable and Clock Source Select, breaking
> the MCLK hardware divider.
>
> It's the same behavior as what was there previously. There's a lot more
> to the comment. Can you look and see if there's anything else valid in
> Sashiko's comment that should be addressed while changes are being made
> here?
>
> Otherwise, based on what was there previously, this looks good to me.
I'll move the writel() before devm_clk_hw_register_composite_pdata()
even if it makes no difference in this particular case.
next prev parent reply other threads:[~2026-04-09 0:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 21:09 [PATCH v5 1/6] dt-bindings: clock: fsl-sai: Document i.MX8M support Marek Vasut
2026-04-07 21:09 ` [PATCH v5 2/6] clk: fsl-sai: Sort the headers Marek Vasut
2026-04-07 21:10 ` [PATCH v5 3/6] clk: fsl-sai: Add i.MX8M support with 8 byte register offset Marek Vasut
2026-04-07 21:10 ` [PATCH v5 4/6] dt-bindings: clock: fsl-sai: Document clock-cells = <1> support Marek Vasut
2026-04-07 21:10 ` [PATCH v5 5/6] clk: fsl-sai: Extract clock setup into fsl_sai_clk_register() Marek Vasut
2026-04-08 21:58 ` Brian Masney
2026-04-09 0:13 ` Marek Vasut
2026-04-08 22:12 ` Brian Masney
2026-04-09 0:24 ` Marek Vasut [this message]
2026-04-07 21:10 ` [PATCH v5 6/6] clk: fsl-sai: Add MCLK generation support Marek Vasut
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=30942755-885c-4ecd-a719-c78f91c5abd4@nabladev.com \
--to=marex@nabladev.com \
--cc=bmasney@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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®