[PATCH 2/2] drivers/amba: probe via device tree

Russell King - ARM Linux linux at arm.linux.org.uk
Sun May 22 09:35:58 EST 2011


On Fri, May 20, 2011 at 09:08:17AM -0700, Stephen Neuendorffer wrote:
> > That is how it is currently, but the reality is that I only have 1 bus
> > with both ARM Primecell peripherals and other peripherals which are
> > standard platform bus devices. i2c-designware is one example. It is on
> > the APB just like the pl011 uart. So do you propose I create a amba
> > driver for it? It has no peripheral ID registers, so that may not even
> work.
> 
> Same here.  I don't know what the right solution for it is, but I find
> amba_bus
> solution to get in the way more than help.  I had to hack the etm/etb
> driver
> and the amba_bus to shreds to get it to work for me at all.

Well then you're doing something totally wrong then.  All you need to
do to get an amba_device working is provide an apb_clk as a dummy clock
if you have no control over it, and declare an amba_device structure
with the relevant physical base addresses and irq.  There's no need to
hack anything "to shreds" to get it work work - there's nothing platform
specific in drivers/bus/amba.c.

That is proven by it being used on several ARM dev platforms and several
ST Ericsson SoCs - and it's actually ST Ericsson driving the addition of
the various new features to the bus level of AMBA.

So I think you're doing something wrong, rather than there being anything
wrong with the code.


More information about the devicetree-discuss mailing list