Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EA38C433EF for ; Thu, 10 Feb 2022 10:52:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240133AbiBJKwM convert rfc822-to-8bit (ORCPT ); Thu, 10 Feb 2022 05:52:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240086AbiBJKwL (ORCPT ); Thu, 10 Feb 2022 05:52:11 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E282E122; Thu, 10 Feb 2022 02:52:12 -0800 (PST) Date: Thu, 10 Feb 2022 10:52:01 +0000 From: Paul Cercueil Subject: Re: [PATCH] clk: ingenic-tcu: Fix missing TCU clock for X1000 SoC To: Aidan MacDonald Cc: robh+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <20220209230145.18943-1-aidanmacdonald.0x0@gmail.com> References: <20220209230145.18943-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Aidan, Le mer., févr. 9 2022 at 23:01:47 +0000, Aidan MacDonald a écrit : > The X1000 does have a TCU clock gate, so pass it to the driver. > Without this the TCU can be gated automatically, which prevents > timers from running and stops register writes from taking effect. > > Signed-off-by: Aidan MacDonald > --- > arch/mips/boot/dts/ingenic/x1000.dtsi | 5 +++-- > drivers/clk/ingenic/tcu.c | 2 +- The Device Tree changes should be split into their own patch. Cheers, -Paul > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/mips/boot/dts/ingenic/x1000.dtsi > b/arch/mips/boot/dts/ingenic/x1000.dtsi > index 8bd27edef216..c69df8eb158e 100644 > --- a/arch/mips/boot/dts/ingenic/x1000.dtsi > +++ b/arch/mips/boot/dts/ingenic/x1000.dtsi > @@ -111,8 +111,9 @@ tcu: timer@10002000 { > > clocks = <&cgu X1000_CLK_RTCLK>, > <&cgu X1000_CLK_EXCLK>, > - <&cgu X1000_CLK_PCLK>; > - clock-names = "rtc", "ext", "pclk"; > + <&cgu X1000_CLK_PCLK>, > + <&cgu X1000_CLK_TCU>; > + clock-names = "rtc", "ext", "pclk", "tcu"; > > interrupt-controller; > #interrupt-cells = <1>; > diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c > index 77acfbeb4830..9c86043f673a 100644 > --- a/drivers/clk/ingenic/tcu.c > +++ b/drivers/clk/ingenic/tcu.c > @@ -320,7 +320,7 @@ static const struct ingenic_soc_info > jz4770_soc_info = { > static const struct ingenic_soc_info x1000_soc_info = { > .num_channels = 8, > .has_ost = false, /* X1000 has OST, but it not belong TCU */ > - .has_tcu_clk = false, > + .has_tcu_clk = true, > }; > > static const struct of_device_id __maybe_unused > ingenic_tcu_of_match[] __initconst = { > -- > 2.34.1 >