From: Mike Frysinger Date: Mon, 5 Jul 2010 03:40:44 -0400 Subject: [U-Boot] [PATCH 3/3 v8] mmc: add generic mmc spi driver In-Reply-To: <1274243867-18608-1-git-send-email-thomas@wytron.com.tw> References: <1271991214-7937-1-git-send-email-thomas@wytron.com.tw> <1274243867-18608-1-git-send-email-thomas@wytron.com.tw> Message-ID: <201007050340.47526.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Card did not respond to voltage select! ... -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20100705/d2acad0b/attachment.pgp