From patchwork Thu Feb 17 21:49:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 12750682 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1B86C433EF for ; Thu, 17 Feb 2022 21:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=igmvAJOiv8TzHkvvKyyxngIlVhzHT54PzSKu7HWohtc=; b=Co62LEfPFJBV7K o4BFUrVKX+gx3dBKeucidYMzZ75rVwBvwk1wWLDNUwDOssTO96CoyPHmR1XAXtjmn+PUp9mNNcZ+y QJnYXK5zs20hJ+brYLaxxnH4zjg0pl/VG97VvFuAICim5Ef+GxculAnb0pYWBT981cQNw5WnyF1yS J4uDES/93O14psV8KGW5JPM5YANx3VjBY/BT0KxW7Ae0cB2/WknG4YMJSLdNmb54EpiamD46Jwa/7 naGZY1KapIGhm7e9Hp6DrvZJ4se+sR1IT4vkHKxao6dJSVqXrEAgOLefqJP2WCFa5JOT24/6kklXz jnZ+Wp0Et7zFe+nUj8Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKofP-00CJiE-Jh; Thu, 17 Feb 2022 21:50:23 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKofM-00CJht-AN for linux-arm-kernel@lists.infradead.org; Thu, 17 Feb 2022 21:50:21 +0000 Received: by mail-lf1-x12d.google.com with SMTP id e5so1739282lfr.9 for ; Thu, 17 Feb 2022 13:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k02/bKS8aVI9os28coGbc487m6RW3DHQoe7DqZjzTCc=; b=LxPObU6Fzi5HT6pY2zP44/iObwpLjY6V7cEhfQnj7LrpgUAftUPZq3DAIRc6ItbOUU /78Td/LOWh0KzRCD1HKS/J9i4cxmSsGKPOwUsEGP47HwlxINFHgZklQnDlntvPUkIPKV c8TGFg0QD+7p7g2EZrKpeKn72QNg0hHAORjhmoklXDTijX3HRwCFEvUf7uHaIcPsp6OO vESiYJKn3mxom+lpUE1tK4ANgwK5cGhdNX8i+J+bQcQ1vIueOQHMxTE9w1nMidxv3coC aD5aEr6B4L0PUZzhO7jBdllQGNGQozfQKXJyX3ac6uBJKda6/K/3owkUZ0hVmXJpilPu UM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k02/bKS8aVI9os28coGbc487m6RW3DHQoe7DqZjzTCc=; b=jw/Q8FUkm8+y1CN+kEOhkLVeoNY59T8vMbwnJE04OQJp6swSGw84ihRvHz0BghAW3S tBePkpYJN3bKiV/P5D22wNPcWbxKfC2M+QAp8mT/NRpSf7OBgKDD9bF4jY6hpyOoe+Jf R85Pb+aOtJxOfzykmXoxFodWuZlNSqMZYhk2u8uVfV7UhdGnANqaIfM6Rn9EqbH9lkM2 B0uSxJ9k6l019MKE20CKWD2SqOa/Q8+bySbfW/D7zZsRBbuWnZbJZBLiXX9skDrO+zWY 92Y8mQAKutUhPKwaSsfmpO4d80bhanGvYipHLRZC5/XwaKovr1FLdsd86ibmyoU2P9vX mrMg== X-Gm-Message-State: AOAM532Q3Cx2daz/7aRTQRqf/opVp/LdRc8kBeDm1VLltIyPYbcxbCQk DHapKEV4Nvb2hsCYxj3BsFU= X-Google-Smtp-Source: ABdhPJx+NO54QRpZFVUAQ3EaCL3piphY6Wa7kUc7muhaZDCVSY/xg8ysaFKrl1hSGDHPW4wMqZLx+A== X-Received: by 2002:a19:5212:0:b0:443:5b82:b6b with SMTP id m18-20020a195212000000b004435b820b6bmr3418441lfb.232.1645134618142; Thu, 17 Feb 2022 13:50:18 -0800 (PST) Received: from dell.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id j8sm99672lja.26.2022.02.17.13.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 13:50:17 -0800 (PST) From: Janusz Krzysztofik To: Tony Lindgren Cc: Paul Walmsley , Aaro Koskinen , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Janusz Krzysztofik Subject: [PATCH] ARM: OMAP1: clock: Fix UART rate reporting algorithm Date: Thu, 17 Feb 2022 22:49:59 +0100 Message-Id: <20220217214959.419572-1-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220217_135020_403682_B8587CA5 X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 9d4a0ab50a46..d63d5eb8d8fd 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)