Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1582056pxb; Thu, 4 Feb 2021 17:33:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhUVhyHXvR3TLwefndR2IGQHcuRrQGgLWX/ssFW18jrUOKzUjq4f7hxsmpiUW62s1lEb9k X-Received: by 2002:a17:906:7689:: with SMTP id o9mr1810967ejm.324.1612488831078; Thu, 04 Feb 2021 17:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612488831; cv=none; d=google.com; s=arc-20160816; b=e2u4oGabf9fgqxmvuq0Qap70EFloL9LRe/491U0WERafkFSHLTwLA++/+tAUDK1jgG 7DB1pMW6oeDsaE5427UVGzqxg7arafbP/gmuiTjgnf/q8fGJWfh4//+khbzNF3wtabUE U5/Xibu+LQLI7IGn3d4FiSwrzhMGtIN9Pg+r1Sf/qf9VBQhwi0EVUg+YsjcGlkxl+9iV rmQbSIWXznnX8zsXogooqXi32nL7jFd5c08t2X2MGPEK5rUf8kb1RTMXUZC4h4hmWV9x m/0DI/51wTqJojOTBu+b7dzuIDouGg85bMSCIDqaBxL4oMAq29Hz8vKKWD6ctboTcUq+ ZASQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=03gfRtztwTCAaOrSQHP56Pr0aLkjiryuMta9Iqtlf0k=; b=L3petChyqbgKh52yMvnPR4QkumwlUBfSHt/AFLijmUEimG5ggiX/c78ONMS2pNF+7u 5YfbJ0ND/2I6w6V1PFtuzfqecG5lHUSCWVb54QMnB5bn4fF2m7Lj9iKXjaS1vKMekl8L naG8tYGShMx/XTfyTdSFUjFCfhhOXJES5H5Tx5MI2k28xTE9lfZCc/uLx+DR+O1a2w12 iDXtgoCTYq0gy1U2ac//4+HV+n/roQBXix/8zVS56lyZdYPgyJpcTLpPcxSKQy/iXKsv 8w8zK13hk5QEjGbk/aqjV1VDejJ2YTHw2x6lC/EEYk6ncwdHTD9X6CWlxVkN/WSjcIez 57IQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si4438846edr.594.2021.02.04.17.33.26; Thu, 04 Feb 2021 17:33:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siol.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239389AbhBDStj (ORCPT + 99 others); Thu, 4 Feb 2021 13:49:39 -0500 Received: from mailoutvs14.siol.net ([185.57.226.205]:59571 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239368AbhBDStO (ORCPT ); Thu, 4 Feb 2021 13:49:14 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id BEBBC523FC1; Thu, 4 Feb 2021 19:48:14 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id idPup2N7xS9N; Thu, 4 Feb 2021 19:48:14 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 6D758523FC4; Thu, 4 Feb 2021 19:48:14 +0100 (CET) Received: from kista.localdomain (cpe-86-58-58-53.static.triera.net [86.58.58.53]) (Authenticated sender: 031275009) by mail.siol.net (Postfix) with ESMTPSA id 9BE10523FC1; Thu, 4 Feb 2021 19:48:11 +0100 (CET) From: Jernej Skrabec To: mripard@kernel.org, wens@csie.org Cc: mturquette@baylibre.com, sboyd@kernel.org, airlied@linux.ie, daniel@ffwll.ch, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com, Andre Heider Subject: [PATCH 1/5] clk: sunxi-ng: mp: fix parent rate change flag check Date: Thu, 4 Feb 2021 19:47:06 +0100 Message-Id: <20210204184710.1880895-2-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210204184710.1880895-1-jernej.skrabec@siol.net> References: <20210204184710.1880895-1-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 all= owed") Tested-by: Andre Heider Signed-off-by: Jernej Skrabec --- 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 fa4ecb915590..5f40be6d2dfd 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 =3D cmp->m.max ?: 1 << cmp->m.width; max_p =3D cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1); =20 - if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) { + if (!(clk_hw_get_flags(&cmp->common.hw) & CLK_SET_RATE_PARENT)) { ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); rate =3D *parent_rate / p / m; } else { --=20 2.30.0