devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>, linux-sh@vger.kernel.org
Cc: Simon Horman <horms@verge.net.au>,
	linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@lists.ozlabs.org,
	Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH v2 6/7] ARM: mackerel: support booting with or without DT
Date: Mon, 17 Dec 2012 17:00:04 +0000	[thread overview]
Message-ID: <20121217170004.7F6C23E0BDD@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.1212171332520.24007@axis700.grange>

On Mon, 17 Dec 2012 13:40:45 +0100 (CET), Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> This patch adds dynamic switching to booting either with or without DT.
> So far only a part of the board initialisation can be done via DT. Devices,
> that still need platform data are kept that way. Devices, that can be
> initialised from DT will not be supplied from the platform data, if a DT
> image is detected.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  
>  static const char *mackerel_boards_compat_dt[] __initdata = {
> @@ -1659,10 +1715,20 @@ static const char *mackerel_boards_compat_dt[] __initdata = {
>  DT_MACHINE_START(MACKEREL_DT, "mackerel")
>  	.map_io		= sh7372_map_io,
>  	.init_early	= sh7372_add_early_devices,
> +	.init_irq	= sh7372_init_irq_of,
> +	.handle_irq	= shmobile_handle_irq_intc,
> +	.init_machine	= mackerel_init,
> +	.init_late	= sh7372_pm_init_late,
> +	.timer		= &shmobile_timer,
> +	.dt_compat	= mackerel_boards_compat_dt,
> +MACHINE_END
> +
> +MACHINE_START(MACKEREL, "mackerel")
> +	.map_io		= sh7372_map_io,
> +	.init_early	= sh7372_add_early_devices,
>  	.init_irq	= sh7372_init_irq,
>  	.handle_irq	= shmobile_handle_irq_intc,
>  	.init_machine	= mackerel_init,
>  	.init_late	= sh7372_pm_init_late,
>  	.timer		= &shmobile_timer,
> -	.dt_compat  = mackerel_boards_compat_dt,
>  MACHINE_END

MACHINE_START() handle's the DT case just fine. You shouldn't need
separate MACHINE_START() and DT_MACHINE_START() stanzas. Please merge. I
see that there was some discussion around sh7372_init_irq_of(), but I
it is better to have the single function handle the OF/non-OF case
gracefully rather than duplicating MACHINE definitions.

g.

  reply	other threads:[~2012-12-17 17:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 16:45 [PATCH 0/7] ARM: mackerel: extended DT support Guennadi Liakhovetski
2012-12-14 16:45 ` [PATCH 1/7] ARM: sh7372: add missing "#interrupt-cells" properties Guennadi Liakhovetski
2012-12-15  9:05   ` Simon Horman
2012-12-14 16:45 ` [PATCH 2/7] ARM: mackerel: include the correct .dtsi file Guennadi Liakhovetski
2012-12-15  8:37   ` Simon Horman
2012-12-14 16:45 ` [PATCH 3/7] ARM: sh7372: support mixed DT and board code interrupt controller init Guennadi Liakhovetski
2012-12-15  7:52   ` Simon Horman
2012-12-17  8:02     ` Guennadi Liakhovetski
2012-12-14 16:45 ` [PATCH 4/7] ARM: sh7372: add clock lookup entries for DT-based devices Guennadi Liakhovetski
2012-12-15  7:29   ` Grant Likely
2012-12-15  8:36   ` Simon Horman
2012-12-14 16:45 ` [PATCH 5/7] ARM: sh7372: allow boards supporting booting with or without DT Guennadi Liakhovetski
2012-12-15  8:05   ` Simon Horman
2012-12-17  8:07     ` Guennadi Liakhovetski
2012-12-14 16:45 ` [PATCH 6/7] ARM: mackerel: support " Guennadi Liakhovetski
2012-12-15  8:29   ` Simon Horman
2012-12-15 19:02     ` Guennadi Liakhovetski
2012-12-16  0:33       ` Simon Horman
2012-12-16 20:46   ` Grant Likely
2012-12-16 21:36     ` Guennadi Liakhovetski
2012-12-17 16:38       ` Grant Likely
2012-12-17 16:50         ` Guennadi Liakhovetski
2012-12-17 16:54       ` Grant Likely
2012-12-17 12:40   ` [PATCH v2 " Guennadi Liakhovetski
2012-12-17 17:00     ` Grant Likely [this message]
2012-12-14 16:45 ` [PATCH 7/7] ARM: mackerel: add more devices to DT Guennadi Liakhovetski

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=20121217170004.7F6C23E0BDD@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=horms@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@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;
as well as URLs for NNTP newsgroup(s).