From patchwork Fri Jun 28 07:01:21 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: 808191 Delivered-To: patch@linaro.org Received: by 2002:adf:fe0a:0:b0:362:4979:7f74 with SMTP id n10csp224124wrr; Fri, 28 Jun 2024 00:11:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWz8a+4xQtbIoBUqGiLZDOF5lty3tfpssnENEYsguwLEYxafmGFtUB+LV66AQKwmB4PFrXYWl5cZ0UXctlmlu+e X-Google-Smtp-Source: AGHT+IEABL8DIxX5WbI4rxV2N2RyH0DlAeJONDecXTghjNwy9DEOGVUzrKykVvbIEK7LdvkLxZLe X-Received: by 2002:a05:6102:2821:b0:48f:3977:2ac1 with SMTP id ada2fe7eead31-48f529592c4mr15562218137.1.1719558669478; Fri, 28 Jun 2024 00:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719558669; cv=none; d=google.com; s=arc-20160816; b=ukEEaIAkf1pkCaKIg+kEgIXjAicmtE4MNiyX4/aB9Fxd9RJuKJPJheunzgqY4dESla oooFm0ukzGSsaDrYqNDAD4S0ZPFeYj+gBwcVe7N0LLMBp2f6eTxvflNzrevZCmeO6uDb IRD7/bqRYPSHOr6SHQTa6he1m7QZukrMwqeAwNsKiLHO0ClPF4QjsMbFRLTTF5QR2BzI er8szxog9yNzdKnukL6WJ1n33YKKMXQGhqqZrrR1ib9ZpZYkVhjdpXcEStKWzmaiFfT8 PBsDtXQcd4MJAWrDny9E8ehz+pB6tF3+ciZUhwm9zevUMCH4CRt6ST0GYgLJdfae9Bew hxwA== 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:to:from :dkim-signature; bh=ESvyw3GYgt7hOD38NPh8gyks0iX0X2xZyRHCeLbcWRk=; fh=Vqz0ILX7NeXJwCG5xiS+Wtk94IhOmAmLtOfN3kRbil4=; b=Q1xPzH7J0GMji7KyOqsBuF1C/UZ2OXStW94iGo0qB1czmP/cJ3FhWbXLZeMj9hkN2z rzIILcuIede6/h48s0PMPxj9mnsaYm9OMF2T9GI2uqSiW4kTlq8pHJNSqAMMp6/2SZ9W c3vAaTqe5DVwPjDEyo+tUjleeGlXSi0SQwoujoK8/0eZw+zEy1Kfo28Te9Chg0tUOJRc c5cllw2/IyBjtBO6Ev73z6VLmt+N20jsQhUDn7/Q7PpXzDY6eznSzjtmzjoulGBPIfEy z8cfy6S4gaZovL7/DhityK24b8Fzn0DrrjPeRbuSi6lr8JffKKADMH77hUkKaX8pdWFu y6JQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wp6guBI7; 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 af79cd13be357-79d6933b17esi122431985a.640.2024.06.28.00.11.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jun 2024 00:11:09 -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=wp6guBI7; 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 1sN5h0-0004DM-LH; Fri, 28 Jun 2024 03:06:46 -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 1sN5gy-0003zJ-M5 for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:06:44 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sN5gw-0003JL-OY for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:06:44 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-424ad289949so2336685e9.2 for ; Fri, 28 Jun 2024 00:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719558401; x=1720163201; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ESvyw3GYgt7hOD38NPh8gyks0iX0X2xZyRHCeLbcWRk=; b=wp6guBI7GHGEm83qsEmmGqp0P5S0sxW61xQVswBOKDD3ubKvitaiG5vFCy+I0RW1Z5 OLTWlK00H3EA1kDSzWQA3xl2VExRPc4E2PgSrOiHmkCllHukLxRRq+fDCpA9cJVdDKQ5 pOwCbykaRH7weF2MWTWztaohgGZW5fjh1FoDgq+ItAsNOP2GynaXJg7eY0wSysrkdlqe 6WBp8n8HAtNdJmcOhdtYnS21LCf1HWaR3aRInooN3tZHkLnUl9UnACzUQYK57YKqgtZs KN9m4TAMx0+bCx3hV3TkHvi9jjuvWzYSzGx1Xo8oEV0WBcCNQDcKwTxUp5YSVgQlQTDx IaFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719558401; x=1720163201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ESvyw3GYgt7hOD38NPh8gyks0iX0X2xZyRHCeLbcWRk=; b=n9rvFABEYK5U5ExNwkRE0FxqQio+ozwRq4euJiSzpX4KQIRIsNerg1cZ+QqK/prWs3 wbUUB3jnlAMfxdjBiA4jB4v6j3pvrt2uv4WuxFMElbfHkSYMYYNoELmfageukZABiTIQ IDF6DZRLOHNDqttUzaFixpK5egjjZY/JFvNZQhf2madMoQOsaiPujVkZeyDvYFWWBjbu c3sjC6PUQSYd2pMhVDO6HoUCE13PsFSJnHeu1sC7MLueZdJ2gSvIH0JuUVfEk3ROQloG naPHo4bDEFVWXTSwtPhsISEXfgbx028j5aalbj3OQACBKIQn4fVtj3PDTKsBnk22REct jSTg== X-Gm-Message-State: AOJu0Yz3gQeUycO/D+aXvY0GgChb2awHrEA1dCl0CBqVZiz5lCKUv43W FNWBhuHUj5hK6yHJKthgwN/xIZhcrNgFiJq/VLYammOjMSEpWZ24CYXZUm9yU0nbOwFMk/huwkw vfWo= X-Received: by 2002:a05:600c:4a05:b0:424:9f28:22ff with SMTP id 5b1f17b1804b1-4249f28238emr68998575e9.5.1719558401129; Fri, 28 Jun 2024 00:06:41 -0700 (PDT) Received: from m1x-phil.lan (cho94-h02-176-184-4-239.dsl.sta.abo.bbox.fr. [176.184.4.239]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256af3f14csm21672955e9.6.2024.06.28.00.06.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 28 Jun 2024 00:06:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Subject: [PATCH v42 45/98] hw/sd/sdcard: Register SDIO optional handlers Date: Fri, 28 Jun 2024 09:01:21 +0200 Message-ID: <20240628070216.92609-46-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240628070216.92609-1-philmd@linaro.org> References: <20240628070216.92609-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 See "SD Input/Output Card Specification" v1.00. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/sd/sd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 406fadb3b4..87bfd0fd56 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -240,7 +240,6 @@ static const char *sd_response_name(sd_rsp_type_t rsp) static const char *sd_cmd_name(SDState *sd, uint8_t cmd) { static const char *cmd_abbrev[SDMMC_CMD_MAX] = { - [5] = "IO_SEND_OP_COND", [6] = "SWITCH_FUNC", [7] = "SELECT/DESELECT_CARD", [8] = "SEND_IF_COND", [9] = "SEND_CSD", [10] = "SEND_CID", @@ -260,7 +259,6 @@ static const char *sd_cmd_name(SDState *sd, uint8_t cmd) [40] = "DPS_spec", [42] = "LOCK_UNLOCK", [50] = "SW_FUNC_RSVD", - [52] = "IO_RW_DIRECT", [53] = "IO_RW_EXTENDED", [54] = "SDIO_RSVD", [55] = "APP_CMD", [56] = "GEN_CMD", [57] = "SW_FUNC_RSVD", [60] = "MANUF_RSVD", [61] = "MANUF_RSVD", @@ -2270,6 +2268,9 @@ static const SDProto sd_proto_spi = { .cmd = { [0] = {0, sd_spi, "GO_IDLE_STATE", sd_cmd_GO_IDLE_STATE}, [1] = {0, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND}, + [5] = {9, sd_spi, "IO_SEND_OP_COND", sd_cmd_optional}, + [52] = {9, sd_spi, "IO_RW_DIRECT", sd_cmd_optional}, + [53] = {9, sd_spi, "IO_RW_EXTENDED", sd_cmd_optional}, }, .acmd = { [41] = {8, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND}, @@ -2283,6 +2284,7 @@ static const SDProto sd_proto_sd = { [2] = {0, sd_bcr, "ALL_SEND_CID", sd_cmd_ALL_SEND_CID}, [3] = {0, sd_bcr, "SEND_RELATIVE_ADDR", sd_cmd_SEND_RELATIVE_ADDR}, [4] = {0, sd_bc, "SEND_DSR", sd_cmd_unimplemented}, + [5] = {9, sd_bc, "IO_SEND_OP_COND", sd_cmd_optional}, [11] = {0, sd_ac, "VOLTAGE_SWITCH", sd_cmd_optional}, [19] = {2, sd_adtc, "SEND_TUNING_BLOCK", sd_cmd_SEND_TUNING_BLOCK}, [20] = {2, sd_ac, "SPEED_CLASS_CONTROL", sd_cmd_optional}, @@ -2294,6 +2296,8 @@ static const SDProto sd_proto_sd = { [47] = {1, sd_adtc, "Q_WR_TASK", sd_cmd_optional}, [48] = {1, sd_adtc, "READ_EXTR_SINGLE", sd_cmd_optional}, [49] = {1, sd_adtc, "WRITE_EXTR_SINGLE", sd_cmd_optional}, + [52] = {9, sd_bc, "IO_RW_DIRECT", sd_cmd_optional}, + [53] = {9, sd_bc, "IO_RW_EXTENDED", sd_cmd_optional}, [58] = {11, sd_adtc, "READ_EXTR_MULTI", sd_cmd_optional}, [59] = {11, sd_adtc, "WRITE_EXTR_MULTI", sd_cmd_optional}, },