Re: Porting a driver to powerpc using FDT

2010-06-17 Thread Chris Alfred
>> (1) The .dts file - this is the Flattened Device Tree (FDT) >> descriptor: >> >> / { >> ... >> >> virtual-device { >> compatible = "simple-bus"; >> mydevice0 { >> compatible = "myvendor,mydevice"; >> }; >> }; >> >> ... >> }; >> >> For my board "simple-bus" is an already defined bus in the .dts.

Re: Porting a driver to powerpc using FDT

2010-06-17 Thread Grant Likely
Hi Chris, thanks for the write up. Some comments below, and I'm also in the process of writing better documentation for all of this. You can find it here: http://devicetree.org/Device_Tree_Usage That page describes how the device tree is structured. I'm about to start another page on how Linux

Re: Porting a driver to powerpc using FDT

2010-06-17 Thread Grant Likely
On Wed, Jun 16, 2010 at 10:25 PM, Chris Alfred wrote: > dsa_of_init is successfully called; but dsa_of_probe is not > called. That means the node is not being used to register an of_device. I need some more information to suggest how best to fix this. >>> What SoC are y

Re: Porting a driver to powerpc using FDT

2010-06-17 Thread Chris Alfred
> virtual-devices { > compatible = "simple-bus"; > dsa { > compatible = ",jkc5200n8-dsa"; > }; > }; Ok, after correcting the names, the basic OF driver is probed. Now to try and use probe to register the DSA platform driver with the OF driver as its parent.

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Chris Alfred
> We have only done a text search/replace lite5200 to jkc5200. I meant to write: We copied lite5200.c to jkc5200n8.c, and have only done a text search/replace lite5200 to jkc5200n8 Chris ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org ht

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Chris Alfred
dsa_of_init is successfully called; but dsa_of_probe is not called. >>> >>> That means the node is not being used to register an of_device. I >>> need some more information to suggest how best to fix this. >> >>> What SoC are you using? >>> What file in arch/powerpc/platforms/* is used t

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Grant Likely
On Wed, Jun 16, 2010 at 4:48 PM, Chris Alfred wrote: >>> dsa_of_init is successfully called; but dsa_of_probe is not called. >> >> That means the node is not being used to register an of_device.  I >> need some more information to suggest how best to fix this. > >> What SoC are you using? >> What

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Chris Alfred
>> dsa_of_init is successfully called; but dsa_of_probe is not called. > > That means the node is not being used to register an of_device. I > need some more information to suggest how best to fix this. > What SoC are you using? > What file in arch/powerpc/platforms/* is used to setup your machin

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Grant Likely
On Wed, Jun 16, 2010 at 4:06 PM, Chris Alfred wrote: > Grant Likely wrote: >> On Tue, Jun 15, 2010 at 4:19 PM, Chris Alfred >> wrote: >>> I am trying to port a DSA (Distributed Switch Architecture) driver >>> for the Micrel KS8995M managed switch connected to a MPC5200. There >>> is an SPI interf

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Chris Alfred
Grant Likely wrote: > On Tue, Jun 15, 2010 at 4:19 PM, Chris Alfred > wrote: >> I am trying to port a DSA (Distributed Switch Architecture) driver >> for the Micrel KS8995M managed switch connected to a MPC5200. There >> is an SPI interface and MII interface managed by the DSA driver. >> >> I can'

Re: Porting a driver to powerpc using FDT

2010-06-16 Thread Grant Likely
On Tue, Jun 15, 2010 at 4:19 PM, Chris Alfred wrote: > I am trying to port a DSA (Distributed Switch Architecture) driver for > the Micrel KS8995M managed switch connected to a MPC5200. There is an > SPI interface and MII interface managed by the DSA driver. > > I can't understand how probe gets c

Porting a driver to powerpc using FDT

2010-06-15 Thread Chris Alfred (Internode)
I am trying to port a DSA (Distributed Switch Architecture) driver for the Micrel KS8995M managed switch connected to a MPC5200. There is an SPI interface and MII interface managed by the DSA driver. I can't understand how probe gets called when the flatted device tree (FDT) system is used, and

Porting a driver to powerpc using FDT

2010-06-15 Thread Chris Alfred
I am trying to port a DSA (Distributed Switch Architecture) driver for the Micrel KS8995M managed switch connected to a MPC5200. There is an SPI interface and MII interface managed by the DSA driver. I can't understand how probe gets called when the flatted device tree (FDT) system is used, and ho