From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sw9g9-0003mk-NF for qemu-devel@nongnu.org; Tue, 31 Jul 2012 06:27:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sw9g8-0003FH-C9 for qemu-devel@nongnu.org; Tue, 31 Jul 2012 06:27:53 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:57368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sw9g8-0003FB-6H for qemu-devel@nongnu.org; Tue, 31 Jul 2012 06:27:52 -0400 Received: from eusync4.samsung.com (mailout4.w1.samsung.com [210.118.77.14]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8000KQST3GT410@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Tue, 31 Jul 2012 11:28:28 +0100 (BST) Received: from [106.109.9.180] by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M80005J1T2BFP50@eusync4.samsung.com> for qemu-devel@nongnu.org; Tue, 31 Jul 2012 11:27:49 +0100 (BST) Message-id: <5017B323.4090609@samsung.com> Date: Tue, 31 Jul 2012 14:27:47 +0400 From: Igor Mitsyanko MIME-version: 1.0 References: <1343417387-13953-1-git-send-email-i.mitsyanko@samsung.com> <1343417387-13953-9-git-send-email-i.mitsyanko@samsung.com> <87a9ygi8bn.fsf@blackfin.pond.sub.org> In-reply-to: <87a9ygi8bn.fsf@blackfin.pond.sub.org> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4 08/12] hw/sd.c: add SD card save/load support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, peter.maydell@linaro.org, benoit.canet@gmail.com, wdongxu@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, e.voevodin@samsung.com, qemu-devel@nongnu.org, andrew.zaborowski@intel.com, kyungmin.park@samsung.com, pbonzini@redhat.com On 07/31/2012 01:33 PM, Markus Armbruster wrote: > Igor Mitsyanko writes: > >> This patch updates SD card model to support save/load of card's state. >> >> Signed-off-by: Igor Mitsyanko >> --- >> hw/sd.c | 88 +++++++++++++++++++++++++++++++++++++++++++++----------------- >> 1 files changed, 64 insertions(+), 24 deletions(-) >> >> diff --git a/hw/sd.c b/hw/sd.c >> index 20ebd8e..f8ab045 100644 >> --- a/hw/sd.c >> +++ b/hw/sd.c >> @@ -55,24 +55,28 @@ typedef enum { >> sd_illegal = -2, >> } sd_rsp_type_t; >> >> +enum { >> + sd_inactive, >> + sd_card_identification_mode, >> + sd_data_transfer_mode, >> +}; >> + >> +enum { >> + sd_inactive_state = -1, >> + sd_idle_state = 0, >> + sd_ready_state, >> + sd_identification_state, >> + sd_standby_state, >> + sd_transfer_state, >> + sd_sendingdata_state, >> + sd_receivingdata_state, >> + sd_programming_state, >> + sd_disconnect_state, >> +}; >> + >> struct SDState { >> - enum { >> - sd_inactive, >> - sd_card_identification_mode, >> - sd_data_transfer_mode, >> - } mode; >> - enum { >> - sd_inactive_state = -1, >> - sd_idle_state = 0, >> - sd_ready_state, >> - sd_identification_state, >> - sd_standby_state, >> - sd_transfer_state, >> - sd_sendingdata_state, >> - sd_receivingdata_state, >> - sd_programming_state, >> - sd_disconnect_state, >> - } state; >> + uint32_t mode; >> + int32_t state; > Comment pointing to the related enum? Ok, I'll have to give them names then. >> uint32_t ocr; >> uint8_t scr[8]; >> uint8_t cid[16]; > [...] >