openwrt/target/linux/mediatek/patches-6.6/930-spi-mt65xx-enable-sel-clk.patch
John Audia b04f245c39 kernel: bump 6.6 to 6.6.23
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23

Removed upstreamed:
  pending-6.6/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch[1]
  pending-6.6/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch[2]
  mediatek/patches-6.6/232-clk-mediatek-mt7981-topckgen-flag-SGM_REG_SEL-as-cri.patch[3]

Manually rebased:
  mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch

Added:
  generic/backports-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=1f32abb474c1c9bdb21d9eda74c325a0b3a162e5
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=943c14ece95eb1cf98d477462aebcbfdfd714633
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=6ff01b314149d1cf59caebc29384f0beed21cba4
4. See comments in https://github.com/openwrt/openwrt/pull/14992 regarding broken flogic/xiaomi_redmi-router-ax6000-ubootmod

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000
Run-tested: x86/64/AMD Cezannei, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-03-31 18:19:33 +02:00

19 lines
595 B
Diff

--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1228,8 +1228,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");
}