From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61DCAC433EF for ; Wed, 1 Jun 2022 14:11:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355063AbiFAOL2 (ORCPT ); Wed, 1 Jun 2022 10:11:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355177AbiFAOFm (ORCPT ); Wed, 1 Jun 2022 10:05:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31948AF1D6; Wed, 1 Jun 2022 06:59:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4CE7C6162F; Wed, 1 Jun 2022 13:59:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BD62C3411F; Wed, 1 Jun 2022 13:59:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654091953; bh=0vLOqckxqz6FAn6Yj85sK+G/Bi0voXu2VUuWxkW7Bm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQP+2TWYpG5evbZcwxwMxasZsvOJBUE/Ge90q77qT1A3JCOJHdbPlbVZLq767b5cF VSlePSNOk8puFivt6a7or5O7+Ms4xxh/izDVub9zzZ6tYEXtbS4N8Cdu+UGrRB5PXA n9J4W8OVY65mg1kKBkihF8/wCTp/wvuTxnPe2z3qRUAyyL6fNfDX8YGOjNgs4sb0SN mSSx5qAYKNjDNUjwY7WlZSK7sszQoPOark1laiq6xvhg11y7VaaVJie3G9GVqqswEG U/uu7OaVtypz5TJUongMJhmwFOv4k2qxsLnRG8GPN3Vd/IIirR/vbxR0JDYg3uk1XV tFTP5MP96hzDg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Janusz Krzysztofik , Tony Lindgren , Arnd Bergmann , Sasha Levin , paul@pwsan.com, aaro.koskinen@iki.fi, linux@armlinux.org.uk, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.4 06/20] ARM: OMAP1: clock: Fix UART rate reporting algorithm Date: Wed, 1 Jun 2022 09:58:48 -0400 Message-Id: <20220601135902.2004823-6-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220601135902.2004823-1-sashal@kernel.org> References: <20220601135902.2004823-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Janusz Krzysztofik [ Upstream commit 338d5d476cde853dfd97378d20496baabc2ce3c0 ] 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 Signed-off-by: Sasha Levin --- arch/arm/mach-omap1/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index bd5be82101f3..d89bda12bf3c 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) -- 2.35.1