[U-Boot] [PATCH] mmc: add generic mmc spi driver
Thomas Chou
thomas at wytron.com.tw
Fri Apr 23 07:55:11 CEST 2010
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.
>> -mike
>>
>>
>
Second thought.
With generic mmc framework, we can instance multiple mmc devices. Then
we can probe one of them when we want.
#ifdef CONFIG_GENERIC_MMC
int board_mmc_init(bd_t *bis)
{
int rc = 0;
#ifdef CONFIG_MMC_SPI
extern int mmc_spi_init(uint bus, uint cs, uint speed, uint mode);
mmc_spi_init(CONFIG_MMC_SPI_BUS,
CONFIG_MMC_SPI_CS_0,
CONFIG_MMC_SPI_SPEED,
CONFIG_MMC_SPI_MODE);
mmc_spi_init(CONFIG_MMC_SPI_BUS,
CONFIG_MMC_SPI_CS_1,
CONFIG_MMC_SPI_SPEED,
CONFIG_MMC_SPI_MODE);
#endif
return rc;
}
#endif
Cheers,
Thomas
More information about the U-Boot
mailing list