[openwrt/openwrt] ipq40xx: 5.15: add patch commenting unused sdhci function
LEDE Commits
lede-commits at lists.infradead.org
Thu May 11 18:25:09 PDT 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bec927c70f88a643644fc4af963c8aabafc06030
commit bec927c70f88a643644fc4af963c8aabafc06030
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue May 9 01:59:23 2023 +0200
ipq40xx: 5.15: add patch commenting unused sdhci function
Add patch commenting unused sdhci function, hopin this will be dropped
when the problem is actually found.
Fix compilation warning:
drivers/mmc/host/sdhci-msm.c:1781:13: error: 'sdhci_msm_set_clock' defined but not used [-Werror=unused-function]
1781 | static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
...ci-msm-comment-unused-sdhci_msm_set_clock.patch | 108 +++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/target/linux/ipq40xx/patches-5.15/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch b/target/linux/ipq40xx/patches-5.15/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
new file mode 100644
index 0000000000..b297600171
--- /dev/null
+++ b/target/linux/ipq40xx/patches-5.15/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
@@ -0,0 +1,108 @@
+From 28edd829133766eb3cefaf2e49d3ee701968061b Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 9 May 2023 01:57:17 +0200
+Subject: [PATCH] mmc: sdhci-msm: comment unused sdhci_msm_set_clock
+
+comment unused sdhci_msm_set_clock and __sdhci_msm_set_clock as due to some
+current problem, we are forced to use sdhci_set_clock.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/mmc/host/sdhci-msm.c | 86 ++++++++++++++++++------------------
+ 1 file changed, 43 insertions(+), 43 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-msm.c
++++ b/drivers/mmc/host/sdhci-msm.c
+@@ -1751,49 +1751,49 @@ static unsigned int sdhci_msm_get_min_cl
+ return SDHCI_MSM_MIN_CLOCK;
+ }
+
+-/*
+- * __sdhci_msm_set_clock - sdhci_msm clock control.
+- *
+- * Description:
+- * MSM controller does not use internal divider and
+- * instead directly control the GCC clock as per
+- * HW recommendation.
+- **/
+-static void __sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
+-{
+- u16 clk;
+-
+- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+-
+- if (clock == 0)
+- return;
+-
+- /*
+- * MSM controller do not use clock divider.
+- * Thus read SDHCI_CLOCK_CONTROL and only enable
+- * clock with no divider value programmed.
+- */
+- clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+- sdhci_enable_clk(host, clk);
+-}
+-
+-/* sdhci_msm_set_clock - Called with (host->lock) spinlock held. */
+-static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
+-{
+- struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+- struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
+-
+- if (!clock) {
+- host->mmc->actual_clock = msm_host->clk_rate = 0;
+- goto out;
+- }
+-
+- sdhci_msm_hc_select_mode(host);
+-
+- msm_set_clock_rate_for_bus_mode(host, clock);
+-out:
+- __sdhci_msm_set_clock(host, clock);
+-}
++// /*
++// * __sdhci_msm_set_clock - sdhci_msm clock control.
++// *
++// * Description:
++// * MSM controller does not use internal divider and
++// * instead directly control the GCC clock as per
++// * HW recommendation.
++// **/
++// static void __sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
++// {
++// u16 clk;
++
++// sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
++
++// if (clock == 0)
++// return;
++
++// /*
++// * MSM controller do not use clock divider.
++// * Thus read SDHCI_CLOCK_CONTROL and only enable
++// * clock with no divider value programmed.
++// */
++// clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
++// sdhci_enable_clk(host, clk);
++// }
++
++// /* sdhci_msm_set_clock - Called with (host->lock) spinlock held. */
++// static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
++// {
++// struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
++// struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
++
++// if (!clock) {
++// host->mmc->actual_clock = msm_host->clk_rate = 0;
++// goto out;
++// }
++
++// sdhci_msm_hc_select_mode(host);
++
++// msm_set_clock_rate_for_bus_mode(host, clock);
++// out:
++// __sdhci_msm_set_clock(host, clock);
++// }
+
+ /*****************************************************************************\
+ * *
More information about the lede-commits
mailing list