Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9087893pxu; Mon, 28 Dec 2020 06:20:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7ZgvwFe+qrfkvKwABlOE4uM0geKZKIHLe/4DZ3LYApwX1S0o0I517MgGLyXx4iiLiGaOY X-Received: by 2002:a17:906:351a:: with SMTP id r26mr40267744eja.409.1609165212892; Mon, 28 Dec 2020 06:20:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609165212; cv=none; d=google.com; s=arc-20160816; b=t2XoxgWXDw8tRyjIW/5xWSiZP28A1NVIKX2v5kk8iAGsOYsVG5yrCNvfdbD7hMIqWm FGb+ndaQHCek6XIOBsv5mYpLt4Jm86MYGT2R2vr2+zquTYJBLS/9a65KwtxJ7Gi9N07/ ZqdCxL8+CC4uAr3ZNgFoYdMd7NfUP1Mg/BC3zCBFWkfDcHpkQH7bJUY+W2b0c9LRMNoX 1IxFar57ZomgO4/ZSYF6wZ0mEu4GWq8npN3Rv02C2zaCkijXLv7rUoGWKLmVmIPvtah+ 7lIIfeAdtJhkDRjkH/4ouRspmLBZLkfvX582Kla2ko4rFWCiCR8Z5oU2rJsfJZMbhgyb 3bOQ== 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=CVw+T0ZA9cUr3+wpNBUqCgRWMkg8kNJq/TVoUu2EUoE=; b=PV2ydcEwaVsmdfshptvOmuJxmYtkbuBGXU5eK98VbSReEa+/mgvNNJ1PXt3a3D4PGl HwTqdKmJ9cn5wNwogCUoR5bw79AynQn0PjAzLp08cCk+Uaf/qDEeJBFI94Wto42K7UEk 1OvQokRfZ90XzvilwEYHHMSlzEp9xXPd7a9xloYhzWsG4WnI1mdYXBF4FK9ebvM2eLYA 8+fp1v4dvF8UTe7h/6xKvwL6Y6hZG9TI3VK5y1mn+KSgsF6PfpaHkvsNubBylNQI2l0m voOuKpsFq6n4GCkd8ykCFN+0cYYDb1cx/SjAVH3r6cyXOtFV9A9b7dGpuaSDovI6yksb ySwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1oeSpJAt; 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 g24si18779933ejh.77.2020.12.28.06.19.49; Mon, 28 Dec 2020 06:20:12 -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=1oeSpJAt; 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 S2501910AbgL1OSD (ORCPT + 99 others); Mon, 28 Dec 2020 09:18:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:53122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2501901AbgL1OSC (ORCPT ); Mon, 28 Dec 2020 09:18:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2163B22583; Mon, 28 Dec 2020 14:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165041; bh=R2kS0c/cPf48Einw0w4fo7O3z6wO6Wh2MOgQXaZBF/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1oeSpJAtr6BJCPDgfZdzqwd/xLOa6Tn/CAIW6mE2OkSNNfpURV18tlH4O1c+5AQlP DNKcXylGNr8LazAB++dX//1CLQjMH8c2VcTXYm0lo7rHpv3+qpNpRaGltm4Xsic/me QitgehlYKv6gw73XVLI5glw53YSebgv+S1A81qAA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Yoshihiro Shimoda , Sasha Levin Subject: [PATCH 5.10 390/717] clk: renesas: r8a779a0: Fix R and OSC clocks Date: Mon, 28 Dec 2020 13:46:28 +0100 Message-Id: <20201228125039.690625700@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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: Geert Uytterhoeven [ Upstream commit 14653942de7f63e21ece32e3901f09a248598a43 ] The R-Car V3U clock driver defines the R and OSC clocks using R-Car Gen3 clock types. However, The R-Car V3U clock driver does not use the R-Car Gen3 clock driver core, hence registering the R and OSC clocks fails: renesas-cpg-mssr e6150000.clock-controller: Failed to register core clock osc: -22 renesas-cpg-mssr e6150000.clock-controller: Failed to register core clock r: -22 Fix this by introducing clock definition macros specific to R-Car V3U. Note that rcar_r8a779a0_cpg_clk_register() already handled the related clock types. Drop the now unneeded include of rcar-gen3-cpg.h. Fixes: 17bcc8035d2d19fc ("clk: renesas: cpg-mssr: Add support for R-Car V3U") Signed-off-by: Geert Uytterhoeven Tested-by: Yoshihiro Shimoda Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20201109152614.2465483-1-geert+renesas@glider.be Signed-off-by: Sasha Levin --- drivers/clk/renesas/r8a779a0-cpg-mssr.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/clk/renesas/r8a779a0-cpg-mssr.c b/drivers/clk/renesas/r8a779a0-cpg-mssr.c index 17ebbac7ddfb4..046d79416b7d0 100644 --- a/drivers/clk/renesas/r8a779a0-cpg-mssr.c +++ b/drivers/clk/renesas/r8a779a0-cpg-mssr.c @@ -26,7 +26,6 @@ #include #include "renesas-cpg-mssr.h" -#include "rcar-gen3-cpg.h" enum rcar_r8a779a0_clk_types { CLK_TYPE_R8A779A0_MAIN = CLK_TYPE_CUSTOM, @@ -84,6 +83,14 @@ enum clk_ids { DEF_BASE(_name, _id, CLK_TYPE_R8A779A0_PLL2X_3X, CLK_MAIN, \ .offset = _offset) +#define DEF_MDSEL(_name, _id, _md, _parent0, _div0, _parent1, _div1) \ + DEF_BASE(_name, _id, CLK_TYPE_R8A779A0_MDSEL, \ + (_parent0) << 16 | (_parent1), \ + .div = (_div0) << 16 | (_div1), .offset = _md) + +#define DEF_OSC(_name, _id, _parent, _div) \ + DEF_BASE(_name, _id, CLK_TYPE_R8A779A0_OSC, _parent, .div = _div) + static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = { /* External Clock Inputs */ DEF_INPUT("extal", CLK_EXTAL), @@ -136,8 +143,8 @@ static const struct cpg_core_clk r8a779a0_core_clks[] __initconst = { DEF_DIV6P1("canfd", R8A779A0_CLK_CANFD, CLK_PLL5_DIV4, 0x878), DEF_DIV6P1("csi0", R8A779A0_CLK_CSI0, CLK_PLL5_DIV4, 0x880), - DEF_GEN3_OSC("osc", R8A779A0_CLK_OSC, CLK_EXTAL, 8), - DEF_GEN3_MDSEL("r", R8A779A0_CLK_R, 29, CLK_EXTALR, 1, CLK_OCO, 1), + DEF_OSC("osc", R8A779A0_CLK_OSC, CLK_EXTAL, 8), + DEF_MDSEL("r", R8A779A0_CLK_R, 29, CLK_EXTALR, 1, CLK_OCO, 1), }; static const struct mssr_mod_clk r8a779a0_mod_clks[] __initconst = { -- 2.27.0