[PATCH] MMC/SD SPI-mode driver

Ian Lepore ian at FreeBSD.org
Wed Apr 10 14:45:56 UTC 2013


On Mon, 2013-04-08 at 11:32 -0700, Adrian Chadd wrote:
> On 8 April 2013 05:33, Aleksandr Rybalko <ray at freebsd.org> wrote:
> 
> >> That way both can occur independently.
> >
> > Agree, but you forget to say about lock/unlock :)
> 
> Yup, locking is implied. :-)
> 
> I don't have any problem with extending the bus with this particular
> method hack to allow the driver to implement an alternate read method.
> 
> Anyone else?
> 
> I'm happy to review a patch against -HEAD that does this:
> 
> * add that new method, same as zrouter
> * add the code to the flash driver, same as zrouter
> * add spi locking in ar71xx_spi to ensure that entire transfers are
> done inside a lock;
> * for that copy read method, have it lock the device, put it back into
> mapped mode, do the copy, put it into SPI mode, unlock the device.
> 
> I think that should make it kick ass.
> 
> Any takers? :)

Why does this need a new method?  Couldn't this be handled as a
platform-specific optimized implementation of a regular transfer, after
Aleksandr's pending changes that make simultaneous bi-directional
transfers optional?

-- Ian




More information about the freebsd-mips mailing list