All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/7] ARM: sh7372: allow boards supporting booting with or without DT
Date: Mon, 17 Dec 2012 08:07:35 +0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1212170902540.24007@axis700.grange> (raw)
In-Reply-To: <20121215080542.GF9073@verge.net.au>

Hi Simon

On Sat, 15 Dec 2012, Simon Horman wrote:

> On Fri, Dec 14, 2012 at 05:45:29PM +0100, Guennadi Liakhovetski wrote:
> > For boards booting without DT no changes should be caused by this patch.
> > When booting with DT, devices, whose drivers support DT probing, will not
> > be registered.
> 
> This relates in part to my comment on "ARM: sh7372: support mixed DT and
> board code interrupt controller init".
> 
> It is my understanding that sh7372_add_standard_devices_dt() already
> exists in setup-sh7372.c and that it is appropriate to use for bring
> up boards with DT.

I think, we partially clarified this already in the discussion of patch 
6/7. This patch makes it possible to use standard functions, e.g. 
sh7372_add_standard_devices() from both DT and non-DT boots. Whereas when 
booting with DT, devices, for which sufficient DT support already exists, 
have to be initialised from DT.

Thanks
Guennadi

> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  arch/arm/mach-shmobile/setup-sh7372.c |   17 ++++++++++++++---
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
> > index bbe6e2a..3e6bf3d 100644
> > --- a/arch/arm/mach-shmobile/setup-sh7372.c
> > +++ b/arch/arm/mach-shmobile/setup-sh7372.c
> > @@ -981,9 +981,12 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
> >  	&tmu01_device,
> >  };
> >  
> > -static struct platform_device *sh7372_late_devices[] __initdata = {
> > +static struct platform_device *sh7372_late_devices_dt[] __initdata = {
> >  	&iic0_device,
> >  	&iic1_device,
> > +};
> > +
> > +static struct platform_device *sh7372_late_devices[] __initdata = {
> >  	&dma0_device,
> >  	&dma1_device,
> >  	&dma2_device,
> > @@ -1012,13 +1015,11 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A3SP", &scif4_device, },
> >  		{ "A3SP", &scif5_device, },
> >  		{ "A3SP", &scif6_device, },
> > -		{ "A3SP", &iic1_device, },
> >  		{ "A3SP", &dma0_device, },
> >  		{ "A3SP", &dma1_device, },
> >  		{ "A3SP", &dma2_device, },
> >  		{ "A3SP", &usb_dma0_device, },
> >  		{ "A3SP", &usb_dma1_device, },
> > -		{ "A4R", &iic0_device, },
> >  		{ "A4R", &veu0_device, },
> >  		{ "A4R", &veu1_device, },
> >  		{ "A4R", &veu2_device, },
> > @@ -1027,6 +1028,10 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A4R", &tmu00_device, },
> >  		{ "A4R", &tmu01_device, },
> >  	};
> > +	struct pm_domain_device domain_devices_dt[] = {
> > +		{ "A3SP", &iic1_device, },
> > +		{ "A4R", &iic0_device, },
> > +	};
> >  
> >  	sh7372_init_pm_domains();
> >  
> > @@ -1035,9 +1040,15 @@ void __init sh7372_add_standard_devices(void)
> >  
> >  	platform_add_devices(sh7372_late_devices,
> >  			    ARRAY_SIZE(sh7372_late_devices));
> > +	if (!of_have_populated_dt())
> > +		platform_add_devices(sh7372_late_devices_dt,
> > +				     ARRAY_SIZE(sh7372_late_devices_dt));
> >  
> >  	rmobile_add_devices_to_domains(domain_devices,
> >  				       ARRAY_SIZE(domain_devices));
> > +	if (!of_have_populated_dt())
> > +		rmobile_add_devices_to_domains(domain_devices_dt,
> > +					       ARRAY_SIZE(domain_devices_dt));
> >  }
> >  
> >  static void __init sh7372_earlytimer_init(void)
> > -- 
> > 1.7.2.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

