All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kim Phillips <kim.phillips@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc: Add a device_initcall to call of_platform_bus_probe on all fsl SoCs
Date: Wed, 20 Dec 2006 10:00:46 +1100	[thread overview]
Message-ID: <1166569246.19254.86.camel@localhost.localdomain> (raw)
In-Reply-To: <20061219153102.20ab3345.kim.phillips@freescale.com>

On Tue, 2006-12-19 at 15:31 -0600, Kim Phillips wrote:
> Utilize of_platform_bus_probe() in lieu of manually
> calling of_platform_device_create for each ucc_geth device
> (consequently, the QE is added to of_default_bus_ids).
> 
> This has been extended outside mpc83xx platform code,
> since other fsl SoCs are going to need it (thanks Kumar).
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>

Big NACK

The effect of this patch is that of_platform_bus_probe() will be
unconditionally called on anything if a paltform using fsl_soc.c is
included in the build.

I want that called by the platform code or by something called by the
platform code for FSL boards, not totally unconditional like that.

Ben.
 
> ---
>  arch/powerpc/kernel/of_platform.c |    1 +
>  arch/powerpc/sysdev/fsl_soc.c     |    9 +++++++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
> index 3002ea3..72da78b 100644
> --- a/arch/powerpc/kernel/of_platform.c
> +++ b/arch/powerpc/kernel/of_platform.c
> @@ -50,6 +50,7 @@ static struct of_device_id of_default_bu
>  	{ .type = "plb5", },
>  	{ .type = "plb4", },
>  	{ .type = "opb", },
> +	{ .type = "qe", },
>  	{},
>  };
>  
> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
> index ad31e56..c41b851 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -28,6 +28,7 @@
>  #include <linux/fs_uart_pd.h>
>  
>  #include <asm/system.h>
> +#include <asm/of_platform.h>
>  #include <asm/atomic.h>
>  #include <asm/io.h>
>  #include <asm/irq.h>
> @@ -63,6 +64,14 @@ phys_addr_t get_immrbase(void)
>  
>  EXPORT_SYMBOL(get_immrbase);
>  
> +static int __init fsl_publish_devices(void)
> +{
> +	of_platform_bus_probe(NULL, NULL, NULL);
> +
> +	return 0;
> +}
> +device_initcall(fsl_publish_devices);
> +
>  #ifdef CONFIG_CPM2
>  
>  static u32 brgfreq = -1;

  reply	other threads:[~2006-12-19 23:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19 21:31 [PATCH] powerpc: Add a device_initcall to call of_platform_bus_probe on all fsl SoCs Kim Phillips
2006-12-19 23:00 ` Benjamin Herrenschmidt [this message]
2006-12-19 23:22   ` Kim Phillips
2006-12-19 23:40     ` Benjamin Herrenschmidt
2006-12-20  0:10       ` Scott Wood
2006-12-20  0:19         ` Benjamin Herrenschmidt

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=1166569246.19254.86.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=kim.phillips@freescale.com \
    --cc=linuxppc-dev@ozlabs.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.