summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>2022-04-10 15:07:54 +0200
committerArnd Bergmann <arnd@arndb.de>2022-04-22 11:08:56 +0200
commit338d5d476cde853dfd97378d20496baabc2ce3c0 (patch)
tree9018e97b6800f58eb43905c5a3bd2f29283d35a4
parent34c86239b184aeedde8dee95e2ee09dde92045e6 (diff)
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 <jmkrzyszt@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/arm/mach-omap1/clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 44877554eb41..42e094e781ce 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)