[PATCH 1/3 v2] sdhci: Add auto CMD12 support for eSDHC driver
Grant Likely
grant.likely at secretlab.ca
Mon Aug 9 15:50:24 EST 2010
On Wed, Aug 4, 2010 at 8:14 PM, Zang Roy-R61911 <r61911 at freescale.com> wrote:
>> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> > index c6d1bd8..a92566e 100644
>> > --- a/drivers/mmc/host/sdhci.c
>> > +++ b/drivers/mmc/host/sdhci.c
>> > @@ -817,8 +817,12 @@ static void
>> sdhci_set_transfer_mode(struct sdhci_host *host,
>> > WARN_ON(!host->data);
>> >
>> > mode = SDHCI_TRNS_BLK_CNT_EN;
>> > - if (data->blocks > 1)
>> > - mode |= SDHCI_TRNS_MULTI;
>> > + if (data->blocks > 1) {
>> > + if (host->quirks &
>> SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
>> > + mode |= SDHCI_TRNS_MULTI |
>> SDHCI_TRNS_ACMD12;
>> > + else
>> > + mode |= SDHCI_TRNS_MULTI;
>>
>> nit:
>> + mode |= SDHCI_TRNS_MULTI;
>> + if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
>> + mode |= SDHCI_TRNS_ACMD12;
>>
>> Clearer, no?
> why?
Shorter lines, fewer lines, and the SDHCI_TRNS_MULTI is more obviously
unconditional. But as I said, it is a nitpick.
g.
More information about the Linuxppc-dev
mailing list