Message ID | 20240702092051.45754-63-philmd@linaro.org |
---|---|
State | Accepted |
Commit | cc7c6bda3f16fc8c91daa38b1c96506e49fcc50d |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp118434wru; Tue, 2 Jul 2024 02:29:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVSr2qUdpxTJz3PQYt6FtC5k/BwO7DsXewxPpeb3gf+GqX+mUjyRrQzh3HZGLfjc9AX2NRGOLSCFewiU435CdZb X-Google-Smtp-Source: AGHT+IGIiD/ilmLzvGv+IqPFBJzis8TSSwzOoFmuRgHMWLrFvfnxBJFAXhN5t+BL8yaAqBVXj+nQ X-Received: by 2002:a05:622a:1346:b0:446:4968:45 with SMTP id d75a77b69052e-44662e980f3mr79414751cf.42.1719912588408; Tue, 02 Jul 2024 02:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719912588; cv=none; d=google.com; s=arc-20160816; b=n+DeSPnZwbzatmg+cdXafGroyh16DbYEo4ymeDGsgCR3g9QKDJx5IQ4A5DXVygKcz+ 3IubxSpTq1gjm1BSAFK1I6EUA6dgLI2olUqhZBqCoQEWpFCTIrapMbGc7Cu15QJZKGy5 JbiOj6wRfWdhd5Q/AHIzpfm0HHPrgyooC7t7ZZv6tgb35a074GMf+LfKJjoOZbvHN4l3 twlYSAQGM/mY+/VeKRGUPI7TahaDJjp2w2FwoIfAB1b2gRDR11yCX+boxbg7LJgsPn6c C+lQ4r3Z8rCUCh2jTuPdr+sBm4eVZcQE0BJMrArlWo3JIyCt2IYwMPCvbMDYruyrlzXw fMBQ== 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=s9keY/jFkvIiFyvDvTcECImv8SUtBS1LmlJu/B1CPmg=; fh=/TyiCVzPJVYkT4NtrOYZRXAcrkaiLXA/rwqp4QqIc5M=; b=L6tI5tl6fQT0O5E33rida7TS9iF68zISCjavLR726ojSqav/4O0B+Cg8qmpj309DkK +X+zovY++A+9rK47f0CS+DgNyQcNRta+KjTXcsxXNTvNsfz9RIesAEXHfc/ve9PGIU2y I4u5ICIUxSfjitDJ4sfpe1iLVZQfEHoIChWQitAoJQWVD+rQMnH0mgEHnQ2cFj0dnoeV ttzkl7P2mSRPARCqXo0DHxNk/RXEBsMkbU/bXvlz8OY6Ie1yxAujjOpTM3NsoFThi6zp VLA/38OcRd7Awl1y3C2xT6vtLVbKOuMkz4Ez2fEhp04JeTRI40/G6eU5hq4Rlrlf00sP sg0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="y/sFqRp3"; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-446514e49casi97748921cf.718.2024.07.02.02.29.48 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 02:29:48 -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="y/sFqRp3"; 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 <qemu-devel-bounces@nongnu.org>) id 1sOZnD-0003lE-BF; Tue, 02 Jul 2024 05:27:19 -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 <philmd@linaro.org>) id 1sOZmw-0003U1-Nn for qemu-devel@nongnu.org; Tue, 02 Jul 2024 05:27:02 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1sOZmu-0001ap-It for qemu-devel@nongnu.org; Tue, 02 Jul 2024 05:27:01 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3627ef1fc07so2285135f8f.3 for <qemu-devel@nongnu.org>; Tue, 02 Jul 2024 02:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719912418; x=1720517218; 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=s9keY/jFkvIiFyvDvTcECImv8SUtBS1LmlJu/B1CPmg=; b=y/sFqRp3U2tafWxzAb45mUtjulRJX7UbH86PRxqwNjIeAYb//htCIfCOjkK4jHupNZ j5XPeGsyEe0HRg5ZXnyvJI9AXT7xIku2vSCgL3Gz1HiFLEydWtpRbTjyRvzlmW3b84UP 6CNDiGpzDRYrPSeFSjePp1E/nsqf/oEXnCA+Zxr34Vj/azRwI8C652wNyJmdcoHf2vm3 jWaobB1E4tcsFvELVwJzgf79gKnC+OYCQR0QkFkOxh5oUm4gLw6abeaUhbIutbDfWpuX dhitcGDEjg7rjBjrmYKb2WzRYnpaNmpqrONFHXnL7uEOfNtPiuWnhwa84Q5qyukpVvIl fu9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719912418; x=1720517218; 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=s9keY/jFkvIiFyvDvTcECImv8SUtBS1LmlJu/B1CPmg=; b=SLz8BuWS8/VIlS7rv7xwiE3F55GJYwSI+beER1acX4giGxsKmV5PiJbWHa29VvyYuL wN6VwAKe8Rdje8RC5+AjAYhFNNTlUm4ArCPu6EEZQ3U7ef/CVVbnXfppvgLI2t1274T5 Bv4g5hyZ4mef2l/5ts7XyKGn9zEEeaxHI8KTEPLt/kf+5QrVDQ0mJxRvaF/PE/rwsVt4 XBqBNFxgV+RH4i2M+VwjBftfkFPY9d+zpX2nr2BUpp4S4AkAhDoeJN/iU+68n4e5wrun crgrHOoyPAp27MCOw++ZuEQkWhALsOjm5j0GF+B6EQPEcVj17IvLQJHiTpJgBYoekMT4 p2aw== X-Gm-Message-State: AOJu0YzzWVgSRHG5t9yntbJxmX7d5f2FTqsCC2o9XRxD/fr3nzoVrSN9 kkxogalsxxxvUurixGyXZmAWzEj50xpltVzB08giSnTjQTgB5hnt9Atm2qZCEwpT7DJAj+3AniL 2 X-Received: by 2002:adf:cc81:0:b0:367:3b0:f8f6 with SMTP id ffacd0b85a97d-367756c7313mr4734925f8f.36.1719912418576; Tue, 02 Jul 2024 02:26:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3675a0d9b1dsm12716767f8f.42.2024.07.02.02.26.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 02 Jul 2024 02:26:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= <clg@redhat.com> Subject: [PULL 62/67] hw/sd/sdcard: Add sd_acmd_SD_STATUS handler (ACMD13) Date: Tue, 2 Jul 2024 11:20:45 +0200 Message-ID: <20240702092051.45754-63-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/67] hw/sd/sdcard: Deprecate support for spec v1.10
|
expand
|
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index fed95563b8..8b31e0b41c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -258,7 +258,6 @@ static const char *sd_cmd_name(SDState *sd, uint8_t cmd) static const char *sd_acmd_name(SDState *sd, uint8_t cmd) { static const char *acmd_abbrev[SDMMC_CMD_MAX] = { - [13] = "SD_STATUS", [14] = "DPS_spec", [15] = "DPS_spec", [16] = "DPS_spec", [18] = "SECU_spec", @@ -1664,6 +1663,13 @@ static sd_rsp_type_t sd_acmd_SET_BUS_WIDTH(SDState *sd, SDRequest req) return sd_r1; } +/* ACMD13 */ +static sd_rsp_type_t sd_acmd_SD_STATUS(SDState *sd, SDRequest req) +{ + return sd_cmd_to_sendingdata(sd, req, 0, + sd->sd_status, sizeof(sd->sd_status)); +} + static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) { uint64_t addr; @@ -1788,18 +1794,6 @@ static sd_rsp_type_t sd_app_command(SDState *sd, } switch (req.cmd) { - case 13: /* ACMD13: SD_STATUS */ - switch (sd->state) { - case sd_transfer_state: - return sd_cmd_to_sendingdata(sd, req, 0, - sd->sd_status, - sizeof(sd->sd_status)); - - default: - break; - } - break; - case 22: /* ACMD22: SEND_NUM_WR_BLOCKS */ switch (sd->state) { case sd_transfer_state: @@ -2335,6 +2329,7 @@ static const SDProto sd_proto_spi = { [59] = {0, sd_spi, "CRC_ON_OFF", spi_cmd_CRC_ON_OFF}, }, .acmd = { + [13] = {8, sd_spi, "SD_STATUS", sd_acmd_SD_STATUS}, [41] = {8, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND}, }, }; @@ -2391,6 +2386,7 @@ static const SDProto sd_proto_sd = { }, .acmd = { [6] = {8, sd_ac, "SET_BUS_WIDTH", sd_acmd_SET_BUS_WIDTH}, + [13] = {8, sd_adtc, "SD_STATUS", sd_acmd_SD_STATUS}, }, };