qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 11/17] hw/sd: Add eMMC support
Date: Mon, 30 May 2022 19:02:52 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Hi Cédric,

On 18/3/22 14:28, Cédric Le Goater wrote:
The initial eMMC support from Vincent Palatin was largely reworked to
match the current SD framework. The parameters mimick a real 4GB eMMC,
but it can be set to various sizes.

This adds a new QOM object class for EMMC devices.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Link: 
https://lore.kernel.org/r/1311635951-11047-5-git-send-email-vpalatin@chromium.org
[ jms: - Forward ported to QEMU 5.2 ]
Signed-off-by: Joel Stanley <joel@jms.id.au>
[ clg: - ported on aspeed-7.0 patchset
        - HPI activation ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
  hw/sd/sdmmc-internal.h |  97 +++++++++++++++++++
  include/hw/sd/sd.h     |   9 ++
  hw/sd/sd.c             | 205 ++++++++++++++++++++++++++++++++++++++++-
  hw/sd/sdmmc-internal.c |   2 +-
  4 files changed, 311 insertions(+), 2 deletions(-)

+static const SDProto sd_proto_emmc = {

What about renaming as:

                    ... emmc_proto = {

+    .name = "eMMC",
+    .cmd = {
+        [0]         = sd_cmd_GO_IDLE_STATE,
+        [1]         = sd_emmc_cmd_SEND_OP_CMD,

                       = emmc_cmd_SEND_OP_CMD,

+        [2]         = sd_emmc_cmd_ALL_SEND_CID,

                         ...

?

+        [3]         = sd_emmc_cmd_SEND_RELATIVE_ADDR,
+        [5]         = sd_cmd_illegal,
+        [8]         = sd_emmc_cmd_SEND_EXT_CSD,
+        [19]        = sd_cmd_SEND_TUNING_BLOCK,
+        [21]        = sd_emmc_cmd_SEND_TUNING_BLOCK,
+        [41]        = sd_cmd_illegal,
+        [52 ... 54] = sd_cmd_illegal,
+        [55]        = sd_emmc_cmd_APP_CMD,
+        [58]        = sd_cmd_illegal,
+        [59]        = sd_cmd_illegal,
+    },
+};



reply via email to

[Prev in Thread] Current Thread [Next in Thread]