linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* DTS parsing and kernel bus support query
@ 2009-12-08 13:53 vinayak.kale
  2009-12-08 18:32 ` Josh Boyer
  0 siblings, 1 reply; 2+ messages in thread
From: vinayak.kale @ 2009-12-08 13:53 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

Hi

I have following queries about DTS parsing and kernel bus support. I would  
really appreciate any help.

I have a PowerPC 440 core based board. We are porting Linux kernel – 2.6.31.

1) For other PowerPC 4xx based boards, what we found is devices like  
UART/I2C/GPIO are connected through PLB->OPB buses. Accordingly we specify  
the node structure inside a dts file. Does kernel uses the actual path to  
locate a node eg /plb/opb/i2c? or it uses the compatible property to locate  
a node?

2)In case of our board, instead of OPB and EBC we have buses like AI and  
APB. So our DTS node struct for UART looks like /plb/ai/apb/serial. For  
this do we need to add any extra support in kernel in order to recognize  
the devices on AI and APB buses? Similar question for Flash device. It's on  
the path /plb/ai/flash.
I need to access UART/I2C/GPIO/Flash devices over AI and APB bus. PLB is  
connected to AI bus. AI is further connected to APB.

3) Do we need to add extra support for AI/APB bus in kernel?

Thanks,
Vinayak

[-- Attachment #2: Type: text/html, Size: 1116 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: DTS parsing and kernel bus support query
  2009-12-08 13:53 DTS parsing and kernel bus support query vinayak.kale
@ 2009-12-08 18:32 ` Josh Boyer
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Boyer @ 2009-12-08 18:32 UTC (permalink / raw)
  To: vinayak.kale; +Cc: linuxppc-dev

On Tue, Dec 08, 2009 at 01:53:41PM +0000, vinayak.kale@gmail.com wrote:
> Hi
>
> I have following queries about DTS parsing and kernel bus support. I 
> would really appreciate any help.
>
> I have a PowerPC 440 core based board. We are porting Linux kernel – 2.6.31.
>
> 1) For other PowerPC 4xx based boards, what we found is devices like  
> UART/I2C/GPIO are connected through PLB->OPB buses. Accordingly we 
> specify the node structure inside a dts file. Does kernel uses the actual 
> path to locate a node eg /plb/opb/i2c? or it uses the compatible property 
> to locate a node?

It calls "of_platform_bus_probe" very early with a list of buses to walk to
create the of_platform devices.  Then the device drivers will use the
compatible properties to bind to the right of_platform devices.  If the bus
isn't walked, then those devices won't get created in the kernel.  See the
beginning portions of arch/powerpc/platforms/44x/ppc44x_simple.c.

> 2)In case of our board, instead of OPB and EBC we have buses like AI and  
> APB. So our DTS node struct for UART looks like /plb/ai/apb/serial. For  
> this do we need to add any extra support in kernel in order to recognize  
> the devices on AI and APB buses? Similar question for Flash device. It's 
> on the path /plb/ai/flash.

You would need to clearly have the AI and APB buses in the DTS file, and then
have them walked via of_platform_bus_probe.  If they are simple busses without
odd translations, it shouldn't be too hard to do.

> I need to access UART/I2C/GPIO/Flash devices over AI and APB bus. PLB is  
> connected to AI bus. AI is further connected to APB.
>
> 3) Do we need to add extra support for AI/APB bus in kernel?

Not sure.  I don't know how those busses operate.

josh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-08 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 13:53 DTS parsing and kernel bus support query vinayak.kale
2009-12-08 18:32 ` Josh Boyer

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).