Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp7768068pxu; Sat, 26 Dec 2020 04:21:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwU9bFJn3KFVjrFurmGINb2qMNT0aRsu7fwAuy55fSiy2fdqNWBXV8AB/DbVku00OJb83yC X-Received: by 2002:a17:906:edb2:: with SMTP id sa18mr33206962ejb.264.1608985265291; Sat, 26 Dec 2020 04:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608985265; cv=none; d=google.com; s=arc-20160816; b=jLRCY2JGprsifCX0izV2KCAN1InS8A4O8kv7PdutcmQn9WuiDfIV138vzooAraAxQB aUm6TY6qGTS2ZFP8V6NedZc0T+g3AFCNtV6D5wsr61wV2p9qaIS8OVl2lTgHe56SkS89 pFtqO1xB/RwXt3LtI4al0l8QAUAFFcZ6xXChUqw+ARkRtQ2SgLDFwOXbc5Q5Klo1s4nN a3QN7amLVYzggO5kUlosCtCjzb5P+n4VdYhyYUHeoWdpVIPaA5evnvWm8PqI2R5a+wyv QKVfLbLNW5dxkkgbXc0JGXB+zI5AfUHhrZzNRJbCNyJFbzPrvVhFJphsFnSmbDYRLC+/ Zfkg== 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=jgtk+KcYyeTyKMF2wBck7uk+kOOkd8Plk6T6cyUk1SU=; b=GydyF+/7OswZu29EztUNZtQ26mjqDduZ7b+NYHqdf/uI75OINk+DowSe9s3Ej9cZrE Qvow7F4NhHHs0ZJmur4Jn2ZKyson1YUlwAQb94bs6XWLiprzUY9n9BjleTVHXF/KcV/H 5IefiUC4/wyHTH5S6GCTmzPxKhusRVTz5cqr72hfAPvIffBVC3qWc40jEmfheRQwjrrC yvKR7BdAqRW00A//lzB7xZ5rxX0JY+pDv8eZFNVq5Y6UZo+L9weC7Ob0f1Apbyio7+bJ qz4sI3lAP18EKS+K5nzsFhzjwe5ImNM6iJqXR7zJ9HVjp7iJw1XvlczEtgbo0NL2NtU+ ORsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=h0MV1bgX; 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 t18si9111256ejc.249.2020.12.26.04.20.43; Sat, 26 Dec 2020 04:21:05 -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=@googlemail.com header.s=20161025 header.b=h0MV1bgX; 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 S1726204AbgLZMUU (ORCPT + 99 others); Sat, 26 Dec 2020 07:20:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbgLZMUR (ORCPT ); Sat, 26 Dec 2020 07:20:17 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13E26C0613ED; Sat, 26 Dec 2020 04:19:37 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id x16so8618949ejj.7; Sat, 26 Dec 2020 04:19:37 -0800 (PST) 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=jgtk+KcYyeTyKMF2wBck7uk+kOOkd8Plk6T6cyUk1SU=; b=h0MV1bgX+w+hpPaEDwSDbkou5jwKH2cZNkqWGQYlliiu2AMHrlF2ho8iDlO9vofXAO aGz2mnJENLqSqhGBCtvqTiuratZ/R9LSU1zSAcRJZvTteBi/lvdxd3AoXz7jmng7fm/R VG7MpdnH17d3SFXK5/oeB8PjLdiZJKL5hHgYuxk1A5RxxEv2K47il3iB5+Ue+f+X/tey agltcayNClMcjHi0IDZTW5xkR9eSesUqcBCMtu2j5XA7QiH2PMH3Qwm1kfHfAZSUd/rw FS0kJajLFOJkpJ3yHuakUICrDiukBLweKzekiB1IOLcnGu1kOvqrtgsnusIQrf3cbhoG j7xQ== 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=jgtk+KcYyeTyKMF2wBck7uk+kOOkd8Plk6T6cyUk1SU=; b=LBABvYJJJlQabWLSpffNuYux/bYcxYsn+fP/Sptn2Ijt5vvpmmGC0k57YeuUuql9JZ 9Y9tvdcgNleccxPT5iQTYtkfUC/LNsV7PzBjrjoe3qxq1f0o3p+qkVAXrL5oxEki4AWC Dp0qpF2xpGWGWagtFiDqVoekUHtD5X/ohJJHFPHo0xNbhtHHF+P8xwOth2ZkUb1PUW35 +/PUf59+wod3NGY9wOGEDICYwVOyMBwx1JNO7U6RHNxOphmglYBuJxFiJUV4ypVspwYa d4wy3O+ojeQTHK8od/CTO41QCoBAxkXbnqv7hgXjKOUyd1HsupzfLLId7WjU9Bz2032L 0+pA== X-Gm-Message-State: AOAM531Q/sisKZ3GgAvSWkGgWv7JUKmo9DuQMbwENTB6nD3Brfcmavt1 BFwm/6zAktF4TuTnZBZHGx0= X-Received: by 2002:a17:906:971a:: with SMTP id k26mr35375666ejx.515.1608985175831; Sat, 26 Dec 2020 04:19:35 -0800 (PST) Received: from localhost.localdomain (p200300f137218200428d5cfffeb99db8.dip0.t-ipconnect.de. [2003:f1:3721:8200:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id j9sm33842662eds.66.2020.12.26.04.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Dec 2020 04:19:35 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, jbrunet@baylibre.com Cc: mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl Subject: [PATCH 3/3] clk: meson: clk-pll: propagate the error from meson_clk_pll_set_rate() Date: Sat, 26 Dec 2020 13:15:56 +0100 Message-Id: <20201226121556.975418-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201226121556.975418-1-martin.blumenstingl@googlemail.com> References: <20201226121556.975418-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 Popagate the error code from meson_clk_pll_set_rate() when the PLL does not lock with the new settings. Fixes: 722825dcd54b2e ("clk: meson: migrate plls clocks to clk_regmap") Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/clk-pll.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c index 5b932976483f..49f27fe53213 100644 --- a/drivers/clk/meson/clk-pll.c +++ b/drivers/clk/meson/clk-pll.c @@ -394,7 +394,8 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, if (!enabled) return 0; - if (meson_clk_pll_enable(hw)) { + ret = meson_clk_pll_enable(hw); + if (ret) { pr_warn("%s: pll did not lock, trying to restore old rate %lu\n", __func__, old_rate); /* @@ -406,7 +407,7 @@ static int meson_clk_pll_set_rate(struct clk_hw *hw, unsigned long rate, meson_clk_pll_set_rate(hw, old_rate, parent_rate); } - return 0; + return ret; } /* -- 2.29.2