Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5035818pxb; Mon, 15 Feb 2021 07:55:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx52/OwKwFPdndTvkMlMp1VZSwGdnd5I+081bUhQ9Y9yKqEIK47ON2x61EOmlTMjNyZaJ0x X-Received: by 2002:a50:9e01:: with SMTP id z1mr16226521ede.44.1613404536298; Mon, 15 Feb 2021 07:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613404536; cv=none; d=google.com; s=arc-20160816; b=O4vtt626ybGIFa8Z15nbiSCs/Lr+J4RGLnEQRAfSM7BNJaPGjgMTh9kBoTIMNZiICS Fzj3DUXsXM/c0Yd4FJoxoufGZE/ixW/pBlGI78d9dUA4EkGSpxP5TfqBZ41JP9kK6uQn Amiu3B/SNatkrg3s/izmPNi5gCIjTKCNltAZu0p4CITLm6DjFkyqYqGL+ILVLU3RBvxp Luz5reWqIDfsIwmcqgdGeKycXS4I62It6wQ8RPWyPxdiApNljrhzU7fxQJovTOqqc8Ga SYt2Pm7fTKvsKMsq3xbF37FP+207GaL2r89m6C5WQlJrkgm42fFw+w5jY4WBmsswZZ3q SDxA== 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=GE0Bv8OyrUtLJ1wUkplGz7vyLKC/Y9TGEu53SDFQwyCSESk9r+Se4BO5x2YhzGLVUm zxcTC5NFzX9mq+niil41npnDFVKicIQ6WYHwHZjPgldXeLps7AqMvWAlqQFc2b2kBUkq 4w+5SOSE0DQR8CUfm+/HmIzeAbmO+eu0cITR77GKjKrWl+BT9jPRFlOUont2dcTLj+Q5 ffYD7Uk3Ksf/90YNDb/bhB02QFiXo9SaOnviaQfOaxElMSk6YkA3TcPGhde7SSoeG2CJ kzAmeO7qgG4/PVe595fJVAddwFixjpThF3b0Klu7Eq0pquVKoEs+0jOkYDZV4G78g0F3 UslQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MWQHZZDO; 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 dv7si2984288ejb.161.2021.02.15.07.55.12; Mon, 15 Feb 2021 07:55:36 -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=MWQHZZDO; 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 S232223AbhBOPwy (ORCPT + 99 others); Mon, 15 Feb 2021 10:52:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:45434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbhBOPbs (ORCPT ); Mon, 15 Feb 2021 10:31:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9FE4C64E9E; Mon, 15 Feb 2021 15:29:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613402988; bh=bhDqEH9zOJRCMqDkygcw2XwdvM5ZzSlCwdfVnG58tRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MWQHZZDOLDAZAc7T1ieF8awFAl4j1BVsY+LTVBq8h9435oWTAfPOj3/mA20m0XHSk ZE3txc0va1ATRfdyrAi4gKEIazjPqFbglUUUORtqgPJt3NDyUxzHhu9t4jMDBwLdkU nyKzsUTD1AgVicQIHrW4uAm+Jkhy0xv0i9jJNufY= 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.4 44/60] clk: sunxi-ng: mp: fix parent rate change flag check Date: Mon, 15 Feb 2021 16:27:32 +0100 Message-Id: <20210215152716.779645484@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152715.401453874@linuxfoundation.org> References: <20210215152715.401453874@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