Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp938935pxb; Tue, 9 Feb 2021 17:21:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxaXIABNA3EHuvUsWmcBsTHt+2nAfu0v17xS2siDqOl3Q8dBs2zglnsj63KCHIuT5H2ZndE X-Received: by 2002:a05:6402:2022:: with SMTP id ay2mr905906edb.292.1612920076582; Tue, 09 Feb 2021 17:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612920076; cv=none; d=google.com; s=arc-20160816; b=Q71a7C82Q/FVUWARXoWjefrw1Pr9pWRiyP7RxtNTNWGhrwublDyNCmZ2Wvk/aufZ2R RDwxcr3QfACxcEw9wPl+zz34vqPXzTQPw0vbbn5AaPKvDxG9o3wq3ugkpa9qb+NeaG5O pYoa9PO0yz94/Odp4v/LLTJKNiVwkSxfwrB8RPDQwBVMK/kzlRlUQfjRqtEHASgQR/7h PWL+Pizn5PQion+SA7dNaXP4TeZ1GwFYVQVeTzipKwUHifdir9pC3pJkhtFDrYj0OSHs r6JGyd/J4PnRZsm1SVf+E794O2ZRIEqpicIWZ4edrtT3Gv371PMgHJO9j/SMruAPy7XD phjw== 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=T+jvUgU4KEKaoKdTNHfCSi8leQ07clUFEzYAYW0q74w=; b=PyTZY3JLoGqecpbLv8shrnG8lDG38hlxcch4mLx0HqrR1MXuBR4GzbcCv27UU+XKDA hILZvC4XTXyjszZwMeywydmAanXNo9KAO02kOZXG9/EDcWgzbR4pVJs0OQvwVJRFWJ+X LDK/p2Q9+L9bALW1Z8lxwupZPpnOe1etyu/ZTq6TKz7LsvP50ICUMDwWRjO0N2zZcAzN RX2WFKyTN6Nv7JGTGrIMN+YKxETWWmRwVUWtoaZZsDy+ELwPkBgnc//G8s5O7rosUro7 ZboqtbJk695N9R+W9qDsutamUbeulUipHsGkG2nAJaERvuQssOPVTv2Yn8I+0pK976hX It6Q== 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 hs28si274975ejc.141.2021.02.09.17.20.53; Tue, 09 Feb 2021 17:21:16 -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 S235073AbhBJBSE (ORCPT + 99 others); Tue, 9 Feb 2021 20:18:04 -0500 Received: from mailoutvs45.siol.net ([185.57.226.236]:43472 "EHLO mail.siol.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234338AbhBIWpm (ORCPT ); Tue, 9 Feb 2021 17:45:42 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTP id 2AAB0523182; Tue, 9 Feb 2021 18:59:09 +0100 (CET) X-Virus-Scanned: amavisd-new at psrvmta12.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta12.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iCj0Jj0GTsju; Tue, 9 Feb 2021 18:59:08 +0100 (CET) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Zimbra) with ESMTPS id D8FAA522FAE; Tue, 9 Feb 2021 18:59:08 +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 (Zimbra) with ESMTPSA id A5EF85233C8; Tue, 9 Feb 2021 18:59:05 +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 v3 1/5] clk: sunxi-ng: mp: fix parent rate change flag check Date: Tue, 9 Feb 2021 18:58:56 +0100 Message-Id: <20210209175900.7092-2-jernej.skrabec@siol.net> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210209175900.7092-1-jernej.skrabec@siol.net> References: <20210209175900.7092-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") Reviewed-by: Chen-Yu Tsai 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..9d3a76604d94 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_can_set_rate_parent(&cmp->common.hw)) { ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p); rate =3D *parent_rate / p / m; } else { --=20 2.30.0