From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] powerpc/esdhc: force the bus width to 4bit
Date: Wed, 31 Oct 2012 09:20:42 +0100 [thread overview]
Message-ID: <20121031092042.3e32d878@amdc308.digital.local> (raw)
In-Reply-To: <5090AE63.2040807@samsung.com>
Hi Jaehoon,
> Hi, Lukasz,
> >>>>>> For the current u-boot codes, only 4bit/1bit SD/SDHC bus width
> >>>>>> is
> >>>>>
> >>>>> support.
> >>>>>
> >>>>>> So for MMC card, we also support 4bit bus width, otherwiase, we
> >>>>>> will
> >>>>>
> >>>>>> get the 12bit bus width, which is not correct:
> >>>>> Andy ... can you please explain? I don't quite understand the
> >>>>> problem, I thought we had no problem supporting 8bit mmc (esp.
> >>>>> if the controller handles that for us mostly).
> >>>>
> >>>> Yes, the controller support 8bit MMC.
> >>>>
> >>>> FSL ESDHC driver set the host_caps = MMC_MODE_4BIT |
> >>>> MMC_MODE_8BIT; But, the current codes for MMC card has been
> >>>> changed to:
> >>>>
> >>>> } else {
> >>>> width = ((mmc->host_caps & MMC_MODE_MASK_WIDTH_BITS) >>
> >>>> MMC_MODE_WIDTH_BITS_SHIFT);
> >
> > Hmm... looks like it is code done by me :-)
> > So little explanation shall be given.
> >
> > This code is necessary for some targets (like Samsung's Goni) which
> > can only support 4 bit MMC mode.
> >
> >>>> for (; width >= 0; width--) {
> >>>> ....
> >>>>
> >>>> So for FSL ESDHC, the width = 3, after implement mmc_switch
> >>>> successfully, will set the bus to 4 * width. Therefore, I will
> >>>> get the 12bit (4 x 3) bus width.
> >> This problem is MMC subsystem's bug.
> >> I think good that will modify the code in mmc.c.
> >> If caps is set to MMC_MODE_4BIT | MMC_MODE_8BIT,
> >> we can see the 12bit support with using "mmcinfo" command
> >>
> >
> > The mmc_set_bus_width(mmc, 4 * width) in conjunction to above code
> > causes the problem.
> then how about using the width[idx] like kernel?
I don't mind :-) if it works at kernel.
>
> Best Regards,
> Jaehoon Chung
> >
> > I agree, that this code shall be refactored.
> > Lei, what do you think?
> >
> >
> >> Best Regards,
> >> Jaehoon Chung
> >>
> >>>>
> >>>> Below is the old codes (width = 2):
> >>>> } else {
> >>>> for (width = EXT_CSD_BUS_WIDTH_8; width >= 0;
> >>>> width--) {
> >>> [...]
> >>>
> >>>
> >>> Uh, so it's a bug in the MMC subsystem?
> >>> Best regards,
> >>> Marek Vasut
> >>> _______________________________________________
> >>> U-Boot mailing list
> >>> U-Boot at lists.denx.de
> >>> http://lists.denx.de/mailman/listinfo/u-boot
> >>>
> >>
> >> _______________________________________________
> >> U-Boot mailing list
> >> U-Boot at lists.denx.de
> >> http://lists.denx.de/mailman/listinfo/u-boot
> >
> >
> >
>
--
Best regards,
Lukasz Majewski
Samsung Poland R&D Center | Linux Platform Group
next prev parent reply other threads:[~2012-10-31 8:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 6:26 [U-Boot] [PATCH] powerpc/esdhc: force the bus width to 4bit Chang-Ming.Huang at freescale.com
2012-10-23 7:24 ` Marek Vasut
2012-10-23 9:23 ` Huang Changming-R66093
2012-10-23 9:50 ` Marek Vasut
2012-10-24 3:11 ` Huang Changming-R66093
2012-10-30 8:43 ` Jaehoon Chung
2012-10-30 17:35 ` Lukasz Majewski
2012-10-31 4:51 ` Jaehoon Chung
2012-10-31 8:20 ` Lukasz Majewski [this message]
2012-10-31 10:43 ` Jaehoon Chung
2012-11-01 4:09 ` Andy Fleming
2012-11-02 1:54 ` Huang Changming-R66093
2012-11-02 2:03 ` Jaehoon Chung
2012-11-02 2:15 ` Huang Changming-R66093
2012-11-02 3:40 ` Marek Vasut
2012-11-02 7:38 ` Lukasz Majewski
[not found] <1351586621-1990-1-git-send-email-Chang-Ming.Huang@freescale.com>
[not found] ` <110EED8CC96DFC488B7E717A2027A27C203263@039-SN1MPN1-003.039d.mgd.msft.net>
[not found] ` <110EED8CC96DFC488B7E717A2027A27C2058C8@039-SN1MPN1-003.039d.mgd.msft.net>
2012-11-01 2:29 ` Marek Vasut
[not found] ` <201211010326.29763.marex@denx.de>
[not found] ` <110EED8CC96DFC488B7E717A2027A27C20B95C@039-SN1MPN1-004.039d.mgd.msft.net>
2012-11-01 3:05 ` Marek Vasut
2012-11-01 3:20 ` Huang Changming-R66093
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=20121031092042.3e32d878@amdc308.digital.local \
--to=l.majewski@samsung.com \
--cc=u-boot@lists.denx.de \
/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