linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] ARM: shmobile: compile drivers/sh for CONFIG_ARCH_SHMOBILE_MULTI
Date: Sun, 19 Jan 2014 21:44:53 +0000	[thread overview]
Message-ID: <3417477.Rj26gCLKM2@avalon> (raw)
In-Reply-To: <1389367095-7760-1-git-send-email-ben.dooks@codethink.co.uk>

Hi Ben,

On Thursday 16 January 2014 17:25:09 Ben Dooks wrote:
> On 16/01/14 10:38, Ben Dooks wrote:
> > On 15/01/14 19:46, Laurent Pinchart wrote:
> >> On Wednesday 15 January 2014 08:55:05 Simon Horman wrote:
> >>> On Tue, Jan 14, 2014 at 01:56:16PM +0000, Ben Dooks wrote:
> >>>> If the kernel is built to support multi-arm configurmation with
> >>>> shmobile support built in, then the drivers/sh is not built. This
> >>>> contains drivers that are essential to devices support by that
> >>>> configuration, including the PM runtime code in drivers/sh/pm_runtime.c
> >>>> (which implicitly enables the bus clocks for all devices).
> >>>> 
> >>>> If CONFIG_ARCH_SHMOBILE_MULTI then build the drivers/sh directory,
> >>>> but ensure that bits that may conflict (drivers/sh/clk if the common
> >>>> clock framework is not enabled) are built.
> >>>> 
> >>>> The ARCH_SHMOBILE_MULTI was added by efacfce5f8a ("ARM: shmobile:
> >>>> Introduce ARCH_SHMOBILE_MULTI") but this has only just recently been
> >>>> found due to changes currently only in Simon Horman's tree. This patch
> >>>> is a partial revert of bf98c1eac1d4a6b ("ARM: Rename ARCH_SHMOBILE to
> >>>> ARCH_SHMOBILE_LEGACY") to address the issue of drivers not being built.
> >>>> 
> >>>> It is also possible the drivers/sh/intc will also need to be built
> >>>> however the lack of intc is not causing a number of drivers to fail
> >>>> to properly manage their clocks. This is left as an future patch for
> >>>> that is perfectly fine. someone who understands that part of the code.
> >>> 
> >>> Laurent, what are you feelings on this?
> >> 
> >> If we end up needing an interrupt controller supported by
> >> drivers/sh/intc for a multiplatform kernel I would rather like to port
> >> the driver to drivers/irqchip instead of compiling drivers/sh/intc for
> >> the platform.
> >> 
> >> Regarding drivers/sh/pm_runtime.c, compiling it for ARCH_SHMOBILE_MULTI
> >> will cause multiplatform kernels running on non-Renesas platforms to add
> >> a pm clock notifier. We need to at least add a runtime check.
> > 
> > Hmm, could we move that to the mstp code or add bindings to the
> > specific architectures that need it?
> 
> I was having a think, and how about adding the following to each
> driver that expects clock management to happen for it, such as the
> following in the probe sequence:
> 
> 	pm_runtime_manage_clock(dev);
> 
> This would mean the following:
> 
> - People would know a driver had its clock managed elsewhere
> - You couldn't build a system with the clock_ops disabled.
> - A system where a mix of drivers where used would work fine
> - drivers/sh/pm_runtime.c could be deleted too.

That sounds like a good idea to me. I like how drivers will be responsible for 
explicitly delegating clock handling to generic code. This combines simplicity 
with flexibility, and doesn't hide clock handling.

Mark, Rafael, any opinion ?

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2014-01-19 21:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 15:18 [PATCH] ARM: shmobile: compile drivers/sh for CONFIG_ARCH_SHMOBILE_MULTI Ben Dooks
2014-01-11 13:06 ` Ben Dooks
2014-01-12 21:54   ` Laurent Pinchart
2014-01-12 22:01     ` Laurent Pinchart
2014-01-13  6:45       ` Ben Dooks
2014-01-13 22:37         ` Laurent Pinchart
2014-01-17  0:49         ` Mark Brown
2014-01-13  0:30 ` Simon Horman
2014-01-13  6:23   ` Ben Dooks
2014-01-13  9:28 ` Geert Uytterhoeven
2014-01-13  9:35   ` Ben Dooks
2014-01-13  9:47     ` Geert Uytterhoeven
2014-01-14 13:56 ` Ben Dooks
2014-01-14 23:55 ` Simon Horman
2014-01-15 19:46 ` Laurent Pinchart
2014-01-16 10:38 ` Ben Dooks
2014-01-16 17:25 ` Ben Dooks
2014-01-19 21:44 ` Laurent Pinchart [this message]
2014-01-20 11:47 ` Mark Brown
2014-01-20 12:01 ` Ben Dooks
2014-01-20 12:54 ` Mark Brown
2014-01-20 13:19   ` Ben Dooks
2014-01-20 15:48     ` Laurent Pinchart
2014-01-20 15:56       ` Mark Brown
2014-01-20 22:52         ` Laurent Pinchart
2014-03-11 19:15           ` Geert Uytterhoeven
2014-03-12 14:18             ` Laurent Pinchart
2014-03-12 15:28               ` Laurent Pinchart

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=3417477.Rj26gCLKM2@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.org \
    /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).