Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5077022pxb; Mon, 15 Feb 2021 08:55:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY71RaIbX1iPRfSzEwJkbfiatUL31/Yt6EArePRxbxcocoizqxju7E80szUos55Ac3Da9S X-Received: by 2002:a50:9f4e:: with SMTP id b72mr17050994edf.4.1613408110006; Mon, 15 Feb 2021 08:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613408109; cv=none; d=google.com; s=arc-20160816; b=MALpLF1pPegR73jUIMtXN+5Rav65dzxk2Fy4VtL9ut0tkj6ZjDhftwSc113F3huN6T GRvNVwh6uW6oz3ljOUZ6WfiZMhi1fpa76rwG1mF9xgwhUBYOAuhYS/COEOdE7oATYRmM g3WDNFLCJXwK9g1cbY6dMr5N+wpOYjFZLEwFarvojw0FBgbgaeBOX5xBomNBmWcz3q0w CGHttLVdjcX8bZbjeyXFtfleXoZBkgMkrDrFKXG3fW/TSNRMiSJAFioWBzKXbKEHc9gE 1umIBPHVZuHyHZwIJT23usa07nKPM6uxR6h3gDNrqTPaBLoPc/aGcgIYpS6UlqLtkY6J 4T3g== 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=bzPb6PndTUc7eMI4cXHQjayULoo9tYtKoqi4gMaZtcU=; b=FkbdKMy+dtHF7IwkzlpaVWf2ohUXASjJBk72znRBCTa3a6WynHgFiYXqP/6fW4Vo36 bRaTIPtW4UaIeHZ615a1FNKcqKduvx7LWeTlFBqMrkzEB5AZc/bab8AltLXEKLvd4Yjg sWPDruZPmlncncliCgH+zd9IqJ8AqS05T7A6D92G1y2EOyzr/liyFXHKcK26VgK1zR91 mspaMJslF8CXmobU6Sq6qbbAx8bqvzNaMT8fmhOZwIGHHBipR9ZuKoD73cTgts3xEsvk i85/hCNW05PfRyy2XBSQiIgEWj1jzYSrujn0Lj9h8QqZoAeIkuwIjbFRnkwtpFmVwkRG zCvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oQ1gS++5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 dc16si4165729ejb.190.2021.02.15.08.54.46; Mon, 15 Feb 2021 08:55:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=oQ1gS++5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S232339AbhBOQxQ (ORCPT + 99 others); Mon, 15 Feb 2021 11:53:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:50214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231629AbhBOPmV (ORCPT ); Mon, 15 Feb 2021 10:42:21 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B100264E37; Mon, 15 Feb 2021 15:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403313; bh=bhDqEH9zOJRCMqDkygcw2XwdvM5ZzSlCwdfVnG58tRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oQ1gS++5TM8FGLVh1mt6XStM6VccK1T33SXHiYaZ1YyjmagT8sp/XKxTeQB8EZI2F M7Jn4i1UJIQ4dRBB8iZm56rgxQXsroY3guEwxJEWyJDvWOHoQ7VK/1lsh4hVlld8eH RAWiepd//lPSSqGSVA2Y+L+mno6U0PWOeRaqZmOo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen-Yu Tsai , Andre Heider , Jernej Skrabec , Maxime Ripard , Stephen Boyd , Sasha Levin Subject: [PATCH 5.10 081/104] clk: sunxi-ng: mp: fix parent rate change flag check Date: Mon, 15 Feb 2021 16:27:34 +0100 Message-Id: <20210215152722.065814250@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jernej Skrabec [ Upstream commit 245090ab2636c0869527ce563afbfb8aff29e825 ] CLK_SET_RATE_PARENT flag is checked on parent clock instead of current one. Fix that. Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when allowed") Reviewed-by: Chen-Yu Tsai Tested-by: Andre Heider Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20210209175900.7092-2-jernej.skrabec@siol.net Acked-by: Maxime Ripard Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/sunxi-ng/ccu_mp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/sunxi-ng/ccu_mp.c b/drivers/clk/sunxi-ng/ccu_mp.c index fa4ecb9155909..9d3a76604d94c 100644 --- a/drivers/clk/sunxi-ng/ccu_mp.c +++ b/drivers/clk/sunxi-ng/ccu_mp.c @@ -108,7 +108,7 @@ static unsigned long ccu_mp_round_rate(struct ccu_mux_internal *mux, max_m = cmp->m.max ?: 1 << cmp->m.width; max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1); - if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) { + if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) { ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); rate = *parent_rate / p / m; } else { -- 2.27.0