WARNING: multiple messages have this Message-ID (diff)
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Simon Horman <horms@verge.net.au>
Cc: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@lists.ozlabs.org,
	Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [PATCH 5/7] ARM: sh7372: allow boards supporting booting with or without DT
Date: Mon, 17 Dec 2012 09:07:35 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.1212170902540.24007@axis700.grange> (raw)
In-Reply-To: <20121215080542.GF9073@verge.net.au>

Hi Simon

On Sat, 15 Dec 2012, Simon Horman wrote:

> On Fri, Dec 14, 2012 at 05:45:29PM +0100, Guennadi Liakhovetski wrote:
> > For boards booting without DT no changes should be caused by this patch.
> > When booting with DT, devices, whose drivers support DT probing, will not
> > be registered.
> 
> This relates in part to my comment on "ARM: sh7372: support mixed DT and
> board code interrupt controller init".
> 
> It is my understanding that sh7372_add_standard_devices_dt() already
> exists in setup-sh7372.c and that it is appropriate to use for bring
> up boards with DT.

I think, we partially clarified this already in the discussion of patch 
6/7. This patch makes it possible to use standard functions, e.g. 
sh7372_add_standard_devices() from both DT and non-DT boots. Whereas when 
booting with DT, devices, for which sufficient DT support already exists, 
have to be initialised from DT.

Thanks
Guennadi

> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  arch/arm/mach-shmobile/setup-sh7372.c |   17 ++++++++++++++---
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
> > index bbe6e2a..3e6bf3d 100644
> > --- a/arch/arm/mach-shmobile/setup-sh7372.c
> > +++ b/arch/arm/mach-shmobile/setup-sh7372.c
> > @@ -981,9 +981,12 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
> >  	&tmu01_device,
> >  };
> >  
> > -static struct platform_device *sh7372_late_devices[] __initdata = {
> > +static struct platform_device *sh7372_late_devices_dt[] __initdata = {
> >  	&iic0_device,
> >  	&iic1_device,
> > +};
> > +
> > +static struct platform_device *sh7372_late_devices[] __initdata = {
> >  	&dma0_device,
> >  	&dma1_device,
> >  	&dma2_device,
> > @@ -1012,13 +1015,11 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A3SP", &scif4_device, },
> >  		{ "A3SP", &scif5_device, },
> >  		{ "A3SP", &scif6_device, },
> > -		{ "A3SP", &iic1_device, },
> >  		{ "A3SP", &dma0_device, },
> >  		{ "A3SP", &dma1_device, },
> >  		{ "A3SP", &dma2_device, },
> >  		{ "A3SP", &usb_dma0_device, },
> >  		{ "A3SP", &usb_dma1_device, },
> > -		{ "A4R", &iic0_device, },
> >  		{ "A4R", &veu0_device, },
> >  		{ "A4R", &veu1_device, },
> >  		{ "A4R", &veu2_device, },
> > @@ -1027,6 +1028,10 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A4R", &tmu00_device, },
> >  		{ "A4R", &tmu01_device, },
> >  	};
> > +	struct pm_domain_device domain_devices_dt[] = {
> > +		{ "A3SP", &iic1_device, },
> > +		{ "A4R", &iic0_device, },
> > +	};
> >  
> >  	sh7372_init_pm_domains();
> >  
> > @@ -1035,9 +1040,15 @@ void __init sh7372_add_standard_devices(void)
> >  
> >  	platform_add_devices(sh7372_late_devices,
> >  			    ARRAY_SIZE(sh7372_late_devices));
> > +	if (!of_have_populated_dt())
> > +		platform_add_devices(sh7372_late_devices_dt,
> > +				     ARRAY_SIZE(sh7372_late_devices_dt));
> >  
> >  	rmobile_add_devices_to_domains(domain_devices,
> >  				       ARRAY_SIZE(domain_devices));
> > +	if (!of_have_populated_dt())
> > +		rmobile_add_devices_to_domains(domain_devices_dt,
> > +					       ARRAY_SIZE(domain_devices_dt));
> >  }
> >  
> >  static void __init sh7372_earlytimer_init(void)
> > -- 
> > 1.7.2.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

