SUPERH platform development
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2 4/8] ARM: shmobile: move GIC and I2C devices from sh73a0 common .dtsi to reference
Date: Tue, 19 Mar 2013 12:14:16 +0000	[thread overview]
Message-ID: <20130319121416.GC4317@verge.net.au> (raw)
In-Reply-To: <1360348712-29255-5-git-send-email-g.liakhovetski@gmx.de>

On Tue, Mar 19, 2013 at 12:25:24PM +0100, Guennadi Liakhovetski wrote:
> Hi
> 
> Let me return briefly to this 1 month-old thread just to make sure we're 
> happy about the current state of kzm9g DT:
> 
> On Wed, 13 Feb 2013, Simon Horman wrote:
> 
> > On Wed, Feb 13, 2013 at 10:59:41AM +0100, Guennadi Liakhovetski wrote:
> > > Hi Simon
> > > 
> > > On Wed, 13 Feb 2013, Simon Horman wrote:
> > > 
> > > > On Fri, Feb 08, 2013 at 07:38:28PM +0100, Guennadi Liakhovetski wrote:
> > > > > In "legacy" mode, when all devices are initialised by the board .c file,
> > > > > there is no need to install the GIC and all I2C devices from the device
> > > > > tree too. Move them to the reference implementation, that fully relies upon
> > > > > DT.
> > > > 
> > > > The motivation for placing the code in sh73a0.dtsi was so that
> > > > it would be available to the non-reference board code if/when it
> > > > moves over to using DT.
> > > > 
> > > > I'm happy to switch things around if its preferred to keep
> > > > the dts small.
> > > 
> > > As I said, I do think it is good to keep devices in a central .dtsi, 
> > > included by all, but they should be disabled by default, using the 
> > > 'status="disabled"' property, and only enabled on boards, that actually 
> > > use those devices.
> > 
> > Ok, that makes sense to me. Do you think you could update this patch
> > accordingly?
> 
> Here's my understanding of the DT situation on kzm9g:
> 
> 1. legacy board-kzm9g.c + sh73a0-kzm9g.dts + sh73a0.dtsi: board's 
> struct machine_desc defines a .dt_compat field, this shall allow to 
> include this kzm9g support in multiarch kernels, using DT. sh73a0.dtsi 
> includes nodes for all I2C devices and the GIC interrupt controller, but 
> of_platform_populate() is never called, so, those nodes are unused.
> 
> 2. DT mode board-kzm9g-reference.c + sh73a0-kzm9g-reference.dts + 
> sh73a0-reference.dtsi + sh73a0.dtsi: .dt_compat is obviously used similar 
> to the above, but with a different match string, of_platform_populate() is 
> called, so i2c and gic nodes are used and respective devices are 
> instantiated.
> 
> So, in principle all works as expected, but it just seems a bit unclean 
> and confusing to me, that in "legacy" mode [1] above a bunch of devices 
> are provided in DT, listed in /proc/device-tree/ but remain unused. using 
> 'status="disabled"' as proposed above could be done, but having to add 
> nodes like
> 
> &gic = {
> 	status = "okay";
> };
> 
> &i2c0...
> 
> on all boards, that do use DT, seems a bit clumsy to me.

What is the problem with having entries in sh73a0.dtsi which are unused
in some modes? In the long run the plan is to use DT by default
and remove board-kzm9g-reference.c, so it seems to me that
it makes sense to put as much as possible into sh73a0.dtsi.

My preference would be to remove sh73a0-kzm9g.dts, moving its
contents into sh73a0.dtsi.

  parent reply	other threads:[~2013-03-19 12:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 18:38 [PATCH v2 4/8] ARM: shmobile: move GIC and I2C devices from sh73a0 common .dtsi to reference Guennadi Liakhovetski
2013-02-13  3:39 ` Simon Horman
2013-02-13  9:59 ` Guennadi Liakhovetski
2013-02-13 11:36 ` Simon Horman
2013-03-19 11:25 ` Guennadi Liakhovetski
2013-03-19 12:14 ` Simon Horman [this message]
2013-03-19 12:24 ` Simon Horman
2013-03-19 12:49 ` Guennadi Liakhovetski
2013-03-19 12:55 ` Simon Horman

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=20130319121416.GC4317@verge.net.au \
    --to=horms@verge.net.au \
    --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