openwrt/target/linux/mediatek/patches-6.6/930-spi-mt65xx-enable-sel-clk.patch
Daniel Golle 5b4bbd1097 mediatek: 6.6: refresh patches
Refresh patches and fix changed path for 32-bit mediatek boards
'arch/arm/dts' -> 'arch/arm/dts/mediatek'

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-11 21:22:12 +00:00

19 lines
595 B
Diff

--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1226,8 +1226,15 @@ static int mtk_spi_probe(struct platform
if (ret < 0)
return dev_err_probe(dev, ret, "failed to enable hclk\n");
+ ret = clk_prepare_enable(mdata->sel_clk);
+ if (ret < 0) {
+ clk_disable_unprepare(mdata->spi_hclk);
+ return dev_err_probe(dev, ret, "failed to enable sel_clk\n");
+ }
+
ret = clk_prepare_enable(mdata->spi_clk);
if (ret < 0) {
+ clk_disable_unprepare(mdata->sel_clk);
clk_disable_unprepare(mdata->spi_hclk);
return dev_err_probe(dev, ret, "failed to enable spi_clk\n");
}