From: Stephen Boyd <sboyd@kernel.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
James Hogan <jhogan@kernel.org>,
Jason Cooper <jason@lakedaemon.net>,
Jonathan Corbet <corbet@lwn.net>,
Lee Jones <lee.jones@linaro.org>,
Marc Zyngier <marc.zyngier@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Michael Turquette <mturquette@baylibre.com>,
Paul Burton <paul.burton@mips.com>,
Ralf Baechle <ralf@linux-mips.org>,
Rob Herring <robh+dt@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Mathieu Malaterre <malat@debian.org>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-mips@vger.kernel.org, linux-doc@vger.kernel.org,
linux-clk@vger.kernel.org, od@zcrc.me
Subject: Re: [PATCH v12 05/13] clk: ingenic: Add driver for the TCU clocks
Date: Fri, 07 Jun 2019 15:50:37 -0700 [thread overview]
Message-ID: <20190607225038.02A5D20868@mail.kernel.org> (raw)
In-Reply-To: <1559944794.11351.0@crapouillou.net>
Quoting Paul Cercueil (2019-06-07 14:59:54)
> Hi Stephen, thanks for the review.
> > Quoting Paul Cercueil (2019-05-21 07:51:33)
> >> diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c
> >> new file mode 100644
> >> index 000000000000..7249225a6994
> >> --- /dev/null
> >> +++ b/drivers/clk/ingenic/tcu.c
> >> @@ -0,0 +1,458 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * JZ47xx SoCs TCU clocks driver
> >> + * Copyright (C) 2019 Paul Cercueil <paul@crapouillou.net>
> >> + */
> >> +
> >> +#include <linux/clk.h>
> >> +#include <linux/clk-provider.h>
> >> +#include <linux/clkdev.h>
> >> +#include <linux/clockchips.h>
> >> +#include <linux/mfd/ingenic-tcu.h>
> >> +#include <linux/regmap.h>
> >> +
> >> +#include <dt-bindings/clock/ingenic,tcu.h>
> >> +
> >> +/* 8 channels max + watchdog + OST */
> >> +#define TCU_CLK_COUNT 10
> >> +
> >> +#define TCU_ERR(...) pr_crit("ingenic-tcu-clk: " __VA_ARGS__)
> >
> > Why is it pr_crit instead of pr_err()?
>
> If the TCU timer clocks are not provided for any reason, the system
> will have no timer, and the kernel will hang very early in the init
> process. That's why I chose pr_crit().
HMm. So maybe it should be TCU_CRIT() then? Or just drop the wrapper
macro and define a pr_fmt for this file that has ingenic-tcu-clk: for
it?
>
> Most of the code here works without a struct device, it wouldn't be
> easy to
> get it to work with runtime PM.
>
> I can enable the "tcu" clock in the probe and just gate/ungate it in the
> suspend/resume callbacks, that would work just fine. We don't need
> anything
> fancy here.
OK. That sounds like a better approach to gate and ungate in
suspend/resume.
next prev parent reply other threads:[~2019-06-07 22:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 14:51 Ingenic Timer/Counter Unit (TCU) patchset v12 Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 01/13] dt-bindings: ingenic: Add DT bindings for TCU clocks Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 02/13] doc: Add doc for the Ingenic TCU hardware Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 03/13] dt-bindings: Add doc for the Ingenic TCU drivers Paul Cercueil
2019-05-24 20:21 ` Rob Herring
2019-05-25 19:13 ` Paul Cercueil
2019-06-11 14:57 ` Rob Herring
2019-05-21 14:51 ` [PATCH v12 04/13] mfd: Add Ingenic TCU driver Paul Cercueil
2019-06-22 12:21 ` Paul Cercueil
2019-06-26 13:18 ` Lee Jones
2019-06-26 13:55 ` Paul Cercueil
2019-06-27 6:58 ` Lee Jones
2019-06-27 8:49 ` Paul Cercueil
2019-06-27 9:01 ` Lee Jones
2019-06-27 9:19 ` Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 05/13] clk: ingenic: Add driver for the TCU clocks Paul Cercueil
2019-06-07 21:28 ` Stephen Boyd
2019-06-07 21:59 ` Paul Cercueil
2019-06-07 22:50 ` Stephen Boyd [this message]
2019-05-21 14:51 ` [PATCH v12 06/13] irqchip: Add irq-ingenic-tcu driver Paul Cercueil
2019-06-22 12:22 ` Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 07/13] clocksource: Add a new timer-ingenic driver Paul Cercueil
2019-06-22 12:23 ` Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 08/13] clk: jz4740: Add TCU clock Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 09/13] MIPS: jz4740: Add DTS nodes for the TCU drivers Paul Cercueil
2019-05-22 9:21 ` Mathieu Malaterre
2019-05-22 11:15 ` Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 10/13] MIPS: qi_lb60: Reduce system timer and clocksource to 750 kHz Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 11/13] MIPS: CI20: Reduce system timer and clocksource to 3 MHz Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 12/13] MIPS: GCW0: Reduce system timer and clocksource to 750 kHz Paul Cercueil
2019-05-21 14:51 ` [PATCH v12 13/13] MIPS: jz4740: Drop obsolete code Paul Cercueil
2019-05-27 11:39 ` Ingenic Timer/Counter Unit (TCU) patchset v12 Mathieu Malaterre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190607225038.02A5D20868@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=corbet@lwn.net \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=jason@lakedaemon.net \
--cc=jhogan@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=malat@debian.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=od@zcrc.me \
--cc=paul.burton@mips.com \
--cc=paul@crapouillou.net \
--cc=ralf@linux-mips.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).