[PATCH v2 1/7] mmc: mxs-mmc: add mmc host driver for i.MX23/28

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Feb 15 09:13:25 EST 2011


On Wed, Feb 16, 2011 at 06:03:12AM +0800, Shawn Guo wrote:
> On Mon, Feb 14, 2011 at 04:59:59PM +0000, Russell King - ARM Linux wrote:
> > You really should be testing for MMC_RSP_PRESENT and MMC_RSP_136
> > here.  The response types are made up of a bitfield which allows
> > you to detect what's required rather than having to decode the
> > response type itself.
> > 
> Please review the update.
> 
>         if (mmc_resp_type(cmd) & MMC_RSP_PRESENT) {
>                 if (mmc_resp_type(cmd) & MMC_RSP_136) {
>                         cmd->resp[3] = readl(host->base + HW_SSP_SDRESP0);
>                         cmd->resp[2] = readl(host->base + HW_SSP_SDRESP1);
>                         cmd->resp[1] = readl(host->base + HW_SSP_SDRESP2);
>                         cmd->resp[0] = readl(host->base + HW_SSP_SDRESP3);
>                 } else {
>                         cmd->resp[0] = readl(host->base + HW_SSP_SDRESP0);
>                 }
>         }

Looks right to me.



More information about the linux-arm-kernel mailing list