qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	"Edgar E . Iglesias" <edgar.iglesias@xilinx.com>,
	Alistair Francis <alistair@alistair23.me>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 1/4] sdcard: Update the SDState documentation
Date: Wed,  9 May 2018 03:01:01 -0300	[thread overview]
Message-ID: <20180509060104.4458-2-f4bug@amsat.org> (raw)
In-Reply-To: <20180509060104.4458-1-f4bug@amsat.org>

Add more descriptive comments to keep a clear separation
between static property vs runtime changeable.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/sd/sd.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 235e0518d6..5fb4787671 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -90,12 +90,15 @@ struct SDState {
     uint32_t card_status;
     uint8_t sd_status[64];
 
-    /* Configurable properties */
+    /* Static properties */
+
     BlockBackend *blk;
     bool spi;
 
-    uint32_t mode;    /* current card mode, one of SDCardModes */
-    int32_t state;    /* current card state, one of SDCardStates */
+    /* Runtime changeables */
+
+    uint32_t mode;    /** current card mode, one of #SDCardModes */
+    int32_t state;    /** current card state, one of #SDCardStates */
     uint32_t vhs;
     bool wp_switch;
     unsigned long *wp_groups;
@@ -109,8 +112,9 @@ struct SDState {
     uint32_t pwd_len;
     uint8_t function_group[6];
     uint8_t current_cmd;
-    /* True if we will handle the next command as an ACMD. Note that this does
-     * *not* track the APP_CMD status bit!
+    /**
+     * #True if we will handle the next command as an ACMD.
+     * Note that this does *not* track the APP_CMD status bit!
      */
     bool expecting_acmd;
     uint32_t blk_written;
-- 
2.17.0

  reply	other threads:[~2018-05-09  6:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  6:01 [Qemu-devel] [PATCH v2 0/4] SDCard: support UHS-I Philippe Mathieu-Daudé
2018-05-09  6:01 ` Philippe Mathieu-Daudé [this message]
2018-05-09 15:42   ` [Qemu-devel] [PATCH v2 1/4] sdcard: Update the SDState documentation Alistair Francis
2018-05-10  0:24     ` Philippe Mathieu-Daudé
2018-05-14 15:49       ` Peter Maydell
2018-05-14 17:07         ` Philippe Mathieu-Daudé
2018-05-09  6:01 ` [Qemu-devel] [PATCH v2 2/4] sdcard: Correct CRC16 offset in sd_function_switch() Philippe Mathieu-Daudé
2018-05-14 15:50   ` Peter Maydell
2018-05-09  6:01 ` [Qemu-devel] [PATCH v2 3/4] sdcard: Implement the UHS-I SWITCH_FUNCTION entries (Spec v3) Philippe Mathieu-Daudé
2018-05-14 15:38   ` Peter Maydell
2018-05-22  5:11     ` Philippe Mathieu-Daudé
2018-05-22 23:05       ` Philippe Mathieu-Daudé
2018-05-09  6:01 ` [Qemu-devel] [PATCH v2 4/4] sdcard: Add a 'uhs' property, update the OCR register ACCEPT_SWITCH_1V8 bit Philippe Mathieu-Daudé

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=20180509060104.4458-2-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alistair@alistair23.me \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).