WARNING: multiple messages have this Message-ID (diff)
From: g.liakhovetski@gmx.de (Guennadi Liakhovetski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] ARM: sh7372: allow boards supporting booting with or without DT
Date: Mon, 17 Dec 2012 09:07:35 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.1212170902540.24007@axis700.grange> (raw)
In-Reply-To: <20121215080542.GF9073@verge.net.au>

Hi Simon

On Sat, 15 Dec 2012, Simon Horman wrote:

> On Fri, Dec 14, 2012 at 05:45:29PM +0100, Guennadi Liakhovetski wrote:
> > For boards booting without DT no changes should be caused by this patch.
> > When booting with DT, devices, whose drivers support DT probing, will not
> > be registered.
> 
> This relates in part to my comment on "ARM: sh7372: support mixed DT and
> board code interrupt controller init".
> 
> It is my understanding that sh7372_add_standard_devices_dt() already
> exists in setup-sh7372.c and that it is appropriate to use for bring
> up boards with DT.

I think, we partially clarified this already in the discussion of patch 
6/7. This patch makes it possible to use standard functions, e.g. 
sh7372_add_standard_devices() from both DT and non-DT boots. Whereas when 
booting with DT, devices, for which sufficient DT support already exists, 
have to be initialised from DT.

Thanks
Guennadi

> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > ---
> >  arch/arm/mach-shmobile/setup-sh7372.c |   17 ++++++++++++++---
> >  1 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
> > index bbe6e2a..3e6bf3d 100644
> > --- a/arch/arm/mach-shmobile/setup-sh7372.c
> > +++ b/arch/arm/mach-shmobile/setup-sh7372.c
> > @@ -981,9 +981,12 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
> >  	&tmu01_device,
> >  };
> >  
> > -static struct platform_device *sh7372_late_devices[] __initdata = {
> > +static struct platform_device *sh7372_late_devices_dt[] __initdata = {
> >  	&iic0_device,
> >  	&iic1_device,
> > +};
> > +
> > +static struct platform_device *sh7372_late_devices[] __initdata = {
> >  	&dma0_device,
> >  	&dma1_device,
> >  	&dma2_device,
> > @@ -1012,13 +1015,11 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A3SP", &scif4_device, },
> >  		{ "A3SP", &scif5_device, },
> >  		{ "A3SP", &scif6_device, },
> > -		{ "A3SP", &iic1_device, },
> >  		{ "A3SP", &dma0_device, },
> >  		{ "A3SP", &dma1_device, },
> >  		{ "A3SP", &dma2_device, },
> >  		{ "A3SP", &usb_dma0_device, },
> >  		{ "A3SP", &usb_dma1_device, },
> > -		{ "A4R", &iic0_device, },
> >  		{ "A4R", &veu0_device, },
> >  		{ "A4R", &veu1_device, },
> >  		{ "A4R", &veu2_device, },
> > @@ -1027,6 +1028,10 @@ void __init sh7372_add_standard_devices(void)
> >  		{ "A4R", &tmu00_device, },
> >  		{ "A4R", &tmu01_device, },
> >  	};
> > +	struct pm_domain_device domain_devices_dt[] = {
> > +		{ "A3SP", &iic1_device, },
> > +		{ "A4R", &iic0_device, },
> > +	};
> >  
> >  	sh7372_init_pm_domains();
> >  
> > @@ -1035,9 +1040,15 @@ void __init sh7372_add_standard_devices(void)
> >  
> >  	platform_add_devices(sh7372_late_devices,
> >  			    ARRAY_SIZE(sh7372_late_devices));
> > +	if (!of_have_populated_dt())
> > +		platform_add_devices(sh7372_late_devices_dt,
> > +				     ARRAY_SIZE(sh7372_late_devices_dt));
> >  
> >  	rmobile_add_devices_to_domains(domain_devices,
> >  				       ARRAY_SIZE(domain_devices));
> > +	if (!of_have_populated_dt())
> > +		rmobile_add_devices_to_domains(domain_devices_dt,
> > +					       ARRAY_SIZE(domain_devices_dt));
> >  }
> >  
> >  static void __init sh7372_earlytimer_init(void)
> > -- 
> > 1.7.2.5

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

