From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: u-boot@lists.u-boot-project.org, Tom Rini <trini@konsulko.com>,
Michal Simek <michal.simek@amd.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Padmarao Begari <padmarao.begari@amd.com>,
Anshul Dalal <anshuld@ti.com>,
Neha Malcom Francis <n-francis@ti.com>,
Johan Jonker <jbx6244@gmail.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Patrice Chotard <patrice.chotard@foss.st.com>
Subject: Re: [PATCH v2 1/3] spi: cadence_qspi: enable all clocks
Date: Sat, 15 Aug 2026 10:09:11 -0400 [thread overview]
Message-ID: <aoBzB2o_KUD6NwrC@maple.netwinder.org> (raw)
In-Reply-To: <43fec897-24f2-40f6-b1d4-63a7a171a013@mailbox.org>
On Sat, Aug 15, 2026 at 12:03:55AM +0200, Marek Vasut wrote:
>On 8/14/26 8:28 PM, Ralph Siemsen wrote:
>
>[...]
>
>>@@ -250,7 +250,11 @@ static int cadence_spi_probe(struct udevice *bus)
>> return ret;
>> #endif
>> } else {
>>- priv->ref_clk_hz = clk_get_rate(&clk);
>>+ ret = clk_enable_bulk(&clks);
>
>Some sort of clk_disable_bulk() seems to be missing.
>
>Fail path which disables the clock seems to be missing too in this function.
Ack for both.
>>+ if (ret)
>>+ dev_warn(bus, "failed clk_enable_bulk\n");
>>+
>>+ priv->ref_clk_hz = clk_get_rate(&clks.clks[0]);
>
>Can the refclock be second or later (not first) clock in the list of
>multiple clock in DT ? If yes, then the clk_get_rate[0] will return
>bogus rate for another clock.
The right solution is to get the clock by name. But once again we have a
pile of existing boards which may not have the correct name ("ref") in
their device tree. So I went with the simple option of continuing to
assume that the first clock is the refclock.
Ralph
next prev parent reply other threads:[~2026-08-15 14:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 18:28 [PATCH v2 0/3] spi: cadence_qspi: clock enable, compatible, write protect Ralph Siemsen
2026-08-14 18:28 ` [PATCH v2 1/3] spi: cadence_qspi: enable all clocks Ralph Siemsen
2026-08-14 22:03 ` Marek Vasut via U-Boot
2026-08-15 14:09 ` Ralph Siemsen [this message]
2026-08-16 11:27 ` Marek Vasut via U-Boot
2026-08-14 18:28 ` [PATCH v2 2/3] spi: cadence_qspi: add RZ/N1 compatible Ralph Siemsen
2026-08-14 18:28 ` [PATCH v2 3/3] spi: cadence_qspi: Use APB write protection Ralph Siemsen
2026-08-14 22:04 ` Marek Vasut via U-Boot
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=aoBzB2o_KUD6NwrC@maple.netwinder.org \
--to=ralph.siemsen@linaro.org \
--cc=anshuld@ti.com \
--cc=jbx6244@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marek.vasut@mailbox.org \
--cc=michal.simek@amd.com \
--cc=n-francis@ti.com \
--cc=padmarao.begari@amd.com \
--cc=patrice.chotard@foss.st.com \
--cc=quentin.schulz@cherry.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.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