From: Leif Lindholm <leif.lindholm@linaro.org>
To: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Jun Nie <jun.nie@linaro.org>,
edk2-devel@lists.01.org, jason.liu@linaro.org,
shawn.guo@linaro.org
Subject: Re: [PATCH] EmbeddedPkg/MmcDxe: Add non-DDR timing mode support
Date: Thu, 8 Jun 2017 17:55:12 +0100 [thread overview]
Message-ID: <20170608165512.GB26676@bivouac.eciton.net> (raw)
In-Reply-To: <a75d27cd-c8f4-7e10-3e6c-7a3e1a5978ef@linaro.org>
On Thu, Jun 08, 2017 at 04:39:44PM +0800, Haojian Zhuang wrote:
> On 2017/6/8 16:12, Jun Nie wrote:
> >Only DDR mode is support for 8bit mode currently. Add
> >non-DDR case when configuring ECSD.
> >
> >Contributed-under: TianoCore Contribution Agreement 1.0
> >Signed-off-by: Jun Nie <jun.nie@linaro.org>
> >---
> > EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> >index 574a77e..5c0d7e7 100644
> >--- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> >+++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> >@@ -286,7 +286,10 @@ InitializeEmmcDevice (
> > }
> > Status = Host->SetIos (Host, BusClockFreq, 8, TimingMode[Idx]);
> > if (!EFI_ERROR (Status)) {
> >- Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT);
> >+ if (Idx < 2)
>
> It's better to avoid hardcoded value at here. Maybe you can use switch &
> case on TimingMode array at here.
Yes, that would also work.
Indeed, if any other possible values than EMMC_BUS_WIDTH_DDR_8BIT or
EMMC_BUS_WIDTH_8BIT could be likely in the future, that would be the
preferable solution.
Regards,
Leif
> >+ Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT);
> >+ else
> >+ Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_8BIT);
> > if (EFI_ERROR (Status)) {
> > DEBUG ((DEBUG_ERROR, "InitializeEmmcDevice(): Failed to set EXTCSD bus width, Status:%r\n", Status));
> > }
> >
>
> Best Regards
> Haojian
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2017-06-08 16:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 8:12 [PATCH] EmbeddedPkg/MmcDxe: Add non-DDR timing mode support Jun Nie
2017-06-08 8:39 ` Haojian Zhuang
2017-06-08 16:55 ` Leif Lindholm [this message]
2017-06-09 3:54 ` Jun Nie
2017-06-08 16:51 ` Leif Lindholm
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-list 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=20170608165512.GB26676@bivouac.eciton.net \
--to=devel@edk2.groups.io \
/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