Skip to content

Commit e53c0e9

Browse files
committed
spi: cadence-qspi: Fix requesting of APB and AHB clocks on JH7110
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: 324ecc7 ("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 Tested-by: Ron Economos <re@w6rz.net> Link: https://patch.msgid.link/20260307-spi-cadence-qspi-fix-jh7110-v1-1-c9f37b8c58b1@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20260307-spi-cadence-qspi-fix-jh7110-v1-1-c9f37b8c58b1@kernel.org
1 parent 111e286 commit e53c0e9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/spi/spi-cadence-quadspi.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ struct cqspi_flash_pdata {
7676
u8 cs;
7777
};
7878

79+
static const struct clk_bulk_data cqspi_clks[CLK_QSPI_NUM] = {
80+
[CLK_QSPI_APB] = { .id = "apb" },
81+
[CLK_QSPI_AHB] = { .id = "ahb" },
82+
};
83+
7984
struct cqspi_st {
8085
struct platform_device *pdev;
8186
struct spi_controller *host;
@@ -1823,6 +1828,7 @@ static int cqspi_probe(struct platform_device *pdev)
18231828
}
18241829

18251830
/* Obtain QSPI clocks. */
1831+
memcpy(&cqspi->clks, &cqspi_clks, sizeof(cqspi->clks));
18261832
ret = devm_clk_bulk_get_optional(dev, CLK_QSPI_NUM, cqspi->clks);
18271833
if (ret)
18281834
return dev_err_probe(dev, ret, "Failed to get clocks\n");

0 commit comments

Comments
 (0)