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 <[email protected]>
---
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
2010/7/20 Yusuke Goda <[email protected]>:
> 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 <[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]>
This change needs to be modified to test what hardware is present.
this wont work on my hardware TTBOMK.
--
Ian Molton
Linux, Automotive, and other hacking:
http://www.mnementh.co.uk/
On 23 July 2010 12:05, Magnus Damm <[email protected]> wrote:
> 2010/7/20 Yusuke Goda <[email protected]>:
>> 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 <[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]>
>
> On 23 July 2010 12:05, Magnus Damm <[email protected]> wrote:
>> 2010/7/20 Yusuke Goda <[email protected]>:
>>> 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 <[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]>
>>
Hi Ian,
Thanks for your feedback!
On Tue, Jul 27, 2010 at 4:57 PM, Ian Molton <[email protected]> wrote:
> 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
Hi,
Am 20.07.2010 09:52, schrieb Yusuke Goda:
> 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 <[email protected]>
Tested on AP4EVB (sh7372) with SDHC and MMC cards - no regression.
Tested-by: Arnd Hannemann <[email protected]>
On Tue, Jul 27, 2010 at 5:05 PM, Magnus Damm <[email protected]> wrote:
>> On 23 July 2010 12:05, Magnus Damm <[email protected]> wrote:
>>> 2010/7/20 Yusuke Goda <[email protected]>:
>>>> 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 <[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]>
>>>
> On Tue, Jul 27, 2010 at 4:57 PM, Ian Molton <[email protected]> wrote:
>> 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
On Sat, Aug 21, 2010 at 12:06 AM, Arnd Hannemann <[email protected]> wrote:
> Am 20.07.2010 09:52, schrieb Yusuke Goda:
>> 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 <[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