tmio_mmc: Allow 2 byte requests in 4-bit mode
Subsystems (2)
PATCH 1/1 tmio_mmc: Allow 2 byte requests in 4-bit mode
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.
--- drivers/mmc/host/tmio_mmc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/host/tmio_mmc.c +2 -2
@@ -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 ;
Signature · 1 line
1.7.0
2010/7/20 Yusuke Goda <[email protected]>:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>
With this patch applied I can use SDIO cards in polling mode with the tmio-mmc driver. Tested with the SDHI hardware block on sh7372 using the b43 driver and BCM4318 hardware and the unfortunately out-of-tree AR6002 "android" driver.
This change needs to be modified to test what hardware is present. this wont work on my hardware TTBOMK.
Signature · 3 lines
Ian Molton Linux, Automotive, and other hacking: http://www.mnementh.co.uk/
Quoted 13 lines · Magnus Damm
2010/7/20 Yusuke Goda <[email protected]>:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>With this patch applied I can use SDIO cards in polling mode with the tmio-mmc driver. Tested with the SDHI hardware block on sh7372 using the b43 driver and BCM4318 hardware and the unfortunately out-of-tree AR6002 "android" driver.
Acked-by Magnus Damm <[email protected]>
Quoted 7 lines · Magnus Damm
Quoted 6 lines
2010/7/20 Yusuke Goda <[email protected]>:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>
Quoted 7 lines
Quoted 7 lines
With this patch applied I can use SDIO cards in polling mode with the tmio-mmc driver. Tested with the SDHI hardware block on sh7372 using the b43 driver and BCM4318 hardware and the unfortunately out-of-tree AR6002 "android" driver.
Acked-by Magnus Damm <[email protected]>
Hi Ian,
Thanks for your feedback!
Quoted 2 lines · Ian Molton
This change needs to be modified to test what hardware is present. this wont work on my hardware TTBOMK.
Ok, just curious, on which platform did you test it?
On SDHI hardware the 2-byte access works just fine in 4-bit mode.
Thanks,
/ magnus
Quoted 15 lines · Magnus Damm
Quoted 7 lines · Magnus Damm
Quoted 6 lines
2010/7/20 Yusuke Goda <[email protected]>:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>Quoted 7 lines
Quoted 7 lines
With this patch applied I can use SDIO cards in polling mode with the tmio-mmc driver. Tested with the SDHI hardware block on sh7372 using the b43 driver and BCM4318 hardware and the unfortunately out-of-tree AR6002 "android" driver.
Acked-by Magnus Damm <[email protected]>
Quoted 7 lines
Quoted 2 lines · Ian Molton
This change needs to be modified to test what hardware is present. this wont work on my hardware TTBOMK.
Ok, just curious, on which platform did you test it?
On SDHI hardware the 2-byte access works just fine in 4-bit mode.
Hi Ian,
Any update on this? I'd like to see this patch upstream since it unbreaks SDIO support for platforms with SDHI controllers.
I have a BCM4318-based SDIO card that I can send with snail mail from Japan if anyone is interested in testing on non-SDHI platforms.
Thanks,
/ magnus
Hi,
Am 20.07.2010 09:52, schrieb Yusuke Goda:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>
Tested on AP4EVB (sh7372) with SDHC and MMC cards - no regression.
Quoted 9 lines · Arnd Hannemann
Am 20.07.2010 09:52, schrieb Yusuke Goda:
Quoted 4 lines
Adjust the
tmio_mmcblock 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 <[email protected]>Tested on AP4EVB (sh7372) with SDHC and MMC cards - no regression.
Tested-by Arnd Hannemann <[email protected]>
Hi Arnd,
With both you, Goda-san and me testing it certainly looks like this one also is ok on platforms with SDHI.
Thanks a lot!
/ magnus