[U-Boot] [PATCH] mmc: add generic mmc spi driver

Thomas Chou
2010-04-26T14:37:07Z

On 04/25/2010 02:56 PM, Mike Frysinger wrote:
> On Friday 23 April 2010 01:55:11 Thomas Chou wrote:
>
>> On 04/23/2010 12:04 PM, Thomas Chou wrote:
>>
>>>> it's too bad the new framework doesnt allow for dynamic probing like
>>>> the spi layer. makes it a pain to work with a SPI/MMC card that can have
>>>> the CS changed on the fly.
>>>>
>> Second thought.
>> With generic mmc framework, we can instance multiple mmc devices. Then
>> we can probe one of them when we want.
>>
> i dont think that's a scalable solution. what if you have multiple spi busses
> or 10's of GPIO CS's ? only way to scale is to have a new subcommand so
> people can do it themselves. a simple CONFIG_CMD_MMC_SPI command which
> forwards along calls to mmc_spi_init() on the fly would work.
> -mike
>
Hi Mike,

I have resolved the SDHC issue and have tested various MMC/SD cards,
including writing. I will submit the patch tomorrow.

I have moved spi slave setup so that we can change the cs on the fly. We
could add a subcommand, like,

mmc_spi [bus:]cs

Where should I place this command? in a new file in common dir or inside
the mmc_spi driver?

Cheers,
Thomas