
On Wednesday, May 19, 2010 00:37:47 Thomas Chou wrote:
--- /dev/null +++ b/common/cmd_mmc_spi.c
- printf("%s: %d at %u:%u %u %u\n", mmc->name, mmc->block_dev.dev,
bus, cs, speed, mode);
this is a bit terse. how about prefixing the hz output with like "hz:" and the mode with like "mode:" ?
+U_BOOT_CMD(
- mmc_spi, 4, 0, do_mmc_spi,
- "mmc_spi setup",
- "[bus:]cs [hz] [mode] - setup mmc_spi device on given\n"
- " SPI bus and chip select\n"
+);
there should be no newline at the end of the help string
--- /dev/null +++ b/drivers/mmc/mmc_spi.c +struct mmc *mmc_spi_init(uint bus, uint cs, uint speed, uint mode) +{
- struct mmc *mmc;
- mmc->b_max = MMC_SPI_MAX_BLOCKS;
do you have some local modification ? i dont see b_max anywhere in include/mmc.h ...
unfortunately though, i tried this on my system and it doesnt seem to work. using a simple SPI<->MMC card, the old mmc_spi driver works on my board, but booting the new u-boot and running the same things shows:
bfin> mmc_spi 4 30000000 3 MMC_SPI: 0 at 0:4 30000000 3
bfin> mmc list MMC_SPI: 0
bfin> mmcinfo Card did not respond to voltage select! Device: MMC_SPI Manufacturer ID: 0 OEM: 0 Name: Tran Speed: 0 Rd Block Len: 0 MMC version 0.0 High Capacity: No Capacity: 0 Bus Width: 1-bit
enabling debugging in the driver shows this: bfin> mmcinfo mmc_spi_init_p: clock 0 mmc_spi_set_ios: clock 0 mmc_spi_set_ios: clock 400000 mmc_spi_request:cmd0 0 0 0 mmc_spi_sendcmd:cmd0 resp6 1 mmc_spi_request:cmd8 15 1aa 0 mmc_spi_sendcmd:cmd8 resp8 ff mmc_spi_request:cmd55 15 0 0 mmc_spi_sendcmd:cmd55 resp6 5 mmc_spi_request:cmd0 0 0 0 mmc_spi_sendcmd:cmd0 resp6 1 mmc_spi_request:cmd1 1 40300000 0 mmc_spi_sendcmd:cmd1 resp6 1 mmc_spi_request:cmd1 1 40300000 0 mmc_spi_sendcmd:cmd1 resp6 1 mmc_spi_request:cmd1 1 40300000 0 mmc_spi_sendcmd:cmd1 resp4 1 mmc_spi_request:cmd1 1 40300000 0 mmc_spi_sendcmd:cmd1 resp4 1 <these last 2 lines repeat for a while> Card did not respond to voltage select! ... -mike