From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de,
Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Ramon Fried <rfried.dev@gmail.com>, Roger Knecht <rknecht@pm.me>,
Sean Edmond <seanedmond@microsoft.com>,
Simon Glass <sjg@chromium.org>,
Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [PATCH v2] cmd: mmc: Add mmc reg read command for reading card registers
Date: Tue, 31 Oct 2023 09:26:41 +0100 [thread overview]
Message-ID: <20231031092641.0675aee4@karo-electronics.de> (raw)
In-Reply-To: <20231010124728.7930-1-marex@denx.de>
Hi,
On Tue, 10 Oct 2023 14:47:28 +0200 Marek Vasut wrote:
> Add extension to the 'mmc' command to read out the card registers.
> Currently, only the eMMC OCR/CID/CSD/EXTCSD/RCA/DSR register are
> supported. A register value can either be displayed or read into
> an environment variable.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Cc: Roger Knecht <rknecht@pm.me>
> Cc: Sean Edmond <seanedmond@microsoft.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tobias Waldekranz <tobias@waldekranz.com>
> ---
> V2: - Update documentation
> ---
> cmd/Kconfig | 8 ++++
> cmd/mmc.c | 96 +++++++++++++++++++++++++++++++++++++++++++
> doc/usage/cmd/mmc.rst | 26 ++++++++++++
> 3 files changed, 130 insertions(+)
>
[...]
> + if (!strcmp(argv[2], "ocr")) {
> + printf("OCR: 0x%08x\n", mmc->ocr);
> + if (argv[4])
> + env_set_hex(argv[4], mmc->ocr);
> + return CMD_RET_SUCCESS;
> + }
> + if (!strcmp(argv[2], "rca")) {
> + printf("RCA: 0x%08x\n", mmc->rca);
> + if (argv[4])
> + env_set_hex(argv[4], mmc->rca);
> + return CMD_RET_SUCCESS;
> + }
> + if (!strcmp(argv[2], "extcsd") &&
> + mmc->version >= MMC_VERSION_4_41) {
> + ret = mmc_send_ext_csd(mmc, ext_csd);
> + if (ret)
> + return ret;
return CMD_RET_FAILURE;
Lothar Waßmann
next prev parent reply other threads:[~2023-10-31 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231031060824epcas1p4948c3250847cbc5ffd3cb739c9020fbd@epcas1p4.samsung.com>
2023-10-10 12:47 ` [PATCH v2] cmd: mmc: Add mmc reg read command for reading card registers Marek Vasut
2023-10-31 6:08 ` Jaehoon Chung
2023-10-31 6:29 ` Jaehoon Chung
2023-10-31 7:52 ` Marek Vasut
2023-10-31 8:26 ` Lothar Waßmann [this message]
2023-10-31 11:33 ` Marek Vasut
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=20231031092641.0675aee4@karo-electronics.de \
--to=lw@karo-electronics.de \
--cc=abdellatif.elkhlifi@arm.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=marex@denx.de \
--cc=rfried.dev@gmail.com \
--cc=rknecht@pm.me \
--cc=seanedmond@microsoft.com \
--cc=sjg@chromium.org \
--cc=tobias@waldekranz.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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 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.