From nobody Wed Apr 16 17:20:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519313792681718.0367430569572; Thu, 22 Feb 2018 07:36:32 -0800 (PST) Received: from localhost ([::1]:39038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosv6-0007XM-IA for importer@patchew.org; Thu, 22 Feb 2018 10:36:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eosiZ-0004kW-9D for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eosiY-0001dk-7c for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:31 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eosiY-0001cp-0c for qemu-devel@nongnu.org; Thu, 22 Feb 2018 10:23:30 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eosiX-00022G-4C for qemu-devel@nongnu.org; Thu, 22 Feb 2018 15:23:29 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 22 Feb 2018 15:22:44 +0000 Message-Id: <20180222152307.7499-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180222152307.7499-1-peter.maydell@linaro.org> References: <20180222152307.7499-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 09/32] sdcard: reorder SDState struct members X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Philippe Mathieu-Daud=C3=A9 place card registers first, this will ease further code movements. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20180215220540.6556-2-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/sd/sd.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 9ac9b63ff8..ce1f2fdf76 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -88,16 +88,21 @@ enum SDCardStates { struct SDState { DeviceState parent_obj; =20 - uint32_t mode; /* current card mode, one of SDCardModes */ - int32_t state; /* current card state, one of SDCardStates */ + /* SD Memory Card Registers */ uint32_t ocr; - QEMUTimer *ocr_power_timer; uint8_t scr[8]; uint8_t cid[16]; uint8_t csd[16]; uint16_t rca; uint32_t card_status; uint8_t sd_status[64]; + + /* Configurable properties */ + BlockBackend *blk; + bool spi; + + 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; @@ -110,8 +115,6 @@ struct SDState { uint8_t pwd[16]; uint32_t pwd_len; uint8_t function_group[6]; - - bool spi; 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! @@ -123,8 +126,7 @@ struct SDState { uint8_t data[512]; qemu_irq readonly_cb; qemu_irq inserted_cb; - BlockBackend *blk; - + QEMUTimer *ocr_power_timer; bool enable; uint8_t dat_lines; bool cmd_line; --=20 2.16.1