From nobody Tue Oct 28 12:33:13 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; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515014962269820.3434369066131; Wed, 3 Jan 2018 13:29:22 -0800 (PST) Received: from localhost ([::1]:37632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWqbB-0005VB-FH for importer@patchew.org; Wed, 03 Jan 2018 16:29:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWqWq-0001oe-IX for qemu-devel@nongnu.org; Wed, 03 Jan 2018 16:24:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWqWp-0007S0-OO for qemu-devel@nongnu.org; Wed, 03 Jan 2018 16:24:52 -0500 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:39745) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWqWp-0007Re-Ju for qemu-devel@nongnu.org; Wed, 03 Jan 2018 16:24:51 -0500 Received: by mail-qk0-x242.google.com with SMTP id c5so3236865qkg.6 for ; Wed, 03 Jan 2018 13:24:51 -0800 (PST) Received: from x1.lan ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id a19sm1104402qtj.74.2018.01.03.13.24.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 13:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Awj6dxAsnqIRgMqnLPLS2WYOAAqorRUgnO+UEQ5UFDM=; b=bS2gmJQte2Lx3WnRwiHxW3YPlgJZ0ruZkS2tPA/Njxw88mZ9UOsxTMTDCISipsG/B0 XABXqALhRkObE+IAnTaLK60WqJ+xTTRUoBC6j+N4Q5q/G96PAlrZWtg8oZO0b+MGFcon zSLZ2ORYcoVpYdbRWP75fIa5G4iOFfTePtGcm9xHi9fg3HF1bHq1JWxU9szuHHEt+Gs5 9OpoS15Ce/Md55WMY8S7Jq9it8fu/q8IFaAKJ/uKuw0ePqz1f/lPVw1/ZGNFFmZlJQk8 NkWJAP7dXfMra77Wlg8qXhrIiEnugHCPDP4fubUoTa6eqd/0BEtPGd+G5a1FAbKZWGqA nawA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Awj6dxAsnqIRgMqnLPLS2WYOAAqorRUgnO+UEQ5UFDM=; b=T1OdZ+v+HxIC35xIsxvVoaeO4768cR5UY07gNQl9ckhWu18SwstdFk31+HB9cZzRp7 +1n4V4KIbVqZLgrpSk6eN+nOPE+AbTNe6aL1yPfSNNtUAmhojZwMoqreDDsSk46w3mIX qA56N2max18ee++I6ed2vLFzzajqQGAiMjjgVlRjOX3n2Twji90GQ6rt2ACSzgrNWCUk iWimTg5kPTug1Y3T+4PBYEQTkhphEtxhMVOZjamX3I6yME+izeFvNrO2t/dFC/hf8cCS QgjWiUNHUn5e7hY3vMNa3rK336TXvMmHEK4fbQHp5hYpO9zjbSvP9xnZ7GbXLYbjcCG9 CpSw== X-Gm-Message-State: AKGB3mKPCceQZTXLKyepnyKCf1DMg/WkNDmHWgdQsAdZ9l49LwwNLi9q 30qOfh6H2/6DydGbg0JhISA= X-Google-Smtp-Source: ACJfBostlChu277MQQV13ubuu4BqSZvs6lFpa4CaRGGD7ZqdgZx5Ex+GDO1OHqwlyGzEu5Ktv1NpCQ== X-Received: by 10.55.113.129 with SMTP id m123mr3316652qkc.271.1515014691101; Wed, 03 Jan 2018 13:24:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis , Peter Maydell , Igor Mitsyanko , Andrew Baumann , Olbrich , Andrzej Zaborowski Date: Wed, 3 Jan 2018 18:24:12 -0300 Message-Id: <20180103212436.15762-2-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180103212436.15762-1-f4bug@amsat.org> References: <20180103212436.15762-1-f4bug@amsat.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: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [PATCH v2 01/25] 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: , Cc: "Edgar E . Iglesias" , Prasad J Pandit , Peter Crosthwaite , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Paul Brook , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 place card registers first, this will ease further code movements. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/sd/sd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 7755bedfa0..180c43e218 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -89,16 +89,15 @@ 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]; + uint32_t vhs; bool wp_switch; unsigned long *wp_groups; @@ -113,6 +112,9 @@ struct SDState { uint8_t function_group[6]; =20 bool spi; + + uint32_t mode; /* current card mode, one of SDCardModes */ + int32_t state; /* current card state, one of SDCardStates */ 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! @@ -125,6 +127,7 @@ struct SDState { qemu_irq readonly_cb; qemu_irq inserted_cb; BlockBackend *blk; + QEMUTimer *ocr_power_timer; =20 bool enable; }; --=20 2.15.1