From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Mon, 05 Jul 2010 22:22:45 +0800 Subject: [U-Boot] [PATCH 3/3 v8] mmc: add generic mmc spi driver In-Reply-To: <201007050340.47526.vapier@gentoo.org> References: <1271991214-7937-1-git-send-email-thomas@wytron.com.tw> <1274243867-18608-1-git-send-email-thomas@wytron.com.tw> <201007050340.47526.vapier@gentoo.org> Message-ID: <4C31EAB5.5080108@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, Thank you very much for the review and testing. On 07/05/2010 03:40 PM, Mike Frysinger wrote: > 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:" ? Yes, I will add them. > >> +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 OK. I will remove the last newline. > >> --- /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 ... Please apply the multi-blocks patches (1,2,3/4) from Alagu on 05/12, as Andy said he had applied them. > > 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: > > mmc_spi_request:cmd1 1 40300000 0 > mmc_spi_sendcmd:cmd1 resp4 1 > > Card did not respond to voltage select! It seems the mmc card was not initialized and timed out. Please try remove the OCR_HCS in mmc_send_op_cond() of mmc.c temporarily. cmd.cmdarg = OCR_HCS | mmc->voltages; ---------------------^^^^^^^^^ Best regards, Thomas