[PATCH 12/13] sdhci: Add quirk for controllers with max. block size up to 4096 bytes

Pierre Ossman drzeus at drzeus.cx
Sun Feb 22 02:58:44 EST 2009


On Fri, 13 Feb 2009 17:47:39 +0300
Anton Vorontsov <avorontsov at ru.mvista.com> wrote:

> @@ -831,7 +832,12 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
>  	sdhci_set_transfer_irqs(host);
>  
>  	/* We do not handle DMA boundaries, so set it to max (512 KiB) */
> -	sdhci_writew(host, SDHCI_MAKE_BLKSZ(7, data->blksz), SDHCI_BLOCK_SIZE);
> +	if (host->quirks & SDHCI_QUIRK_MAX_BLK_SZ_4096)
> +		blksz = data->blksz;
> +	else
> +		blksz = SDHCI_MAKE_BLKSZ(7, data->blksz);
> +
> +	sdhci_writew(host, blksz, SDHCI_BLOCK_SIZE);
>  	sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
>  }
>  

Hmm.. I seem to have overlooked this part previously. I guess they've
basically stripped out the DMA boundary stuff and used the bits for
other things?

At this point I'm leaning more towards simply not supporting their
extended block size. After all, is it ever used?

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090221/8cb282b4/attachment.pgp>


More information about the Linuxppc-dev mailing list