mmc: Allow 2 byte requests in 4-bit mode for tmio_mmc

Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit
mode if the hardware supports it.

Tested with the SDHI hardware block included in sh7724.

Signed-off-by: Yusuke Goda <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Acked-by: Magnus Damm <[email protected]>
Tested-by: Arnd Hannemann <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
Yusuke Goda 2010-08-30 11:50:19 +01:00 • committed by Samuel Ortiz
commit f1334fb3c3
3 changed files with 23 additions and 5 deletions

View file

@ -125,6 +125,12 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
mmc_data->capabilities |= p->tmio_caps;
}
/*
* All SDHI blocks support 2-byte and larger block sizes in 4-bit
* bus width mode.
*/
mmc_data->flags |= TMIO_MMC_BLKSZ_2BYTES;
if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) {
priv->param_tx.slave_id = p->dma_slave_tx;
priv->param_rx.slave_id = p->dma_slave_rx;