]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 22 Apr 2020 15:34:01 +0000 (00:34 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 28 May 2020 09:21:01 +0000 (11:21 +0200)
commit669a3c0bd9d784c66a205e2cdbfddd16c4034940
tree11f5b0d4d8f963833f0c934c910e2ebfecafa062
parentd1a07389f105ce41ab7c5cb5ec60f2d8fd184708
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.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Link: https://lore.kernel.org/r/20200422153401.7913-1-yamada.masahiro@socionext.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
drivers/mmc/host/Kconfig