[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200422153401.7913-1-yamada.masahiro@socionext.com>
Date: Thu, 23 Apr 2020 00:34:01 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-mmc@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>
Cc: Randy Dunlap <rdunlap@...radead.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Andrew Jeffery <andrew@...id.au>,
Baolin Wang <baolin.wang@...aro.org>,
Chunyan Zhang <zhang.chunyan@...aro.org>,
Faiz Abbas <faiz_abbas@...com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Takao Orito <orito.takao@...ionext.com>,
Thomas Gleixner <tglx@...utronix.de>,
YueHaibing <yuehaibing@...wei.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK
If sdhci-of-at91.c is compiled without CONFIG_HAVE_CLK, the line
caps1 |= FIELD_PREP(SDHCI_CLOCK_MUL_MASK, clk_mul);
... emits "FIELD_PREP: value too large for the field" warning.
The compiler seems to decide clk_mul is constant (unsigned int)-1,
because clk_get_rate() returns 0 when CONFIG_HAVE_CLK is disabled.
Add HAVE_CLK to the depenency since this driver does not work without
the clock APIs anyway.
Link: https://lkml.org/lkml/2020/4/17/613
Fixes: linux-next ("mmc: sdhci: use FIELD_GET/PREP for capabilities bit masks")
Reported-by: Randy Dunlap <rdunlap@...radead.org>
Suggested-by: Adrian Hunter <adrian.hunter@...el.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---
Ulf,
I do not know how to fill the Fixes tag.
It is currently 8da1ff4f68a2 in linux-next, but I am not sure it is
stable. I just added 'linux-next'.
If you have a preferred way, please modify it.
drivers/mmc/host/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 462b5352fea7..2aee844722d6 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -171,7 +171,7 @@ config MMC_SDHCI_OF_ASPEED
config MMC_SDHCI_OF_AT91
tristate "SDHCI OF support for the Atmel SDMMC controller"
depends on MMC_SDHCI_PLTFM
- depends on OF
+ depends on OF && HAVE_CLK
help
This selects the Atmel SDMMC driver
--
2.25.1
Powered by blists - more mailing lists