From patchwork Tue Jul 2 09:19:52 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: 809063 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp116871wru; Tue, 2 Jul 2024 02:24:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBdNVHKsZk7I0VZ/5rn6daF+vvsBdSMeIjXydMBRuOS7ioqFAqLjttSJe/XcXJuFuwmKK1FnJELOk753eksfJ/ X-Google-Smtp-Source: AGHT+IG9nZ1u83GaGopMnWPafEOqrMbCc87ObHgCokiUjp2mmOohUB/rHyjhlOite4iqN1SNcrgf X-Received: by 2002:ac8:5f13:0:b0:446:5c33:d1fe with SMTP id d75a77b69052e-44662e66ad1mr104501541cf.64.1719912247724; Tue, 02 Jul 2024 02:24:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719912247; cv=none; d=google.com; s=arc-20160816; b=FNBZmC5g0Uv4BGOFAD/6Dl9CYy/7pDqEf5SXBCBzwHPCtf3cqmqSmTL+lybXj1xFtq jkw3HWgK07pX7rp4olu9Rqm2pGUy90Lfwt8LyX7MUe8LA2i8d2Wv0Ai92QG7tlWFlVPk MG2iTLE+RgUt1Wz65gvmWePK/9d50wR+T5WPzibxfLuMTnsQuGjNb0m2CBZpJyIJ2xzm Zc0pr6Xz2AT5zO4JhVKOuxRv6e+KDbRe8BnOSARVbO+EvHuHRRkoE4ZqHCXhpxNtl1P5 z0yJ0tck3zhvuqGOZ5/5A0NAdGqc3A6A04efOhscIYg8VtwWDYh9VtedXExAkHMa25wc 6sBg== 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=VFi1L5rHZo7v36UetRUIEpZ+be6zBjT18RH5cfq/7Gg=; fh=/TyiCVzPJVYkT4NtrOYZRXAcrkaiLXA/rwqp4QqIc5M=; b=gIu7ReKXRISMqF9CUNnTKb8EbqcY5gZE1SWoJ1DSr/PDxHfTudwTvv3wvShoqyRwi0 IQxh99lI7EpkxLVZ7oAfB3ahwXLhxZKRNbaMU9v2eEFp8qLtjHsgjmj4016aeW7C4tCS QcXFmqjLqhzx94X15mg+hIZklkE6ygP3FuVSCVbeXiwW1bn136h/vvQCqPKQ5KxbNTLP hfJRRfZj/DFcMnozQIOifPQPxlCZmmm9UM3Jvobh1rTrGZfvemNUSgkidv2l5oe72Mqi 4DgqQbO2ewn28qcsQqVP7TthNAhibkukQtl1yw+qJddZy1Ot5/zoiTx7ohinsZfW8ZMa ZRTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c04R2OBL; 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 d75a77b69052e-44651485f08si99937571cf.281.2024.07.02.02.24.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 02:24:07 -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=c04R2OBL; 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 1sOZi7-0001Bf-5H; Tue, 02 Jul 2024 05:22:03 -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 1sOZi3-0001B8-4e for qemu-devel@nongnu.org; Tue, 02 Jul 2024 05:21:59 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOZhs-0006Rv-Qv for qemu-devel@nongnu.org; Tue, 02 Jul 2024 05:21:58 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3626c29d3f0so2001288f8f.1 for ; Tue, 02 Jul 2024 02:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719912106; x=1720516906; 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=VFi1L5rHZo7v36UetRUIEpZ+be6zBjT18RH5cfq/7Gg=; b=c04R2OBLwAdRAp7Nu2BSr46oWCvvpqAK+LMr4dgjMbXGFmj6UtsqdokCA+h12EP8Ft 5p7x0iMAhjaFe3WJpdVqI3cC7pFi8s3YcrLsDkEIqK61ok12yGMxZZcfphc/EYyUopSa cvLrORWx/5t01x2wzfWAM9t++wNUllM76BA6gI3jjai98HbP81XQKwehe35ddLc/Fmdy YkOOkL+7rNPkU6MLIW7KRlDKq4wRBS8Ub6lefVXKpXE+7SqdWKkV+Mqv7HmQ8REQexHK GO2u32lY3/DkDebEPAs+Vp268Knadj7CsXfIjxMWEH+CQTrvwlvm5QcKZxIEixGGzRwi 9EkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719912106; x=1720516906; 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=VFi1L5rHZo7v36UetRUIEpZ+be6zBjT18RH5cfq/7Gg=; b=q2Q00cghyY9VgcV914DBMtIHUyjG3Sx2CiFguSl+txirczVkMa//rj87oXR36bQBI3 azu0xyM0j4cCyAXpVRD4SI8+ihr1BeHl2kSL8YN3TVeJGcd3e437CNwYNmQhbvZSgzly xwx2HixS3AMd8eVg3oaHs35qeYZ7c3oLjC7jHTlMt6BwuGPrw9WxiV8KMWGHF4ACg5N5 4UJQWSKC4Zfak5j/UnwGceOHt8IIVCCr360knPXuQS/SnpPQVytPo0qeOLNk9b1i9GGE cZY1trTSAybLwz3i6IrbSOP35pyMB7LizhC9JvvjWpUjUEgbC7h1XL+ooA5K8TW18Hqu 3PZQ== X-Gm-Message-State: AOJu0YxZyD6GV9wrtGaQAuqzB8pqkBapv5xH8lgSa2NgiPq8JDm4khPW oMMnsBl5KmhSdcDOx8REuCr0a9o7ZQzD/bc7SfxiIKB9Lv/I9bhOrfK2SQHPnIOnme9IFl7LSr2 E X-Received: by 2002:a5d:4043:0:b0:366:f8c3:ddcb with SMTP id ffacd0b85a97d-36775725c6emr5347764f8f.52.1719912106566; Tue, 02 Jul 2024 02:21:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0fba2dsm12653980f8f.73.2024.07.02.02.21.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Jul 2024 02:21:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= Subject: [PULL 09/67] hw/sd/sdcard: Assign SDCardStates enum values Date: Tue, 2 Jul 2024 11:19:52 +0200 Message-ID: <20240702092051.45754-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240702092051.45754-1-philmd@linaro.org> References: <20240702092051.45754-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=ham 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 Reviewed-by: Cédric Le Goater Message-Id: <20240628070216.92609-11-philmd@linaro.org> --- 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 04ca895645..824cb47856 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);