From: Stephen Boyd <sboyd@codeaurora.org>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Michael Turquette <mturquette@baylibre.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 04/13] clk: at91: make IRQ optional and register them later
Date: Wed, 20 Jan 2016 14:04:31 -0800 [thread overview]
Message-ID: <20160120220431.GB12841@codeaurora.org> (raw)
In-Reply-To: <20160116134558.716ef7d5@bbrezillon>
On 01/16, Boris Brezillon wrote:
> Actually the PMC is not only exposing clocks. You have a bit in one of
> its registers that is used by a USB driver to enable a BIAS, and
> probably other things that are not directly related to clocks. Hence
> the idea to declare the PMC as an MFD/syscon device (which is in turn
> providing an IRQ chip).
>
> Note that the irq problem we're talking about cannot be addressed by
> simply moving everything into the ->probe() function of the platform
> driver: we need the clock quite early in the boot process (it's
> required for the initial clocksource device), in the other hand you
> can't request threaded irqs when you're so early in the boot process,
> and this becomes a problem when you apply the preempt-RT patch which
> moves all standard irqs to threaded ones.
> So the idea was to use polling instead of the irq event until we are
> able to register threaded irqs, and then switch to an irq-able approach
> once everything is in place (platform devices are probed after the
> thread infrastructure has been setup, which is why we used this trick).
Just one more thought. If we had one platform driver for the
entire PMC could we also have an OF_CLK_DECLARE for it as well?
Then that OF_CLK_DECLARE could run early, register whatever
clocks are essential for the clocksource to work, and defer the
rest of the clock registration to when the device driver probes?
We'd still need some sort of global list of clocks that we
registered early, and this list might need to be per PMC if
there's more than one PMC, but we'd have all the clk_hw pointers
available when the platform driver probed. Oh and we'd need
clk_get() to return PROBE_DEFER too so that consumer drivers
could be deferred until the PMC driver probes.
I suppose this would be making more global variables, which isn't
preferred, so let's worry about this clk_hw vs clk pointer
problem later. We'll have to keep this driver in mind when we're
converting over clk providers to registering clk_hw pointers with
the of clk provider layer.
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-01-20 22:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 17:03 [PATCH v3 00/13] ARM: at91: PMC driver rework Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 01/13] clk: at91: make use of syscon to share PMC registers in several drivers Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 02/13] clk: at91: make use of syscon/regmap internally Alexandre Belloni
2016-01-15 2:10 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 03/13] clk: at91: clk-main: factorize irq handling Alexandre Belloni
2016-01-15 2:08 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 04/13] clk: at91: make IRQ optional and register them later Alexandre Belloni
2016-01-15 2:02 ` Stephen Boyd
2016-01-15 9:39 ` Boris Brezillon
2016-01-16 1:26 ` Stephen Boyd
2016-01-16 12:45 ` Boris Brezillon
2016-01-20 22:04 ` Stephen Boyd [this message]
2016-01-22 15:40 ` Sebastian Andrzej Siewior
2016-01-25 22:28 ` Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 05/13] clk: at91: only disable available IRQs Alexandre Belloni
2016-01-15 2:05 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 06/13] clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe Alexandre Belloni
2016-01-15 2:04 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 07/13] clk: at91: pmc: move pmc structures to C file Alexandre Belloni
2016-01-15 2:04 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 08/13] ARM: at91: pm: simply call at91_pm_init Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 09/13] ARM: at91: pm: find and remap the pmc Alexandre Belloni
2016-01-15 2:04 ` Stephen Boyd
2015-12-04 17:03 ` [PATCH v3 10/13] ARM: at91: pm: move idle functions to pm.c Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 11/13] ARM: at91: remove useless includes and function prototypes Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 12/13] usb: gadget: atmel: access the PMC using regmap Alexandre Belloni
2015-12-04 17:03 ` [PATCH v3 13/13] clk: at91: pmc: drop at91_pmc_base Alexandre Belloni
2016-01-15 2:07 ` Stephen Boyd
2015-12-10 17:06 ` [PATCH v3 00/13] ARM: at91: PMC driver rework Boris Brezillon
2015-12-15 9:22 ` Alexandre Belloni
2016-01-15 2:07 ` Stephen Boyd
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=20160120220431.GB12841@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nicolas.ferre@atmel.com \
--cc=plagnioj@jcrosoft.com \
/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).