[PATCH 2/16] SPI: Refactor spi-orion to use SPI framework queue.

Andrew Lunn andrew at lunn.ch
Mon Jul 23 06:49:11 EDT 2012


On Mon, Jul 23, 2012 at 11:23:36AM +0100, Mark Brown wrote:
> On Mon, Jul 23, 2012 at 12:16:41PM +0200, Andrew Lunn wrote:
> > On Mon, Jul 23, 2012 at 10:37:47AM +0100, Mark Brown wrote:
> 
> > > The bit I was saying was most low risk was the actual DT changes, as
> > > opposed to the bits that parse and use the DT.
> 
> > Ah, O.K. I understood you wrongly. I actually think they are the most
> > dangerous part. A board booting with these DT changes, and without the
> > driver enablement for DT is likely to fail to find its root
> > filesystem.
> 
> Why would that be?  If there's no DT support for the driver it'll just
> ignore the DT.

Yes, it ignores the DT. However, SPI driver never gets
instantiated. The FLASH chip on the SPI bus never gets
instantiated. MTD partitions are probably created, but since the
underlying device is missing, they don't work and the root filesystem
is not available.
 
There is no logic in the board code to first try DT, and if that
fails, use old fashioned platform_device instantiating of the drivers.

I've also had bad experiences when we have the old platform_device
instantiating plus DT also instantiating the same device.

The only way i've found to convert an existing board from
platform_device to DT is to first add DT support to the driver, and
then atomically swap platform_device structures for DT descriptions.

Andrew



More information about the linux-arm-kernel mailing list