From patchwork Mon Mar 1 16:09:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388733 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3655631jap; Mon, 1 Mar 2021 12:05:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHSFjA8vTagf1OHTHm5H4+RETi1nBaSWHJ0H4muc4eQS66TQkONCQ9olALgPcqyc9JCgnq X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr1483354ejr.371.1614629153938; Mon, 01 Mar 2021 12:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614629153; cv=none; d=google.com; s=arc-20160816; b=kZxCoyHFOXeTSkwUIySjNpiAV/RymWEiSWa8JteaAbdQIYkkgUqjHzJTkIFzDf8pQg j9AOA17MDqMVeuqbC5V+m3OjymqAsZBw7vkkhFmKewTb1SFzve1BAB+Oe/iazCTyMQZO hgEBU4/zw2tsXtqVcaPnJjR8PRjTkKAYF/2lHJ89CSZeATW2OYl6pb9bLuLzLF5CDx1X krw+b/sYmlQkOObwZ5lxbdksRkaedjYAiI3ToaN5oRwZRsQ76TXW1DF/ComneqXiQsES Zpqu+1pmRL8+KZP5G4+TIi5kLFQcckP/nVlENHvKcAb0KcFOIx8GghQvTAr/MU11koyz +4Eg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oVpg1eBf8xl2rgTNJaG3hWJzQmOu4uedbO9amJ/w4rc=; b=hfAnH4a7eHfSu3XCSC4IV3TH25PO96eGPfK5b00HBGZeqogdO48GdxikcB4tRYsfdc ULTBPi6XTr9HLOv9s5aCb1E9NbCwd1QsJ4qz8T1tWL26Gd4fdCHdX8RGcxZ9nxQqfrWH t1gUpjq43IBsGABwjz1Ya/ankc4JLwAXnj4gfTQqvR9j845KXfYvv8ZCxW8ImpFaVg9n cVxasDinzmYEgQ2QmMg/S/ymUjmGBg7GgpGfYIJYrJLi3mHFjebX3RmPhT08ZBTy3f6i Ko9Jzwgw5LsHVOOC//BbMQ2LrFMYO2dQIZHpHkDMwu5vk1rHR4vnfmJnhiS90qs6Vvhf xvPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="K1TN5Kc/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si11696186edd.421.2021.03.01.12.05.53; Mon, 01 Mar 2021 12:05:53 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b="K1TN5Kc/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242694AbhCAUDV (ORCPT + 13 others); Mon, 1 Mar 2021 15:03:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:57754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242344AbhCATxK (ORCPT ); Mon, 1 Mar 2021 14:53:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EFBF650E8; Mon, 1 Mar 2021 17:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614621194; bh=K3xNrXhUVqjnSx3rUO3T5Zh1wsZLbB70mPBkArxwv/0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K1TN5Kc/fi8dRt3iYyLZOCDfB5e0cpVBpCPB99FCDZAPJskOVYAraXt3+AhSikuU6 6K0m7AkCoMiAZ4g7+uQEBofgXhedKYRtxcWtxozBSjR/eqOGBNQGV6C9JdSTI0Twbd 1dj7NKRBpo2YFGL2sYCsWLXMFPY31AcDPqwsx1ec= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Stephen Boyd , Sasha Levin Subject: [PATCH 5.11 426/775] clk: qcom: gfm-mux: fix clk mask Date: Mon, 1 Mar 2021 17:09:54 +0100 Message-Id: <20210301161222.621653129@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit 78ddb79cab178534b2c1d9ab95823f2af882ee8e ] 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 Link: https://lore.kernel.org/r/20210119113851.18946-1-srinivas.kandagatla@linaro.org Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/lpass-gfm-sm8250.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.27.0 diff --git a/drivers/clk/qcom/lpass-gfm-sm8250.c b/drivers/clk/qcom/lpass-gfm-sm8250.c index d366c7c2abc77..f5e31e692b9b4 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);