[PATCH] MMC/SD SPI-mode driver

Adrian Chadd adrian at freebsd.org
Sun Apr 7 02:57:07 UTC 2013


On 6 April 2013 16:24, Aleksandr Rybalko <ray at freebsd.org> wrote:

>> The other question is how we implement it. You've implemented a "get
>> block" device method. That's a very atheros chipset specific hack just
>> to get accelerated flash IO. Is there perhaps a better way to approach
>> this?
>
> As I see, no way to put data back to flash.

Well, look at the Linux code. If there's a read that can be satisfied
by a copy, it:

* puts the flash device back into mapped mode;
* does the transfer;
* puts the flash device back into SPI mode.

That way both can occur independently.

>> What about the 8 versus 32 bit shifting that I see in the driver? Are
>> we able to actually shift 32 bits at a time?
>
> Currently we do 1 bit shifting :))) Pure, 1-bit control.
> Maybe you (as Atheros guy) know how to shift more :)))

Writes are clocked out like that, sure. But if I read the linux code
right, they do up to 32 bits of shifting at once, then do a 32 bit
read.

Rather than us shifting a byte in/out at a time over SPI.



Adrian


More information about the freebsd-mips mailing list