All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: elad.yi@gmail.com
Cc: linux-mmc@vger.kernel.org, Philip Rakity <prakity@nvidia.com>
Subject: Re: When bus width detection procedure takes place, kernel cannot lock on correct bus width
Date: Fri, 22 Mar 2013 13:06:45 -0400	[thread overview]
Message-ID: <87wqszl5y2.fsf@octavius.laptop.org> (raw)
In-Reply-To: <87ip4qdybr.fsf@octavius.laptop.org> (Chris Ball's message of "Sun, 17 Mar 2013 08:07:20 -0400")

Hi,

On Sun, Mar 17 2013, Chris Ball wrote:
> I've been working on a bringup of an new board in Harmonic Inc.
> This board uses Sandisk iNand eMMC flash.
> I've noticed that the mmc driver keeps detecting 1 bit width although HW
> supports 4 bit, looked into it, and found the problem. In line 571 at mmc.c:
> There is:
>     /* only compare read only fields */
>     err = !((card->ext_csd.raw_partition_support ==
>             bw_ext_csd[EXT_CSD_PARTITION_SUPPORT]) &&
>         (card->ext_csd.raw_erased_mem_count ==
>             bw_ext_csd[EXT_CSD_ERASED_MEM_CONT]) &&
>         (card->ext_csd.rev ==
>             bw_ext_csd[EXT_CSD_REV]) &&
>         (card->ext_csd.raw_ext_csd_structure ==
>                 ...
>
> The problem is that raw_partition_support is not the same when setting width of
> 4 bits instead of 1 bit, and shouldn't be compared at all although it is read
> only.
> this should be changed to:
>     /* only compare read only fields */
>     err = !((card->ext_csd.raw_erased_mem_count ==
>             bw_ext_csd[EXT_CSD_ERASED_MEM_CONT]) &&
>         (card->ext_csd.rev ==
>             bw_ext_csd[EXT_CSD_REV]) &&
>         (card->ext_csd.raw_ext_csd_structure ==
>                 ...

Philip, what do you think?

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2013-03-22 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 12:07 When bus width detection procedure takes place, kernel cannot lock on correct bus width Chris Ball
2013-03-22 17:06 ` Chris Ball [this message]
2013-03-22 18:56 ` Philip Rakity
2013-03-26 15:54   ` Philip Rakity
2013-04-04 19:37 ` Chris Ball

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=87wqszl5y2.fsf@octavius.laptop.org \
    --to=cjb@laptop.org \
    --cc=elad.yi@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.