From: Leif Lindholm <leif.lindholm@linaro.org>
To: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: ryan.harkin@linaro.org, edk2-devel@lists.01.org,
ard.biesheuvel@linaro.org
Subject: Re: [PATCH v4 02/11] MmcDxe: move ECSD into CardInfo structure
Date: Tue, 8 Nov 2016 20:27:08 +0000 [thread overview]
Message-ID: <20161108202708.GJ27644@bivouac.eciton.net> (raw)
In-Reply-To: <1478618476-12608-3-git-send-email-haojian.zhuang@linaro.org>
On Tue, Nov 08, 2016 at 11:21:07PM +0800, Haojian Zhuang wrote:
> Since ECSD also describes the information of card, move it into
> structure CardInfo.
I like the fact that you have split out the "move ECSD to CARD_INFO"
and "declare ECSD structure", to keep the two logically separate
modifications apart.
However, it would be better if "declare ECSD structure" followed
directly after this one.
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> ---
> EmbeddedPkg/Universal/MmcDxe/Mmc.h | 1 +
> EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 5 ++---
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> index 46a156c..4f132c6 100644
> --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> @@ -138,6 +138,7 @@ typedef struct {
> OCR OCRData;
> CID CIDData;
> CSD CSDData;
> + UINT32 ECSD[128]; // MMC V4 extended card specific
> } CARD_INFO;
>
> typedef struct _MMC_HOST_INSTANCE {
> diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> index 3f72b7f..578fcb6 100644
> --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
> @@ -39,7 +39,6 @@ EmmcIdentificationMode (
> EFI_BLOCK_IO_MEDIA *Media;
> EFI_STATUS Status;
> UINT32 RCA;
> - UINT32 ECSD[128];
>
> Host = MmcHostInstance->MmcHost;
> Media = MmcHostInstance->BlockIo.Media;
> @@ -91,7 +90,7 @@ EmmcIdentificationMode (
> DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD fetch error, Status=%r.\n", Status));
> }
>
> - Status = Host->ReadBlockData (Host, 0, 512, ECSD);
> + Status = Host->ReadBlockData (Host, 0, 512, (UINT32 *)&(MmcHostInstance->CardInfo.ECSD));
> if (EFI_ERROR (Status)) {
> DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD read error, Status=%r.\n", Status));
> return Status;
> @@ -104,7 +103,7 @@ EmmcIdentificationMode (
> Media->LogicalBlocksPerPhysicalBlock = 1;
> Media->IoAlign = 4;
> // Compute last block using bits [215:212] of the ECSD
> - Media->LastBlock = ECSD[EMMC_ECSD_SIZE_OFFSET] - 1; // eMMC isn't supposed to report this for
> + Media->LastBlock = MmcHostInstance->CardInfo.ECSD[EMMC_ECSD_SIZE_OFFSET] - 1; // eMMC isn't supposed to report this for
> // Cards <2GB in size, but the model does.
>
> // Setup card type
> --
> 2.7.4
>
next prev parent reply other threads:[~2016-11-08 20:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 15:21 [PATCH v4 00/11] enhance MMC Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 01/11] MmcDxe: wait OCR busy bit free Haojian Zhuang
2016-11-08 19:27 ` Leif Lindholm
2016-11-08 15:21 ` [PATCH v4 02/11] MmcDxe: move ECSD into CardInfo structure Haojian Zhuang
2016-11-08 20:27 ` Leif Lindholm [this message]
2016-11-08 15:21 ` [PATCH v4 03/11] MmcDxe: add SPEC_VERS field in CSD structure Haojian Zhuang
2016-11-08 20:27 ` Leif Lindholm
2016-11-08 15:21 ` [PATCH v4 04/11] MmcDxe: add interface to change io width and speed Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 05/11] MmcDxe: declare ECSD structure Haojian Zhuang
2016-11-08 20:43 ` Leif Lindholm
2016-11-09 0:34 ` Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 06/11] MmcDxe: set io bus width before reading EXTCSD Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 07/11] MmcDxe: Fix uninitialized mediaid for SD Haojian Zhuang
2016-11-08 23:59 ` Leif Lindholm
2016-11-13 6:46 ` Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 08/11] MmcDxe: set iospeed and bus width in SD stack Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 09/11] MmcDxe: expand to support multiple blocks Haojian Zhuang
2016-11-09 0:14 ` Leif Lindholm
2016-11-08 15:21 ` [PATCH v4 10/11] PL180: update for indentifying SD Haojian Zhuang
2016-11-08 15:21 ` [PATCH v4 11/11] PL180: set variable length for CMD6 and ACMD51 Haojian Zhuang
2016-11-08 17:32 ` [PATCH v4 00/11] enhance MMC Ryan Harkin
2016-11-09 0:30 ` Haojian Zhuang
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=20161108202708.GJ27644@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