Thread overview: 78+ 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 ` Guennadi Liakhovetski
2012-12-14 16:45 ` Guennadi Liakhovetski
2012-12-14 16:45 ` [PATCH 1/7] ARM: sh7372: add missing "#interrupt-cells" properties Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  9:05   ` Simon Horman
2012-12-15  9:05     ` Simon Horman
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-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  8:37   ` Simon Horman
2012-12-15  8:37     ` Simon Horman
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-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  7:52   ` Simon Horman
2012-12-15  7:52     ` Simon Horman
2012-12-15  7:52     ` Simon Horman
2012-12-17  8:02     ` Guennadi Liakhovetski
2012-12-17  8:02       ` Guennadi Liakhovetski
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-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  7:29   ` Grant Likely
2012-12-15  7:29     ` Grant Likely
2012-12-15  7:29     ` Grant Likely
2012-12-15  8:36   ` Simon Horman
2012-12-15  8:36     ` Simon Horman
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-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  8:05   ` Simon Horman
2012-12-15  8:05     ` Simon Horman
2012-12-15  8:05     ` Simon Horman
2012-12-17  8:07     ` Guennadi Liakhovetski [this message]
2012-12-17  8:07       ` Guennadi Liakhovetski
2012-12-17  8:07       ` Guennadi Liakhovetski
2012-12-14 16:45 ` [PATCH 6/7] ARM: mackerel: support " Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-15  8:29   ` Simon Horman
2012-12-15  8:29     ` Simon Horman
2012-12-15  8:29     ` Simon Horman
2012-12-15 19:02     ` Guennadi Liakhovetski
2012-12-15 19:02       ` Guennadi Liakhovetski
2012-12-15 19:02       ` Guennadi Liakhovetski
2012-12-16  0:33       ` Simon Horman
2012-12-16  0:33         ` Simon Horman
2012-12-16  0:33         ` Simon Horman
2012-12-16 20:46   ` Grant Likely
2012-12-16 20:46     ` Grant Likely
2012-12-16 20:46     ` Grant Likely
2012-12-16 21:36     ` Guennadi Liakhovetski
2012-12-16 21:36       ` Guennadi Liakhovetski
2012-12-16 21:36       ` Guennadi Liakhovetski
2012-12-17 16:38       ` Grant Likely
2012-12-17 16:38         ` Grant Likely
2012-12-17 16:38         ` Grant Likely
2012-12-17 16:50         ` Guennadi Liakhovetski
2012-12-17 16:50           ` Guennadi Liakhovetski
2012-12-17 16:50           ` Guennadi Liakhovetski
2012-12-17 16:54       ` Grant Likely
2012-12-17 16:54         ` Grant Likely
2012-12-17 16:54         ` Grant Likely
2012-12-17 12:40   ` [PATCH v2 " Guennadi Liakhovetski
2012-12-17 12:40     ` Guennadi Liakhovetski
2012-12-17 12:40     ` Guennadi Liakhovetski
2012-12-17 17:00     ` Grant Likely
2012-12-17 17:00       ` Grant Likely
2012-12-17 17:00       ` Grant Likely
2012-12-14 16:45 ` [PATCH 7/7] ARM: mackerel: add more devices to DT Guennadi Liakhovetski
2012-12-14 16:45   ` Guennadi Liakhovetski
2012-12-14 16:45   ` 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=Pine.LNX.4.64.1212170902540.24007@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.