orion/kirkwood and device tree

Michael Walle michael at walle.cc
Wed Nov 2 18:03:04 EDT 2011


Am Mittwoch 02 November 2011, 17:50:57 schrieb Jason:
> Michael,
> 
> On Mon, Oct 31, 2011 at 11:50:28PM +0100, Michael Walle wrote:
> > i've already ported some marvell devices to DT. spi-orion, orion-wdt,
> > rtc-mv and mv_cesa. Atm i'm struggling with how to pass
> > kirkwood_mbus_dram_info to the device drivers (the old method is to pass
> > it through platform_data)
> 
> Do you have a public git tree I could pull from, by chance?  I don't
> care about the state, I'd like to learn by example and start pitching
> in.

yeah i pushed it to github:
https://github.com/mwalle/linux/tree/kirkwood-devtree

Am Dienstag 01 November 2011, 07:25:23 schrieben Andrew:
> I have some changes in this area in my tree
Andrew, is your repository public?

> We could maybe put this table into DT?
I don't know if these informations belong to the DT or to generic kirkwood 
arch support (eg. mach-kirkwood/board-dt.c).

In both cases there needs to be some functions to retrieve these properties 
(instead of passing a pointer to some structure around). But i don't know if 
this fits the linux device drivers concept, eg. to be independent from any 
architecture.

So if any kernel hacker is reading this, i'm happy for every hint :) The 
problem is that most kirkwood/orion SoC devices needs a memory map to set up 
its internal memory windows for DMA access. Actually it only uses one window, 
which addresses the main memory. The arch-{kirkwood,orion} code stores the 
needed informations within a static *_mbus_dram_info variable, which is then 
passed as a pointer within platform_data to the device driver.

Is there a best practice for doing such things with device tree aware drivers?

-- 
Michael



More information about the linux-arm-kernel mailing list