Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Segher Boessenkool

Of course, looking at the device tree, rapidio is a device, not a bus,
because it does not have a device_type and it does not have any 
children

of its own.


It's a device _of course_, but it's also a bus parent, since
it has a "#address-cells" not equal to zero (and, if this used
real OF, it would have decode-unit and encode-unit methods).
A quite empty bus perhaps heh (in this device tree, anyway).


Segher

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Arnd Bergmann
On Thursday 28 June 2007, Zhang Wei-r63237 wrote:
> > > +static __init int mpc86xx_of_device_init(void)
> > > +{
> > > +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
> > > +}
> > 
> > This will add any devices below the "fsl,rapidio-delta" device
> > as an of_device. Is that what you actually want? I would guess that
> > you want to add the bridge itself, not the devices below it.
> > 
> > Is the rapidio device at the root of the device tree, and if so, why
> > not under the soc bus?
> > 
> 
> RapidIO is rather a bus that a device although these is no other nodes 
> defined in its sector now.
> 

That's exactly my point. The meaning of of_platform_bus_probe() is 'add all
direct children of these nodes', not 'add these nodes', although it
happens to do that in the process.

Of course, looking at the device tree, rapidio is a device, not a bus,
because it does not have a device_type and it does not have any children
of its own.

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Zhang Wei-r63237
Hi, Arnd,


> 
> On Wednesday 27 June 2007, Zhang Wei wrote:
> > +static struct of_device_id mpc86xx_of_ids[] = {
> > +   { .type = "soc", },
> > +   { .compatible = "fsl,rapidio-delta", },
> > +   {},
> > +};
> > +
> > +static __init int mpc86xx_of_device_init(void)
> > +{
> > +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
> > +}
> 
> This will add any devices below the "fsl,rapidio-delta" device
> as an of_device. Is that what you actually want? I would guess that
> you want to add the bridge itself, not the devices below it.
> 
> Is the rapidio device at the root of the device tree, and if so, why
> not under the soc bus?
> 

RapidIO is rather a bus that a device although these is no other nodes defined 
in its sector now.

Thanks!
Wei.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Zhang Wei-r63237
Hi, Arnd,


 
 On Wednesday 27 June 2007, Zhang Wei wrote:
  +static struct of_device_id mpc86xx_of_ids[] = {
  +   { .type = soc, },
  +   { .compatible = fsl,rapidio-delta, },
  +   {},
  +};
  +
  +static __init int mpc86xx_of_device_init(void)
  +{
  +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
  +}
 
 This will add any devices below the fsl,rapidio-delta device
 as an of_device. Is that what you actually want? I would guess that
 you want to add the bridge itself, not the devices below it.
 
 Is the rapidio device at the root of the device tree, and if so, why
 not under the soc bus?
 

RapidIO is rather a bus that a device although these is no other nodes defined 
in its sector now.

Thanks!
Wei.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Arnd Bergmann
On Thursday 28 June 2007, Zhang Wei-r63237 wrote:
   +static __init int mpc86xx_of_device_init(void)
   +{
   +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
   +}
  
  This will add any devices below the fsl,rapidio-delta device
  as an of_device. Is that what you actually want? I would guess that
  you want to add the bridge itself, not the devices below it.
  
  Is the rapidio device at the root of the device tree, and if so, why
  not under the soc bus?
  
 
 RapidIO is rather a bus that a device although these is no other nodes 
 defined in its sector now.
 

That's exactly my point. The meaning of of_platform_bus_probe() is 'add all
direct children of these nodes', not 'add these nodes', although it
happens to do that in the process.

Of course, looking at the device tree, rapidio is a device, not a bus,
because it does not have a device_type and it does not have any children
of its own.

Arnd 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-28 Thread Segher Boessenkool

Of course, looking at the device tree, rapidio is a device, not a bus,
because it does not have a device_type and it does not have any 
children

of its own.


It's a device _of course_, but it's also a bus parent, since
it has a #address-cells not equal to zero (and, if this used
real OF, it would have decode-unit and encode-unit methods).
A quite empty bus perhaps heh (in this device tree, anyway).


Segher

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-27 Thread Arnd Bergmann
On Wednesday 27 June 2007, Zhang Wei wrote:
> +static struct of_device_id mpc86xx_of_ids[] = {
> +   { .type = "soc", },
> +   { .compatible = "fsl,rapidio-delta", },
> +   {},
> +};
> +
> +static __init int mpc86xx_of_device_init(void)
> +{
> +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
> +}

This will add any devices below the "fsl,rapidio-delta" device
as an of_device. Is that what you actually want? I would guess that
you want to add the bridge itself, not the devices below it.

Is the rapidio device at the root of the device tree, and if so, why
not under the soc bus?

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-27 Thread Zhang Wei
Add the platform device support with RapidIO to MPC8641HPCN platform.

Signed-off-by: Zhang Wei <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c 
b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 7034bca..5518ed3 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -28,6 +28,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -467,3 +469,17 @@ define_machine(mpc86xx_hpcn) {
.calibrate_decr = generic_calibrate_decr,
.progress   = udbg_progress,
 };
+
+
+static struct of_device_id mpc86xx_of_ids[] = {
+   { .type = "soc", },
+   { .compatible = "fsl,rapidio-delta", },
+   {},
+};
+
+static __init int mpc86xx_of_device_init(void)
+{
+   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
+}
+
+device_initcall(mpc86xx_of_device_init);
-- 
1.5.1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-27 Thread Zhang Wei
Add the platform device support with RapidIO to MPC8641HPCN platform.

Signed-off-by: Zhang Wei [EMAIL PROTECTED]
---
 arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c 
b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 7034bca..5518ed3 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -28,6 +28,8 @@
 #include mm/mmu_decl.h
 #include asm/udbg.h
 #include asm/i8259.h
+#include asm/of_device.h
+#include asm/of_platform.h
 
 #include asm/mpic.h
 
@@ -467,3 +469,17 @@ define_machine(mpc86xx_hpcn) {
.calibrate_decr = generic_calibrate_decr,
.progress   = udbg_progress,
 };
+
+
+static struct of_device_id mpc86xx_of_ids[] = {
+   { .type = soc, },
+   { .compatible = fsl,rapidio-delta, },
+   {},
+};
+
+static __init int mpc86xx_of_device_init(void)
+{
+   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
+}
+
+device_initcall(mpc86xx_of_device_init);
-- 
1.5.1

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 3/5 v2] Add the platform device support with RapidIO to MPC8641HPCN platform.

2007-06-27 Thread Arnd Bergmann
On Wednesday 27 June 2007, Zhang Wei wrote:
 +static struct of_device_id mpc86xx_of_ids[] = {
 +   { .type = soc, },
 +   { .compatible = fsl,rapidio-delta, },
 +   {},
 +};
 +
 +static __init int mpc86xx_of_device_init(void)
 +{
 +   return of_platform_bus_probe(NULL, mpc86xx_of_ids, NULL);
 +}

This will add any devices below the fsl,rapidio-delta device
as an of_device. Is that what you actually want? I would guess that
you want to add the bridge itself, not the devices below it.

Is the rapidio device at the root of the device tree, and if so, why
not under the soc bus?

Arnd 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/