From patchwork Wed Jan 3 21:24:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 855242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bS2gmJQt"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBkYp6W3jz9s7G for ; Thu, 4 Jan 2018 08:28:14 +1100 (AEDT) Received: from localhost ([::1]:37623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWqa5-0004Ih-0C for incoming@patchwork.ozlabs.org; Wed, 03 Jan 2018 16:28:13 -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) 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) 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) From: =?utf-8?q?Philippe_Mathieu-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 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_M?= =?utf-8?q?athieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Paul Brook , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" place card registers first, this will ease further code movements. Signed-off-by: Philippe Mathieu-Daudé 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; - 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]; 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; bool enable; };