Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1801402iob; Fri, 29 Apr 2022 13:14:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH4AY4kqzoTcmCmPWAwBChxIzr7uhVCwed3kU28fjtDIm6/ibaEXpmNfIqidGZwb2PsGlM X-Received: by 2002:a2e:9817:0:b0:24f:ad4:e912 with SMTP id a23-20020a2e9817000000b0024f0ad4e912mr567429ljj.178.1651263241237; Fri, 29 Apr 2022 13:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651263241; cv=none; d=google.com; s=arc-20160816; b=JGjjFHj6Dkh/hXl+HjeCoBLFlfQ/soba9zjY3e0OmMUotUrxElHLd7uge32G2xl7Gs KbmZQQr1giXj7uROrMdGpsiPVbNCTsZSCgumaBlbMKevwquCp75NPj6p5IdkoHEm/rrl Ec7HyBTJ46M04ISJzdJwQI8nTKfTdme9OeDG6zaWN/4GVQIXm/bVg5xeuwlzz4Xse/ee GmCIQ6I311et0X6gbXLEvOC3VA27gCwzzFomefVTq2A/PC1svcZh4Bu6XLQz9fJH31/a DpZqhSNO5T0F/lcmG5nP/5pYjYJJboLg9yMp+/yKOdQMmxlq6HPAeBz2oosqBLZiz2Hr Pr9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RFpsCxI3zSHasLwFu46y6lFGQAu2MyZjQg8vzZvqxI0=; b=h36ge4ZB26DpqBUdOCGVyEsYbnLJzr6AbMZdMgGleooPfI/5oN2ncMdecNE12z/ujx u65urIwBae4ZIJ9B0PAbTeYdmCcfD9hG5tUULl9wdDYv1rzK1Lqg9N+MCBqn9HDHIbxE F6FykH+5HWl/eHER+LVNy1b3GU0Ir1VjTTcVkEv6dcUSRE0/APkMMg3qzLD+qbzitnaY 80IKK4+7nQtulVp2VHzNbLJm9GkeKhyGfbfV2Jg3YekaljFqvkmWYkbYYIiO/qFgJZbB K5vMXib8I6Y/PAvrfb7zNES8mfYpZ7vdbLnlpyoNwkKJY6gblfuVfdaS3Js0pPDAYJlZ 09dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=EVZb7nTx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n19-20020a2ebd13000000b0024b24105708si9007728ljq.492.2022.04.29.13.13.33; Fri, 29 Apr 2022 13:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=EVZb7nTx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237616AbiD1KML (ORCPT + 99 others); Thu, 28 Apr 2022 06:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234396AbiD1KLo (ORCPT ); Thu, 28 Apr 2022 06:11:44 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35B4E2CC8E; Thu, 28 Apr 2022 03:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1651140147; bh=5RkR0AnFX7vQTXrSZOyaEfFUYVNtE06t7X96bNHnpAk=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=EVZb7nTx/v4hqEQf/0UL39mQpzEJu4VuF3dvdrAbo9fT0Iy7igpqwmPyfEMJBQtY+ Pn2PmbzUQek4kJ1q1UIKaX7rOPl7Nf+Z9+fZ7S5dVF162uhqw3qb51QsEG+6vdrbcR mhe7sT9dEFYcunjyIuD3Du0g/9QZgJK5vWxpSLEo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.103]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MZTqW-1nOTRM3hrC-00WUrz; Thu, 28 Apr 2022 12:02:26 +0200 Date: Thu, 28 Apr 2022 12:02:24 +0200 From: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= To: Zev Weiss Cc: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= , "linux-clk@vger.kernel.org" , "openbmc@lists.ozlabs.org" , "devicetree@vger.kernel.org" , Wim Van Sebroeck , "linux-watchdog@vger.kernel.org" , Stephen Boyd , Patrick Venture , Michael Turquette , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Avi Fishman , Rob Herring , Benjamin Fair , Philipp Zabel , Krzysztof Kozlowski , Tali Perry , Thomas Gleixner , Guenter Roeck , Tomer Maimon Subject: Re: [PATCH 2/7] clocksource: timer-npcm7xx: Enable timer 1 clock before use Message-ID: References: <20220422183012.444674-1-j.neuschaefer@gmx.net> <20220422183012.444674-3-j.neuschaefer@gmx.net> <20220428091158.GD11809@packtop> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yOapqzkiMt8+dk0+" Content-Disposition: inline In-Reply-To: <20220428091158.GD11809@packtop> X-Provags-ID: V03:K1:z2GOvnE2pOoTKqPS2YNCdWH3PNgLZoY46dfHyKNgxU1cCV0GDMV C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wsq7eOWqkBdoCtl71cf PmUjzBsd7Biv33otqAby6iBMcSagwzXRKkat4/SDggUsVTbB2j6CM8AGH263eL15nFSXjuLdK Qrm32UaVAEYWCUxxY2hQnRutwHuYpvl5gCn65xUAmw3wX7JsNdEk02CsFWSKJ3zVEDIg2pSlj 1wEn2oH1yI6FqC7f+fn0la/L81NfleUMxBBcscy6H2UGlh57PD2dm7zmQ7rt/a0GA/1M0avLy oo+FpSSyPXgUvQ= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yOapqzkiMt8+dk0+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 28, 2022 at 09:11:58AM +0000, Zev Weiss wrote: > On Fri, Apr 22, 2022 at 11:30:07AM PDT, Jonathan Neusch=C3=A4fer wrote: > >In the WPCM450 SoC, the clocks for each timer can be gated individually. > >To prevent the timer 1 clock from being gated, enable it explicitly. > > > >Signed-off-by: Jonathan Neusch=C3=A4fer > >--- > > drivers/clocksource/timer-npcm7xx.c | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/t= imer-npcm7xx.c > >index a00520cbb660a..974269b6b0c36 100644 > >--- a/drivers/clocksource/timer-npcm7xx.c > >+++ b/drivers/clocksource/timer-npcm7xx.c > >@@ -188,17 +188,29 @@ static void __init npcm7xx_clocksource_init(void) > > > > static int __init npcm7xx_timer_init(struct device_node *np) > > { > >+ struct clk *clk; > > int ret; > > > > ret =3D timer_of_init(np, &npcm7xx_to); > >- if (ret) > >+ if (ret) { > >+ pr_warn("timer_of_init failed: %d\n", ret); >=20 > This seems like a somewhat opaque message to emit, especially given this > file's lack of a pr_fmt() definition -- maybe add a %pOF so it's > slightly easier to trace back to the device it stems from? Now that I look at this code again, I think I should just drop the pr_warn entirely, since I didn't mention it in the description, and it's unrelated to enabling the clock. > > return ret; > >+ } > > > > /* Clock input is divided by PRESCALE + 1 before it is fed */ > > /* to the counter */ > > npcm7xx_to.of_clk.rate =3D npcm7xx_to.of_clk.rate / > > (NPCM7XX_Tx_MIN_PRESCALE + 1); > > > >+ /* Enable the clock for timer1, if it exists */ > >+ clk =3D of_clk_get(np, 1); > >+ if (clk) { > >+ if (!IS_ERR(clk)) > >+ clk_prepare_enable(clk); > >+ else > >+ pr_warn("Failed to get clock for timer1: %pe", clk); >=20 > Likewise here (though to a slightly lesser extent). I'll add %pOF here. Thanks, Jonathan --yOapqzkiMt8+dk0+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEvHAHGBBjQPVy+qvDCDBEmo7zX9sFAmJqZg4ACgkQCDBEmo7z X9v7UA//XinB73NhiIWuAgNkGTSfPjaFxOvIHuRuFLsnTcJHlorK0w1BmfZHecD+ ZdHnpqPtkXz3gnReMqx8qJcO/0lHmJTkgvddzHqEu4wcWFROMTNs8Tbrd7TUvaxx 9jmxWWOE5f9P5EXHCLUlo0c03r6Iq8R7BlMUVSh0wZz6RtPujFoHjw6A8uhE9tbt ZzoD4XhdNl4BkUpC/NUNIHSxbb/VYZYy7GxqP4N9yQ0QSYGIJm7ESR3RRGhMFoEO BZziQtQiH/zJSj71FbG3q8vnXJF4mVozFqnTk4UHngq5nJrM7ZFmE6tVRBf5EPzY aaBOk7Y7gcYdPDFMHszp+TtlxcGk7IuTs3I4lVA1JjCX7YPBfxA6AVt6Haf15YkL TmosKy8EOB+QqfwKLwddQafB9FXSkRSWr0fn3WboeAolBa+omi+5NMVfq4X1kbHL FNO1MlBA0IdDIuMwgRAm5aVTFiIuDoyYIm7qytMFvve4nSlLS3sL3F7qzT783Dvm jbSSOUGrQa4XrQoO/N0HRiYj6FkZGE00Deg7e2qY6mqVi7PT9AIzWakASES0LqSd kRiHXIqXlsjp65wuJ6xL/hj0PUg9ziUTurX31k1BXomattaHbz5ZSq+bGBD9vuvI muA9b/srdaA7jEkkLs6AqWGSsFl8CXAEwI1Rh5VRZ+MStwIBicg= =8ywP -----END PGP SIGNATURE----- --yOapqzkiMt8+dk0+--