linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Venkatraman S <svenkatr@ti.com>
To: Madhusudhan <madhu.cr@ti.com>,
	linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	kishore.kadiyala@ti.com
Subject: Re: [PATCH]omap hsmmc: fix incorrect capability reporting
Date: Tue, 30 Mar 2010 23:41:27 +0530	[thread overview]
Message-ID: <618f0c911003301111r3781661asa444dd35042772c3@mail.gmail.com> (raw)
In-Reply-To: <002a01cad020$47be5fb0$544ff780@am.dhcp.ti.com>

> Madhusudhan <madhu.cr@ti.com> wrote:
>
>
>> -----Original Message-----
>> From: Venkatraman S
>> Sent: Tuesday, March 30, 2010 9:37 AM
>> To: linux-mmc@vger.kernel.org; linux-omap@vger.kernel.org;
>> kishore.kadiyala@ti.com
>> Cc: Madhusudhan Chikkature
>> Subject: [PATCH]omap hsmmc: fix incorrect capability reporting
>>
>> MMC slots that support 8 bit mode also support 4 bit mode.
>> The capability flag has to reflect this, otherwise SDHC cards operate
>> in 1 bit mode.
>>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> Signed-off-by: Venkatraman S <svenkatr@ti.com>
>> ---
>>  drivers/mmc/host/omap_hsmmc.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>> index 83f0aff..dbf83a6 100644
>> --- a/drivers/mmc/host/omap_hsmmc.c
>> +++ b/drivers/mmc/host/omap_hsmmc.c
>> @@ -2093,7 +2093,7 @@ static int __init omap_hsmmc_probe(struct
>> platform_device *pdev)
>>
>>       if (mmc_slot(host).wires >= 8)
>>               mmc->caps |= MMC_CAP_8_BIT_DATA;
>> -     else if (mmc_slot(host).wires >= 4)
>> +     if (mmc_slot(host).wires >= 4)
>>               mmc->caps |= MMC_CAP_4_BIT_DATA;
>>
>
> Since 8-bit is the max how about:
>
>        if (mmc_slot(host).wires == 8)
>                mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA;
>        if (mmc_slot(host).wires == 4)
>                mmc->caps |= MMC_CAP_4_BIT_DATA;
>
> This would be little easy to read the code.

Sure. Works for me.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-03-30 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 14:37 [PATCH]omap hsmmc: fix incorrect capability reporting Venkatraman S
2010-03-30 15:47 ` Madhusudhan
2010-03-30 18:11   ` Venkatraman S [this message]
2010-03-30 18:29     ` Nishanth Menon
2010-03-30 18:42       ` Venkatraman S
2010-03-31  5:20         ` kishore kadiyala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=618f0c911003301111r3781661asa444dd35042772c3@mail.gmail.com \
    --to=svenkatr@ti.com \
    --cc=kishore.kadiyala@ti.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=madhu.cr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).