[U-Boot] convention for SPI dummy data?

Wolfgang Wegner wolfgang at leila.ping.de
Fri Apr 23 17:18:29 CEST 2010


Hi Mike,

On Fri, Apr 23, 2010 at 11:08:10AM -0400, Mike Frysinger wrote:
> On Friday 23 April 2010 04:43:07 Wolfgang Wegner wrote:
> > However, one of the things I had to change was the dummy data sent
> > out by SPI for read-only transactions. The original driver had all
> > zeros, for SD/MMC all ones (0xFF) is needed.
> > 
> > Is such a change acceptable, or is there any configuration option/flag
> > I could use?
> 
> if it isnt part of the SPI/MMC spec, use a config option named like IDLE_VAL.  

the problem exists in the (coldfire) SPI driver, not in the MMC/SD code.
(For SD, the spec IMHO clearly states 0xFF for all idle transfers.)

> changing the default to 0xff is OK i think.

I could add CONFIG_SPI_IDLE_VAL and default it to 0x0 in the coldfire
SPI driver. In case one wants to use MMC/SD with this driver, one could
then add CONFIG_SPI_IDLE_VAL as 0xFF in the board to override it.
(Only pitfall is that the current 0x0 is used for 8- as well as 16-bit
transfers...)

ok?

> -mike

Regards,
Wolfgang



More information about the U-Boot mailing list