From: 정재훈 <jh80.chung@samsung.com>
To: "'Simon Glass'" <sjg@chromium.org>,
"'U-Boot Mailing List'" <u-boot@lists.denx.de>
Cc: "'Tom Rini'" <trini@konsulko.com>,
"'Marek Vasut'" <marex@denx.de>,
"'Pavel Herrmann'" <morpheus.ibis@gmail.com>,
"'Peng Fan'" <peng.fan@nxp.com>
Subject: RE: [PATCH v2 22/45] dm: mmc: Allow sandbox emulator to build without writes
Date: Mon, 17 Oct 2022 14:51:19 +0900 [thread overview]
Message-ID: <112301d8e1ec$7abf79d0$703e6d70$@samsung.com> (raw)
In-Reply-To: <20221013122927.636867-23-sjg@chromium.org>
> -----Original Message-----
> From: Simon Glass [mailto:sjg@chromium.org]
> Sent: Thursday, October 13, 2022 9:29 PM
> To: U-Boot Mailing List <u-boot@lists.denx.de>
> Cc: Tom Rini <trini@konsulko.com>; Simon Glass <sjg@chromium.org>; Jaehoon Chung
> <jh80.chung@samsung.com>; Marek Vasut <marex@denx.de>; Pavel Herrmann <morpheus.ibis@gmail.com>;
> Peng Fan <peng.fan@nxp.com>
> Subject: [PATCH v2 22/45] dm: mmc: Allow sandbox emulator to build without writes
>
> When MMC_WRITE is disabled this driver produced a build error. Fix this.
>
> Also update a comment while we are here.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
> ---
>
> (no changes since v1)
>
> drivers/mmc/sandbox_mmc.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
> index 451fe4a4e5a..ba79a5565c3 100644
> --- a/drivers/mmc/sandbox_mmc.c
> +++ b/drivers/mmc/sandbox_mmc.c
> @@ -23,6 +23,8 @@ struct sandbox_mmc_plat {
> #define MMC_CMULT 8 /* 8 because the card is high-capacity */
> #define MMC_BL_LEN_SHIFT 10
> #define MMC_BL_LEN BIT(MMC_BL_LEN_SHIFT)
> +
> +/* Granularity of priv->csize - this is 1MB */
> #define SIZE_MULTIPLE ((1 << (MMC_CMULT + 2)) * MMC_BL_LEN)
>
> struct sandbox_mmc_priv {
> @@ -41,7 +43,6 @@ static int sandbox_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
> struct mmc_data *data)
> {
> struct sandbox_mmc_priv *priv = dev_get_priv(dev);
> - struct mmc *mmc = mmc_get_mmc_dev(dev);
> static ulong erase_start, erase_end;
>
> switch (cmd->cmdidx) {
> @@ -95,10 +96,15 @@ static int sandbox_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
> case SD_CMD_ERASE_WR_BLK_END:
> erase_end = cmd->cmdarg;
> break;
> - case MMC_CMD_ERASE:
> +#if CONFIG_IS_ENABLED(MMC_WRITE)
> + case MMC_CMD_ERASE: {
> + struct mmc *mmc = mmc_get_mmc_dev(dev);
> +
> memset(&priv->buf[erase_start * mmc->write_bl_len], '\0',
> (erase_end - erase_start + 1) * mmc->write_bl_len);
> break;
> + }
> +#endif
> case SD_CMD_APP_SEND_OP_COND:
> cmd->response[0] = OCR_BUSY | OCR_HCS;
> cmd->response[1] = 0;
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
next prev parent reply other threads:[~2022-10-17 5:51 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 12:28 [PATCH v2 00/45] vbe: Implement the full firmware flow Simon Glass
2022-10-13 12:28 ` [PATCH v2 03/45] Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE Simon Glass
2022-10-13 12:28 ` [PATCH v2 04/45] disk: Drop debug messages in part_efi Simon Glass
2022-10-13 15:59 ` Heinrich Schuchardt
2022-10-13 12:28 ` [PATCH v2 05/45] spl: Use binman suffix allow symbols of any SPL etype Simon Glass
2022-10-13 12:28 ` [PATCH v2 06/45] spl: Refactor controls for console output Simon Glass
2022-10-13 12:28 ` [PATCH v2 07/45] spl: Add a separate silence option for SPL Simon Glass
2022-10-13 12:28 ` [PATCH v2 08/45] binman: Allow obtaining a symbol value Simon Glass
2022-10-13 12:28 ` [PATCH v2 09/45] binman: Split out looking up a symbol into a function Simon Glass
2022-10-13 12:28 ` [PATCH v2 10/45] binman: Handle writing ELF symbols in the Entry class Simon Glass
2022-10-13 12:28 ` [PATCH v2 11/45] binman: Support writing symbols into ELF files Simon Glass
2022-10-13 12:28 ` [PATCH v2 12/45] test: Report skippped tests Simon Glass
2022-10-13 16:05 ` Heinrich Schuchardt
2022-10-13 12:28 ` [PATCH v2 13/45] test: Update tests to use the skip feature Simon Glass
2022-10-13 12:28 ` [PATCH v2 14/45] test: Support tests which can only be run manually Simon Glass
2022-10-13 16:14 ` Heinrich Schuchardt
2022-10-14 15:55 ` Simon Glass
2022-10-13 12:28 ` [PATCH v2 15/45] bootstd: Add a way to set up a bootflow Simon Glass
2022-10-13 12:28 ` [PATCH v2 16/45] disk: Rename block functions Simon Glass
2022-10-13 16:17 ` Heinrich Schuchardt
2022-10-13 12:28 ` [PATCH v2 17/45] disk: Rename block_dev to desc Simon Glass
2022-10-13 16:18 ` Heinrich Schuchardt
2022-10-13 12:29 ` [PATCH v2 18/45] dm: blk: Add udevice functions Simon Glass
2022-10-13 12:29 ` [PATCH v2 19/45] usb: Update the test to cover reading and writing Simon Glass
2022-10-13 12:29 ` [PATCH v2 20/45] bloblist: Drop debugging Simon Glass
2022-10-13 12:29 ` [PATCH v2 21/45] dm: blk: mmc: Tidy up some Makefile rules for SPL Simon Glass
2022-10-17 5:50 ` 정재훈
2022-10-13 12:29 ` [PATCH v2 22/45] dm: mmc: Allow sandbox emulator to build without writes Simon Glass
2022-10-17 5:51 ` 정재훈 [this message]
2022-10-13 12:29 ` [PATCH v2 23/45] sandbox: Drop message about writing sandbox state Simon Glass
2022-10-13 12:29 ` [PATCH v2 24/45] image: Move comment for fit_conf_find_compat() Simon Glass
2022-10-13 12:29 ` [PATCH v2 25/45] sandbox: Generalise SPL booting Simon Glass
2022-10-13 12:29 ` [PATCH v2 26/45] sandbox: Add a way to specify the sandbox executable Simon Glass
2022-10-13 12:29 ` [PATCH v2 27/45] image: Add the concept of a phase to FIT Simon Glass
2022-10-13 12:29 ` [PATCH v2 28/45] image: Allow loading a FIT image for a particular phase Simon Glass
2022-10-13 12:29 ` [PATCH v2 29/45] image: Correct strncpy() warning with image_set_name() Simon Glass
2022-10-13 16:23 ` Heinrich Schuchardt
2022-10-14 15:55 ` Simon Glass
2022-10-13 12:29 ` [PATCH v2 30/45] vbe: Rename vbe_fixup to vbe_request Simon Glass
2022-10-13 12:29 ` [PATCH v2 31/45] vbe: Use a warning for a failed requests Simon Glass
2022-10-13 12:29 ` [PATCH v2 32/45] spl: Allow multiple loaders of the same time Simon Glass
2022-10-13 12:29 ` [PATCH v2 33/45] sandbox: Support obtaining the next phase from an image Simon Glass
2022-10-13 12:29 ` [PATCH v2 34/45] vbe: Support selecting operations by SPL phase Simon Glass
2022-10-13 12:29 ` [PATCH v2 35/45] vbe: Support reading the next SPL phase via VBE Simon Glass
2022-10-13 12:29 ` [PATCH v2 36/45] vbe: Move OS implementation into a separate file Simon Glass
2022-10-13 12:29 ` [PATCH v2 37/45] vbe: Drop the U-Boot prefix from the version Simon Glass
2022-10-13 12:29 ` [PATCH v2 38/45] vbe: Add Kconfig options for VPL Simon Glass
2022-10-13 12:29 ` [PATCH v2 39/45] vbe: Add info about the VBE device to the fwupd node Simon Glass
2022-10-13 12:29 ` [PATCH v2 40/45] sandbox: Add an image for VPL Simon Glass
2022-10-13 12:29 ` [PATCH v2 41/45] vpl: Allow signature verification Simon Glass
2022-10-13 12:29 ` [PATCH v2 42/45] vbe: Use a manual test Simon Glass
2022-10-13 12:29 ` [PATCH v2 43/45] vbe: Record which phases loaded using VBE Simon Glass
2022-10-13 12:29 ` [PATCH v2 44/45] vbe: Add a command to show the VBE state Simon Glass
2022-10-13 12:29 ` [PATCH v2 45/45] vbe: Add a test for the VBE flow into U-Boot proper Simon Glass
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='112301d8e1ec$7abf79d0$703e6d70$@samsung.com' \
--to=jh80.chung@samsung.com \
--cc=marex@denx.de \
--cc=morpheus.ibis@gmail.com \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.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