From patchwork Tue Jan 19 11:38:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 366160 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp823166jam; Tue, 19 Jan 2021 06:50:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOksQqxHqez67YYLYcRzm6F7mtN8gfYnueDVtUVYqdShNSQlh6U7YsJVvqwNtge4CoR/O9 X-Received: by 2002:a05:6402:c9c:: with SMTP id cm28mr3819457edb.281.1611067822889; Tue, 19 Jan 2021 06:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611067822; cv=none; d=google.com; s=arc-20160816; b=p8PDZRyED6xUtIOeuA/5g4ufvNwxk3It+GieRFfSzWpJXGqNthIaQHhqiAIYCu/hWY wE6Sm5PhyH0mUhWmVIr1lDYulxZKMSOjdNgjiAsZkctEnYiKCRrWw+GQl/Aved1TjQuQ 39C3MIRPlfmoHIKOvtlFoGyeftX+yzu+dzdgRgDVYZUwvIZeUyOJHCu95vKfRklAZcdA jIRqJNJ36mT7S5hIxsaNo+N6AzRiE33fOIJayR/Lay6udx++csQvPytxdNvbuoVL+aPw ta1GE31ZgmjNIXtjAMgndTzxez5y6Z8qr0My/DmYxs4dHiQmyNCffierKW3sdj4b+bSj YMJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qA6i77Zlz4mMSdNqaeglUYnAY+zKEB2RYdwGdqj1Hu8=; b=C2dNnRb/EFEQvvWWFASlxOCYEDy3JhLEHgxiAgKoPBNwThtHgrMMl0kTL8v1VU0MIh zxKgJCYvd86jnFRdKMmW4PjQW0J47tITBV6A3l41upQqGRGE0vcnu+Ut+hwOR5W7vtW4 J199H/vyd3eRodMZ3qG6qk99EeGSSBJ/6GBRDuTq4ImpsqjBdv8tdav+nCl8TDsiaIEZ LdCSQuTIpAKf9Cr3q30KQp261PdTi5WhCXFgZqKskptRxsdy+BLZ1r8vg65GB6Mbk9So RhXKsgAOp3nvYtDdIZAxRl+16re8HwAe03jjws1FLm8JuADm02cltxUi4xRXkLsgY6Zm ONSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kTkmB779; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi12si6482824edb.423.2021.01.19.06.50.22; Tue, 19 Jan 2021 06:50:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kTkmB779; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391021AbhASOqM (ORCPT + 15 others); Tue, 19 Jan 2021 09:46:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731968AbhASLls (ORCPT ); Tue, 19 Jan 2021 06:41:48 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57BB9C061574 for ; Tue, 19 Jan 2021 03:39:32 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id c128so1675630wme.2 for ; Tue, 19 Jan 2021 03:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qA6i77Zlz4mMSdNqaeglUYnAY+zKEB2RYdwGdqj1Hu8=; b=kTkmB779suE0zVUtNy89lKEksOACmWYww8w/nXhzz5gL3GkmhNcmT0K2196fgCSK15 jIGk/fIp1Y4LM/kcwH5ygTdj3UA7fRmjryBNAjwRkCCx6pwr4BfmvPx//SJvyzlrydnR DIoiQYkeXn+j7vdpact8ln2/+BXSIEu1kQq4ZtTEsyOUB3eHDAlLcpmNzTD52+xux9PP PSiuFiOQh8LNgG56RFho91KyamTbtwMnVs4tN2OYCC1KfjWiEK8l8PLNciyaURbtmc8z Hmi+CQPuQgSloUqQtOoQUta1cFNe5I5PtlnlByVlvISQwKE7irqY1QxJLXg4Pf7lxzXr 6uqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qA6i77Zlz4mMSdNqaeglUYnAY+zKEB2RYdwGdqj1Hu8=; b=je2O6RBLU/8FxHDQ1tChNKwh0VBaNGlKkV5k208uzI8aDOkUg/TS6Tn3LEREdMYrOr uR5fSHCWFdtoc6To2xRris/ji9zHl8vUO5FVp9Rk8LIanTaR/TXiDyfXSNVQxX10L3WI tpbkI4eYAbunifvIysESMdOrbkolOwz2zg1I/WLZAblxGXHK4Y+ElH159OBLYVL3kjGo Z9fQk8IonyRxOt9QPIz3ZahKnBIF6guJBLzYV+gMli1Lu1cZ116Z3vYnNQb0W4bjcsYg +9q9MP5095C1i+o+9Qd4lLTQ5MVDq40zPmjKqvktE9c2pHxrJudhUcCbP8MtaORBzG67 xKxw== X-Gm-Message-State: AOAM530Ilj2Seh1JVMqDfiZ7EU74+errs5NtKRImGvtwmoAVtpvMNslf x2uuNFRWHKcY7XqvfMBz4FPKow== X-Received: by 2002:a7b:c41a:: with SMTP id k26mr3705989wmi.1.1611056370810; Tue, 19 Jan 2021 03:39:30 -0800 (PST) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id g192sm4450237wmg.18.2021.01.19.03.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 03:39:30 -0800 (PST) From: Srinivas Kandagatla To: sboyd@kernel.org Cc: mturquette@baylibre.com, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH] clk: qcom: gfm-mux: fix clk mask Date: Tue, 19 Jan 2021 11:38:51 +0000 Message-Id: <20210119113851.18946-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org For some reason global GFM_MASK ended up with bit 1 instead of bit 0. Remove the global GFM_MASK and reuse mux_mask field. Fixes: a2d8f507803e ("clk: qcom: Add support to LPASS AUDIO_CC Glitch Free Mux clocks") Signed-off-by: Srinivas Kandagatla --- drivers/clk/qcom/lpass-gfm-sm8250.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.21.0 diff --git a/drivers/clk/qcom/lpass-gfm-sm8250.c b/drivers/clk/qcom/lpass-gfm-sm8250.c index d366c7c2abc7..f5e31e692b9b 100644 --- a/drivers/clk/qcom/lpass-gfm-sm8250.c +++ b/drivers/clk/qcom/lpass-gfm-sm8250.c @@ -33,14 +33,13 @@ struct clk_gfm { void __iomem *gfm_mux; }; -#define GFM_MASK BIT(1) #define to_clk_gfm(_hw) container_of(_hw, struct clk_gfm, hw) static u8 clk_gfm_get_parent(struct clk_hw *hw) { struct clk_gfm *clk = to_clk_gfm(hw); - return readl(clk->gfm_mux) & GFM_MASK; + return readl(clk->gfm_mux) & clk->mux_mask; } static int clk_gfm_set_parent(struct clk_hw *hw, u8 index) @@ -51,9 +50,10 @@ static int clk_gfm_set_parent(struct clk_hw *hw, u8 index) val = readl(clk->gfm_mux); if (index) - val |= GFM_MASK; + val |= clk->mux_mask; else - val &= ~GFM_MASK; + val &= ~clk->mux_mask; + writel(val, clk->gfm_mux);