From: Stephen Warren <swarren@wwwdotorg.org>
To: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>,
Thierry Reding <thierry.reding@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <rob.herring@calxeda.com>,
Hiroshi Doyu <hdoyu@nvidia.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 2/4] driver core: Allow early registration of devices
Date: Mon, 19 Aug 2013 13:49:18 -0600 [thread overview]
Message-ID: <521276BE.4090208@wwwdotorg.org> (raw)
In-Reply-To: <3558931.NyoikKT8ha@flatron>
On 08/17/2013 04:26 AM, Tomasz Figa wrote:
...
> Please correct me if I'm wrong, but to get to initcalls you need a timer.
> However a timer driver might need interrupts (to tick) and clocks (to get
> the frequency).
>
> At least this is what happens on the platforms I work with. They don't
> need any special early registration method, though. We just special case
> those drivers, as Thierry pointed, so they don't use device based APIs.
>
> However if we consider a more complex setup, let's say that the timer
> driver needs to access some special registers, which are shared with other
> drivers as well (again not a completely exotic case, as I already met this
> when working with timer and PWM drivers for older Samsung platforms and
> had to hack things a bit). One would suggest using regmap here, but it is
> a device based API.
To take this even further, I'm not sure there's a particular reason why
the timer has to have an internal clock source driven from the same chip
clock input as the CPU itself. What if there's a separate clock input,
whose source chip has an enable input, which is connected to a GPIO,
which is driven by an I2C-based GPIO expander? Admittedly that's a
pretty crazy HW design, but I doubt it's much other than an accident
that it doesn't exist in practice, given the probable lack of feedback
cycle from Linux SW internals to all board designers.
It seems like the best solution here is to make the generic case fully
capable. Perhaps initcalls shouldn't depend on a timer at all, or should
be split into sets that require certain services, and those services can
appear dynamically, and when they do, the relevant initcalls that were
held off by lack of a certain feature all get triggered.
next prev parent reply other threads:[~2013-08-19 19:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 20:39 [RFC 0/4] Early device registration Thierry Reding
2013-08-16 20:39 ` [RFC 1/4] driver core: Register SoC bus after platform bus Thierry Reding
2013-08-16 20:39 ` [RFC 2/4] driver core: Allow early registration of devices Thierry Reding
2013-08-16 21:06 ` Greg Kroah-Hartman
2013-08-16 21:55 ` Thierry Reding
2013-08-16 22:08 ` Greg Kroah-Hartman
2013-08-17 11:17 ` Thierry Reding
2013-08-19 19:43 ` Stephen Warren
2013-08-19 20:10 ` Thierry Reding
2013-08-19 20:53 ` Stephen Warren
2013-08-19 21:41 ` Thierry Reding
2013-08-16 22:20 ` Grant Likely
2013-08-16 22:35 ` Greg Kroah-Hartman
2013-08-17 10:26 ` Tomasz Figa
2013-08-19 19:49 ` Stephen Warren [this message]
2013-08-19 20:04 ` Thierry Reding
2013-08-17 11:07 ` Thierry Reding
2013-08-16 20:39 ` [RFC 3/4] ARM: tegra: Call of_platform_populate() early Thierry Reding
2013-08-16 20:39 ` [RFC 4/4] OF: Add device pointer to struct device_node Thierry Reding
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=521276BE.4090208@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdoyu@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=rob.herring@calxeda.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=tomasz.figa@gmail.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