linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tmio_mmc: Allow 2 byte requests in 4-bit mode
@ 2010-07-20  7:52 Yusuke Goda
  2010-07-23 11:05 ` Magnus Damm
  2010-08-20 15:06 ` Arnd Hannemann
  0 siblings, 2 replies; 7+ messages in thread
From: Yusuke Goda @ 2010-07-20  7:52 UTC (permalink / raw)
  To: ian, damm, sameo, Paul Mundt, g.liakhovetski, linux-mmc,
	linux-kernel
  Cc: Andrew Morton

Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit mode.
Tested with the SDHI hardware block included in sh7724.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
---
 drivers/mmc/host/tmio_mmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index ee7d0a5..f49d945 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -660,8 +660,8 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
 	pr_debug("setup data transfer: blocksize %08x  nr_blocks %d\n",
 		 data->blksz, data->blocks);

-	/* Hardware cannot perform 1 and 2 byte requests in 4 bit mode */
-	if (data->blksz < 4 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) {
+	/* Hardware cannot perform 1 byte requests in 4 bit mode */
+	if (data->blksz < 2 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) {
 		pr_err("%s: %d byte block unsupported in 4 bit mode\n",
 		       mmc_hostname(host->mmc), data->blksz);
 		return -EINVAL;
-- 
1.7.0




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-08-20 23:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20  7:52 [PATCH] tmio_mmc: Allow 2 byte requests in 4-bit mode Yusuke Goda
2010-07-23 11:05 ` Magnus Damm
2010-07-27  7:57   ` Ian Molton
2010-07-27  8:05     ` Magnus Damm
2010-08-20 22:59       ` Magnus Damm
2010-08-20 15:06 ` Arnd Hannemann
2010-08-20 23:01   ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).