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