Files
linux-stable-mirror/drivers
Inochi Amaoto 88520b2fec mmc: litex_mmc: Use DIV_ROUND_UP for more accurate clock calculation
commit b837e38c25 upstream.

The previous clock uses roundup_pow_of_two() to calculate the core
clock frequency. It does not meet the actual hardware meaning.
The actual frequency is calculated by "ref_clk / ((div >> 1) << 1)".

Fix the clock divider calculation.

Fixes: 92e0991047 ("mmc: Add driver for LiteX's LiteSDCard interface")
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Reviewed-by: Gabriel Somlo <gsomlo@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-06-19 13:39:32 +02:00
..
2026-06-19 13:39:31 +02:00
2026-06-19 13:39:27 +02:00