From patchwork Thu Jun 27 16:22:25 2024 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: 807817 Delivered-To: patch@linaro.org Received: by 2002:adf:e842:0:b0:362:4979:7f74 with SMTP id d2csp889596wrn; Thu, 27 Jun 2024 09:25:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZykQ88eY4fA4K1MT8WYYZhRtzSla1bmQZQL0I0a6bBXsD0qDPKTsPG9z477iTpXDz3e9zf9zf8dTSVrBXhTX3 X-Google-Smtp-Source: AGHT+IGkYRygn1qUYVLkrhb/wqb9AETghFc933N3JAGRMDNj4NgqDgFZhJUv99QXA0ZhEXvLKOFO X-Received: by 2002:a05:6214:5583:b0:6b0:7327:c45b with SMTP id 6a1803df08f44-6b5409c4416mr140060306d6.16.1719505520952; Thu, 27 Jun 2024 09:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719505520; cv=none; d=google.com; s=arc-20160816; b=sm4FOHPEhYdmV3S8nPBujPQ5hXw6jfBp28SrcAPvL6FkW1HHp3Tpt14A6nzljuMdek t6sbANvIQShE7og8yIMk+TIxtvpEfaij922ChPw8A8dvH9vJNbl7LYjo+MHlH+Mu8Kor 9cP/xqbyTrTfXKXlzIoGppLwMtnl+S9UW1UmC+8rBDc/H5zwoyXTwk1nD/Q7cV36t70/ zyrW2d85hW0XSlnE2XFbPTuV5L073kC13HYLna528T12pB/omK+lX5Ffzx4+Iq2kHoiU +LiSEOBM+AhWAQyvahTb2EArdBLn1qIdz8WwmNevKz8u/fypZKUyWmomyZFj86HamMFp Njqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JpVotoHspFlZ3BpKrTY/FaOKVvxynyJagKJZJS+6h3k=; fh=J5ku+V592sifDRR0DP/LvVzC5VDqkDqR46Xlv8eA1xM=; b=DFeyvSY8BQqgYbZ8qv8owZOrhXyZlFuChCiezd9n/b/EzGXZTxu8vZo8kur0Ji6MkU WO2vReDJGNtCaKS/yz62bXxSXyE7CHfL0P6OHldu1+karKXofO1EySY7VaATi8crh4pn iAQ1ALA6fzfzHAMdUQe4hJ+hazkqdbgNmg2teoXcbeWq43qeF1bnjw0kQjuy2TdTJehF m8RJzOHtcG/L7bYLZaSS+0V8MD7lnrkeLWxOiPLZbVCqoa/yEPfeh3gAK7hBOA/hYweV EdhDcWuIMnAlDPGg6iBCEzYsgbEiecCkxLJKCuGXGbRDyf4WtOQRV6zgR87lQgbYjLqD TjrA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sAD4SVpe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b5926f1400si15701566d6.454.2024.06.27.09.25.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Jun 2024 09:25:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sAD4SVpe; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMrvf-0000cd-Sw; Thu, 27 Jun 2024 12:24:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMrvc-00006j-Df for qemu-devel@nongnu.org; Thu, 27 Jun 2024 12:24:56 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMrvY-0001NU-Kx for qemu-devel@nongnu.org; Thu, 27 Jun 2024 12:24:56 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-424ad991cbbso18631155e9.0 for ; Thu, 27 Jun 2024 09:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719505491; x=1720110291; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JpVotoHspFlZ3BpKrTY/FaOKVvxynyJagKJZJS+6h3k=; b=sAD4SVpep7t9QEf0mJp42GPVlhDmfctgRDq9RYjpqQx5fDlAIXk0sPjt6TM6pRX+j9 jpvqFtw6ih9WH0zbmf7LLgYLYAcJxTvJPaFy+I9pKBKj1yn5EnVocFeuaOkDdc1mNH7n wXwX+T6uWYxK5sPP9fZkglyYK2NYeN25xm8+rv6jTU48Yf99i97ZOh1agOZGRcWp2gVc hKp67AFftySEtJWW6Vephc7oQGjRhNF6H+fOeLp9J7iTRdAvFBt+5jTaUtFt4Y3Jpv+q uIeJkYRCJEyu6YSGBeGUC4CiUjPsm2iX2TeR2BWmXV3A//io6u5eYSl3r40gzjqEMAt4 ZuiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719505491; x=1720110291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JpVotoHspFlZ3BpKrTY/FaOKVvxynyJagKJZJS+6h3k=; b=JshIPIhX0xCzKKpk3XispGYa/b1NHU8jCg2RZyesbVV4KsfYo1duL0/b1hE4PdfNHk pM5U/u3nQ0Lxq8MMYHDegbP7I0qnC/6pyI5iU0f62x4mJ07innYY2Hokb0ARE+La+1ha mTvp3H71iGqKlEqTZ7hXDzmd2hObt4zb2CmCS59OzaomliwCDlNrexAOU9KcEVEjvb04 IeK5+uFBDjvh2bPPPa3PIA18GvHdAhVCdqOVOpH8EeOf1VPJgQpIrR1yWqOj4ZxrFK49 SCNLk7wYd+jtckIdH9BeqITmhDXJlkwimNrFaCvAV9o07+1wxnUP7A2zmuz/hKcv+BpD rzcQ== X-Gm-Message-State: AOJu0Yy7EY403T9pNH88qVHOEyeP5Z1aVyiGlU4ux1/cFZm8x1aHwRhN myJ6XPZmZEwYgCWoL4WveNd/2PxTXPkRKqVk6d6eQocTErbhe/ys8so8FVtGzy+IAY5X5ktzoCU 2Isc= X-Received: by 2002:a05:600c:16d4:b0:424:a406:ad52 with SMTP id 5b1f17b1804b1-424a406adb7mr55279375e9.19.1719505491050; Thu, 27 Jun 2024 09:24:51 -0700 (PDT) Received: from localhost.localdomain (33.red-95-127-46.staticip.rima-tde.net. [95.127.46.33]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36743699c0bsm2349553f8f.70.2024.06.27.09.24.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 27 Jun 2024 09:24:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Laurent Vivier , Tyrone Ting , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng , Hao Wu , Francisco Iglesias , Paolo Bonzini , Thomas Huth , =?utf-8?q?C=C3=A9dric_Le_Goater?= , qemu-arm@nongnu.org, Joel Stanley , Sai Pavan Boddu , devel@lists.libvirt.org, Luc Michel , =?utf-8?q?C=C3=A9?= =?utf-8?q?dric_Le_Goater?= Subject: [PATCH v3 10/17] hw/sd/sdcard: Assign SDCardStates enum values Date: Thu, 27 Jun 2024 18:22:25 +0200 Message-ID: <20240627162232.80428-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240627162232.80428-1-philmd@linaro.org> References: <20240627162232.80428-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org SDCardStates enum values are specified, so assign them correspondingly. It will be useful later when we add states from later specs, which might not be continuous. See CURRENT_STATE bits in section 4.10.1 "Card Status". Signed-off-by: Philippe Mathieu-Daudé Tested-by: Cédric Le Goater --- hw/sd/sd.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 135b7d2e23..fbdfafa3a6 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -75,16 +75,16 @@ enum SDCardModes { }; enum SDCardStates { - 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, + sd_inactive_state = -1, + sd_idle_state = 0, + sd_ready_state = 1, + sd_identification_state = 2, + sd_standby_state = 3, + sd_transfer_state = 4, + sd_sendingdata_state = 5, + sd_receivingdata_state = 6, + sd_programming_state = 7, + sd_disconnect_state = 8, }; typedef sd_rsp_type_t (*sd_cmd_handler)(SDState *sd, SDRequest req);