From: Janusz Krzysztofik Date: Sun, 10 Apr 2022 13:07:54 +0000 (+0200) Subject: ARM: OMAP1: clock: Fix UART rate reporting algorithm X-Git-Tag: v6.6.17~7441^2~10^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=338d5d476cde853dfd97378d20496baabc2ce3c0;p=platform%2Fkernel%2Flinux-rpi.git ARM: OMAP1: clock: Fix UART rate reporting algorithm Since its introduction to the mainline kernel, omap1_uart_recalc() helper makes incorrect use of clk->enable_bit as a ready to use bitmap mask while it only provides the bit number. Fix it. Signed-off-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Arnd Bergmann --- diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 4487755..42e094e 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -41,7 +41,7 @@ static DEFINE_SPINLOCK(clockfw_lock); unsigned long omap1_uart_recalc(struct clk *clk) { unsigned int val = __raw_readl(clk->enable_reg); - return val & clk->enable_bit ? 48000000 : 12000000; + return val & 1 << clk->enable_bit ? 48000000 : 12000000; } unsigned long omap1_sossi_recalc(struct clk *clk)