From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Mon, 26 Apr 2010 22:37:07 +0800 Subject: [U-Boot] [PATCH] mmc: add generic mmc spi driver In-Reply-To: <201004250256.10907.vapier@gentoo.org> References: <1271991214-7937-1-git-send-email-thomas@wytron.com.tw> <4BD11C63.2050005@wytron.com.tw> <4BD1363F.9030204@wytron.com.tw> <201004250256.10907.vapier@gentoo.org> Message-ID: <4BD5A513.100@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 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