drivers/spi/spi-cadence-quadspi.c | 6 ++++++ 1 file changed, 6 insertions(+)
The move of the AHB and APB clocks from a JH7110 specific quirk to the
main clock init dropped the specification of the clock names to request
for the AHB and APB clocks, resulting in the clock framework requesting
a clock with a NULL name three times. On most platforms where the
clocks are physically the same or some are always on this makes no
difference but the reason we had the specific quirk for JH7110 is that
it does actually have separate, controllable clocks. Update the new
code to request the AHB and APB clocks by name to restore the original
behaviour on JH7110.
Fixes: 324ecc7788c2 ("spi: cadence-qspi: Kill cqspi_jh7110_clk_init")
Reported-by: Ron Economos <re@w6rz.net>
Closes: https://lore.kernel.org/r/a3ca5e9b-7446-497e-8df2-7ef2b42a02e9@w6rz.net
Signed-off-by: Mark Brown <broonie@kernel.org>
---
drivers/spi/spi-cadence-quadspi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 649ff55333f0..5fb0cb07c110 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -76,6 +76,11 @@ struct cqspi_flash_pdata {
u8 cs;
};
+static const struct clk_bulk_data cqspi_clks[CLK_QSPI_NUM] = {
+ [CLK_QSPI_APB] = { .id = "apb" },
+ [CLK_QSPI_AHB] = { .id = "ahb" },
+};
+
struct cqspi_st {
struct platform_device *pdev;
struct spi_controller *host;
@@ -1823,6 +1828,7 @@ static int cqspi_probe(struct platform_device *pdev)
}
/* Obtain QSPI clocks. */
+ memcpy(&cqspi->clks, &cqspi_clks, sizeof(cqspi->clks));
ret = devm_clk_bulk_get_optional(dev, CLK_QSPI_NUM, cqspi->clks);
if (ret)
return dev_err_probe(dev, ret, "Failed to get clocks\n");
---
base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
change-id: 20260306-spi-cadence-qspi-fix-jh7110-608e79a09d15
Best regards,
--
Mark Brown <broonie@kernel.org>
Hello, On 07/03/2026 at 09:50:35 GMT, Mark Brown <broonie@kernel.org> wrote: > The move of the AHB and APB clocks from a JH7110 specific quirk to the > main clock init dropped the specification of the clock names to request > for the AHB and APB clocks, resulting in the clock framework requesting > a clock with a NULL name three times. On most platforms where the > clocks are physically the same or some are always on this makes no > difference but the reason we had the specific quirk for JH7110 is that > it does actually have separate, controllable clocks. Update the new > code to request the AHB and APB clocks by name to restore the original > behaviour on JH7110. I know I'm late, but I wanted to understand what was wrong. Clearly I misunderstood the clk bulk API. It only works with names, not indexes, and I didn't got that right when I proposed the switch. The fix from Mark is correct (thanks). The RZ/N1 platform was also only getting a single clock instead of two, but the one it was getting is derived from the other, so in turns both were enabled. It eventually makes sense. Thanks Mark. Miquèl
On Sat, 07 Mar 2026 09:50:35 +0000, Mark Brown wrote:
> spi: cadence-qspi: Fix requesting of APB and AHB clocks on JH7110
Applied to
local tree spi-7.0
Thanks!
[1/1] spi: cadence-qspi: Fix requesting of APB and AHB clocks on JH7110
commit: e53c0e99fd93da200c413deb57875f9f5fdb314a
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On 3/7/26 01:50, Mark Brown wrote:
> The move of the AHB and APB clocks from a JH7110 specific quirk to the
> main clock init dropped the specification of the clock names to request
> for the AHB and APB clocks, resulting in the clock framework requesting
> a clock with a NULL name three times. On most platforms where the
> clocks are physically the same or some are always on this makes no
> difference but the reason we had the specific quirk for JH7110 is that
> it does actually have separate, controllable clocks. Update the new
> code to request the AHB and APB clocks by name to restore the original
> behaviour on JH7110.
>
> Fixes: 324ecc7788c2 ("spi: cadence-qspi: Kill cqspi_jh7110_clk_init")
> Reported-by: Ron Economos <re@w6rz.net>
> Closes: https://lore.kernel.org/r/a3ca5e9b-7446-497e-8df2-7ef2b42a02e9@w6rz.net
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> drivers/spi/spi-cadence-quadspi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
> index 649ff55333f0..5fb0cb07c110 100644
> --- a/drivers/spi/spi-cadence-quadspi.c
> +++ b/drivers/spi/spi-cadence-quadspi.c
> @@ -76,6 +76,11 @@ struct cqspi_flash_pdata {
> u8 cs;
> };
>
> +static const struct clk_bulk_data cqspi_clks[CLK_QSPI_NUM] = {
> + [CLK_QSPI_APB] = { .id = "apb" },
> + [CLK_QSPI_AHB] = { .id = "ahb" },
> +};
> +
> struct cqspi_st {
> struct platform_device *pdev;
> struct spi_controller *host;
> @@ -1823,6 +1828,7 @@ static int cqspi_probe(struct platform_device *pdev)
> }
>
> /* Obtain QSPI clocks. */
> + memcpy(&cqspi->clks, &cqspi_clks, sizeof(cqspi->clks));
> ret = devm_clk_bulk_get_optional(dev, CLK_QSPI_NUM, cqspi->clks);
> if (ret)
> return dev_err_probe(dev, ret, "Failed to get clocks\n");
>
> ---
> base-commit: 11439c4635edd669ae435eec308f4ab8a0804808
> change-id: 20260306-spi-cadence-qspi-fix-jh7110-608e79a09d15
>
> Best regards,
> --
> Mark Brown <broonie@kernel.org>
Tested-by: Ron Economos <re@w6rz.net>
© 2016 - 2026 Red Hat, Inc.