From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 12/12] ARM: mach-shmobile: Use DT_MACHINE for mackerel
Date: Sun, 28 Oct 2012 19:44:38 +0900 [thread overview]
Message-ID: <20121028104438.GC10073@verge.net.au> (raw)
In-Reply-To: <20121028103711.4e89deb3@skate>
On Sun, Oct 28, 2012 at 10:37:11AM +0100, Thomas Petazzoni wrote:
> Dear Simon Horman,
>
> On Sun, 28 Oct 2012 11:26:13 +0900, Simon Horman wrote:
>
> > -MACHINE_START(MACKEREL, "mackerel")
> > +static const char *mackerel_boards_compat_dt[] __initdata = {
> > + "renesas,mackerel",
> > + NULL,
> > +};
> > +
> > +DT_MACHINE_START(MACKEREL_DT, "mackerel")
> > .map_io = sh7372_map_io,
> > .init_early = sh7372_add_early_devices,
> > .init_irq = sh7372_init_irq,
> > @@ -1659,4 +1664,5 @@ MACHINE_START(MACKEREL, "mackerel")
> > .init_machine = mackerel_init,
> > .init_late = sh7372_pm_init_late,
> > .timer = &shmobile_timer,
> > + .dt_compat = mackerel_boards_compat_dt,
> > MACHINE_END
>
> Not sure what is the status of mach-shmobile with regard to the device
> tree, but one of the idea of the device tree is to avoid having one .c
> file per board, and therefore one DT_MACHINE_START definition per
> board. There should be only only DT_MACHINE_START definition per SoC or
> SoC family, with the DT giving the detailed hardware description.
>
> Of course, during a transition period, not all your drivers may have DT
> bindings, and therefore some devices may need to be probed in the "old"
> way (manual registration of platform_device). In that case, your
> ->init_machine() hook can call initialization function on a per-board
> basis by testing if the machine is such or such board.
>
> See arch/arm/mach-kirkwood/board-dt.c for an example. The advantage is
> that with this solution, the board specific C files are progressively
> reducing in size as more and more devices get registered through the
> Device Tree, until the point where they become empty and can be removed.
Hi Thomas,
shmobile is very much in the transition phase and we are, patch by patch,
working towards full(er) DT support for boards, SoCs and drivers. I am not
sure that now is the right time to jump to a approach similar to that taken
by mach-kirkwood/board-dt.c.
next prev parent reply other threads:[~2012-10-28 10:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-28 2:26 [GIT PULL v2] Renesas ARM-based SoC boards for v3.8 Simon Horman
2012-10-28 2:26 ` [PATCH 01/12] ARM: shmobile: r8a7740: Enable PMU Simon Horman
2012-10-28 11:28 ` Sergei Shtylyov
2012-10-29 5:11 ` Simon Horman
2012-10-28 2:26 ` [PATCH 02/12] ARM: shmobile: kzm9g: enable magnetometer ak8975 Simon Horman
2012-10-28 2:26 ` [PATCH 03/12] ARM: shmobile: kzm9g: enable three-axis digital accelerometer ADXL345 Simon Horman
2012-10-28 2:26 ` [PATCH 04/12] ARM: shmobile: kzm9g: enable DMAEngine on SHDI0 and SDHI2 Simon Horman
2012-10-28 2:26 ` [PATCH 05/12] ARM: mach-shmobile: add FLCTL DMA slave definitions for sh7372 Simon Horman
2012-10-28 2:26 ` [PATCH 06/12] ARM: shmobile: armadillo800eva: enable restart Simon Horman
2012-10-28 2:26 ` [PATCH 07/12] ARM: shmobile: r8a7779: add HSPI clock support Simon Horman
2012-10-28 2:26 ` [PATCH 08/12] ARM: shmobile: r8a7779: add I2C " Simon Horman
2012-10-28 2:26 ` [PATCH 09/12] ARM: shmobile: r8a7779: add I2C driver support Simon Horman
2012-10-28 2:26 ` [PATCH 10/12] ARM: shmobile: marzen: add HSPI support Simon Horman
2012-10-28 2:26 ` [PATCH 11/12] ARM: shmobile: r8a7740: fixup DT machine desc name typo Simon Horman
2012-10-28 2:26 ` [PATCH 12/12] ARM: mach-shmobile: Use DT_MACHINE for mackerel Simon Horman
2012-10-28 9:37 ` Thomas Petazzoni
2012-10-28 10:44 ` Simon Horman [this message]
2012-10-28 10:57 ` Thomas Petazzoni
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=20121028104438.GC10073@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.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).