devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Sekhar Nori <nsekhar@ti.com>
Cc: David Lechner <david@lechnology.com>,
	Rich Felker <dalias@libc.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Kevin Hilman <khilman@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Frank Rowand <frowand.list@gmail.com>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Arend van Spriel <aspriel@gmail.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Michal Suchanek <msuchanek@suse.de>,
	Jan Kiszka <jan.kiszka@siemens.com>Andy Shevchenko <an>
Subject: Re: [PATCH RFC PoC 0/2] platform: different approach to early platform drivers
Date: Fri, 27 Apr 2018 10:55:50 +0200	[thread overview]
Message-ID: <CAK8P3a394ig-OSzZLj+50gnBw1x_c41EicuM7mF_ubswweQoSg@mail.gmail.com> (raw)
In-Reply-To: <6194511c-b649-8c02-7db0-3514bfb292f5@ti.com>

On Fri, Apr 27, 2018 at 10:29 AM, Sekhar Nori <nsekhar@ti.com> wrote:
> On Friday 27 April 2018 01:22 PM, Arnd Bergmann wrote:
>> On Fri, Apr 27, 2018 at 4:28 AM, David Lechner <david@lechnology.com> wrote:
>>> On 04/26/2018 12:31 PM, Rich Felker wrote:

>>
>> I haven't seen the discussion about your clock drivers, but I know that
>> usually only a very small subset of the clocks on an SoC are needed
>> that 'early', and you should use a regular platform driver for the rest.
>
> Its true that the subset is small, but they are either PLL bypass clocks
> or clocks derived out of the main clock gate controller on the Soc
> (DaVinci PSC). So we need some non-platform-device based initialization
> support in the two main clock drivers used on mach-davinci anyway.
>
>> Can you elaborate on which devices need to access your clocks before
>> you are able to initialize the clk driver through the regular platform_driver
>> framework? Do any of these need complex interactions with the clk
>> subsystem, or do you just need to ensure they are turned on?
>
> Its just the timer IP. There is no complex interaction, just need to
> ensure that the clock is registered with the framework and also switched
> on when there is a gate clock.
>
> The latest attempt by David for this was posted last night here:
>
> https://lkml.org/lkml/2018/4/26/1093

Ok, so the workaround in that series is to set up the timer clk manually
in the SoC specific code (dm365_init_time etc) and register it to the
clk subsystem, right?

That seems to be a much more appropriate workaround than adding
back early_platform devices. We can always try to do something better
later, but for now I'm happy with that as a workaround.

Please clarify: do we have to set up the clk registers for the timer
here just because we can't rely on the bootloader to have it set up
initially, or is there some other reason? I think what some other
platforms do is to treat the timer clock as a fixed-rate clock that
is not managed by the actual clk driver but is set up by uboot
before we enter the kernel, and then the clk driver just makes sure
it doesn't turn that clk off later.

        Arnd

  reply	other threads:[~2018-04-27  8:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 15:29 [PATCH RFC PoC 0/2] platform: different approach to early platform drivers Bartosz Golaszewski
2018-04-26 15:29 ` [PATCH RFC PoC 1/2] earlydev: implement a new way to probe platform devices early Bartosz Golaszewski
2018-04-27 15:13   ` Arnd Bergmann
2018-04-26 15:29 ` [PATCH RFC PoC 2/2] misc: implement a dummy early platform driver Bartosz Golaszewski
2018-04-26 17:31 ` [PATCH RFC PoC 0/2] platform: different approach to early platform drivers Rich Felker
2018-04-27  2:28   ` David Lechner
2018-04-27  2:54     ` Rich Felker
2018-04-27  7:52     ` Arnd Bergmann
2018-04-27  8:29       ` Sekhar Nori
2018-04-27  8:55         ` Arnd Bergmann [this message]
2018-04-27  8:59           ` Bartosz Golaszewski
2018-04-27  8:57       ` Bartosz Golaszewski
2018-04-27 10:18         ` Arnd Bergmann
2018-04-27 11:53           ` Bartosz Golaszewski
2018-04-27 12:40             ` Arnd Bergmann
2018-04-27 14:05               ` Bartosz Golaszewski
2018-04-27 14:48                 ` Arnd Bergmann
2018-04-27 16:05                   ` Bartosz Golaszewski
2018-04-27 19:08                     ` Arnd Bergmann
2018-04-27 15:22               ` Rich Felker
2018-05-02 21:11               ` Geert Uytterhoeven

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=CAK8P3a394ig-OSzZLj+50gnBw1x_c41EicuM7mF_ubswweQoSg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=aspriel@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=dalias@libc.org \
    --cc=david@lechnology.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=khilman@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=msuchanek@suse.de \
    --cc=mturquette@baylibre.com \
    --cc=nsekhar@ti.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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).