Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1910060pxv; Fri, 2 Jul 2021 15:54:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVcbTKB6n7pN9d01MTqNa77/0zACk09/wBBAryB6xcH6QXa5mlBQwofxFi19Bxv8lMZxHG X-Received: by 2002:a92:6412:: with SMTP id y18mr1610559ilb.158.1625266488728; Fri, 02 Jul 2021 15:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625266488; cv=none; d=google.com; s=arc-20160816; b=obpenIJ427Vg30fscVakcnbBHyi1i/wRrKBSrpZZvlFa/ko4Vnck9PAG4Tz2AHb1Pn 2iiXElc1f1VZAH73zQfdlgk+dLgaMsAhlrsC2oQlfCbks0XH9DuSuYJPOqQQ06wJVeDN qrmVVlkxLw8a0Ux943OviZ3viyVGCDmUP6hjIU6n0pRYkiJv/fM6WEmUWznSrEyoUQd+ Cs8zXeayA3G6XZq9NBsK2uPa8gg0zfHUU165N7s56IjrR2SYfX2gmdyPYlvKmSghT4f7 GHwu2J9lBCkNgJbF4jmoEsXeOflNr+nOw47dfFSVE0pKFf2A/PGGdetlM0CQvNSTo+yy UQTQ== 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 :dkim-signature; bh=741oOKm9Y/CN6pZlsJDyA+wQ24ovzGnQR0XtQiJk4V0=; b=koHhXA5p2NHEhcANphKWCS4vSn4fyO8BL9+Eny5vakJTUl33ZUFCxSEAWzSJ+CYczE 0UYl78jXrQgp5dBbce04+Xz03/E9dbIJ5f1rk+cSqwsmb6QSE7K0VILSHQX7WKr58rSm +Oz6fKc8XtxTI82vCqmNLJUIvu5cFeMjNlZTZGm3Ux+R8+uEea4OBBXbG/nVvSjdxjcA 5k9RFZhS5k+B6kznM6VY9fIjDndyfIObUZYfKLqrBrlpHZQMR044omUFetXcwqQkDeVc rDYJOzDL5Ic+M+bPquVqcOia1rfqd7SugM03hJ6gD0pDYxaPItp5hVeGh+KkYMvwWSaG ewsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=cvI1oGQd; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si4908490ilt.87.2021.07.02.15.54.37; Fri, 02 Jul 2021 15:54:48 -0700 (PDT) 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=@googlemail.com header.s=20161025 header.b=cvI1oGQd; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233266AbhGBWyp (ORCPT + 99 others); Fri, 2 Jul 2021 18:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbhGBWyj (ORCPT ); Fri, 2 Jul 2021 18:54:39 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7A5C0613DE; Fri, 2 Jul 2021 15:52:04 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id i5so15299541eds.1; Fri, 02 Jul 2021 15:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=741oOKm9Y/CN6pZlsJDyA+wQ24ovzGnQR0XtQiJk4V0=; b=cvI1oGQdong/J6jo2Uvf7v7DwJpDQsEHB76D+A5tSKdsRTiJif1apV6Sc6OKruoHcU O1/6bF7h9IxRqm62vZco6/cmJpD/7zNoo+570lV7tmFWpN3KK59H61v7GPJ1NwYmNRxc B4DyHUGOv33SNJn9E9Uaw9b1cpVyfMNcIfm7b5VpM0i0hH3DWHNzgWtPJyXHd93SUuKY zACpIEWgQHAPFuJEHII5AefZ3zJcEFSKYpRj095dYUNZ25Zx0pSIJf7k7/WW+t5JB0Nv NvUCL5BLafsHKspqJ+DSaHkHCDQA5p9qfT7K7IPiGwsdudWC3ueuvUWGQMiFtV8raqAy LUlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=741oOKm9Y/CN6pZlsJDyA+wQ24ovzGnQR0XtQiJk4V0=; b=j+Rg0wYXTJHzUNiiitCUg9pvyciClgepxJKpPDPFeXffsl+1WwnM5MPT0zIDuMxiQh 7uJdXrMCW2/EnQkCIq31Va6TUfbEg3x2e6CPZkF3DEiZkINc7GCyKHEfbAUV9YhzWfqB 4uYuUN6rFFANORu1RQSmXk/oHDEKXk6dPsVUg2rBY+l39mFYvCM3/P09UvtCTKE69r47 5sRnagVCQiytiNG6ymMVAZrtXIaEWsvloSeIZNkvqDPwsg5E8DokXfbECJiS9YHsKdz+ ZpJctV26tCeEtysParQXJxwG9R4Nw/3eq569TQJDaSE9/6GrYcxpNFQQLy84kFfOP6Sv Nc8A== X-Gm-Message-State: AOAM5318fG79fTeGJ3kMlcaTjmS+qv8E1gs8hRFF4s6NxesiJeZoWMKX 9WNyePGq2oV0BmRPuahpCilJiHQnEfM= X-Received: by 2002:a05:6402:214:: with SMTP id t20mr2212183edv.20.1625266323359; Fri, 02 Jul 2021 15:52:03 -0700 (PDT) Received: from localhost.localdomain (dynamic-095-117-063-046.95.117.pool.telefonica.de. [95.117.63.46]) by smtp.googlemail.com with ESMTPSA id r17sm1866964edt.33.2021.07.02.15.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 15:52:03 -0700 (PDT) From: Martin Blumenstingl To: linux-clk@vger.kernel.org, sboyd@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , Maxime Coquelin , Alexandre Torgue , linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH v1 6/6] clk: stm32mp1: Switch to clk_divider.determine_rate Date: Sat, 3 Jul 2021 00:51:45 +0200 Message-Id: <20210702225145.2643303-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> References: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org .determine_rate is meant to replace .round_rate in CCF in the future. Switch over to .determine_rate now that clk_divider_ops has gained support for that. Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Martin Blumenstingl --- drivers/clk/clk-stm32mp1.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index 256575bd29b9..4bd1fe7d8af4 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -1076,14 +1076,10 @@ static int clk_divider_rtc_set_rate(struct clk_hw *hw, unsigned long rate, static int clk_divider_rtc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { - unsigned long best_parent_rate = req->best_parent_rate; + if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC)) + return clk_divider_ops.determine_rate(hw, req); - if (req->best_parent_hw == clk_hw_get_parent_by_index(hw, HSE_RTC)) { - req->rate = clk_divider_ops.round_rate(hw, req->rate, &best_parent_rate); - req->best_parent_rate = best_parent_rate; - } else { - req->rate = best_parent_rate; - } + req->rate = req->best_parent_rate; return 0; } -- 2.32.0