Re: [PATCH 4/4] mmc: mmci: Fix incorrect handling of HW flow control for SDIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 27, 2011 at 09:46:56AM +0200, Ulf Hansson wrote:
>  	/* The ST Micro variants has a special bit to enable SDIO */
>  	if (variant->sdio && host->mmc->card)
> -		if (mmc_card_sdio(host->mmc->card))
> +		if (mmc_card_sdio(host->mmc->card)) {
> +			/*
> +			 * The ST Micro variants has a special bit
> +			 * to enable SDIO.
> +			 */
>  			datactrl |= MCI_ST_DPSM_SDIOEN;
>  
> +			/*
> +			 * The ST Micro variant for SDIO transfer sizes
> +			 * less then or equal to 8 bytes needs to have clock
> +			 * H/W flow control disabled. Since flow control is
> +			 * not really needed for anything that fits in the
> +			 * FIFO, we can disable it for any write smaller
> +			 * than the FIFO size.
> +			 */
> +			if ((host->size <= variant->fifosize) &&
> +			    (data->flags & MMC_DATA_WRITE))
> +				writel(readl(host->base + MMCICLOCK) &
> +				       ~variant->clkreg_enable,
> +				       host->base + MMCICLOCK);
> +			else
> +				writel(readl(host->base + MMCICLOCK) |
> +				       variant->clkreg_enable,
> +				       host->base + MMCICLOCK);
> +		}

Shouldn't this also re-enable the ST hardware flow control for non-SDIO
cards?
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux