From patchwork Thu Jun 27 16:38:32 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: 807845 Delivered-To: patch@linaro.org Received: by 2002:adf:e842:0:b0:362:4979:7f74 with SMTP id d2csp896353wrn; Thu, 27 Jun 2024 09:39:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnBWGIDXxoURW3Donf7MSYTYAe/+zg0J5EFTL1LVx4foaeu5x0RBZR45GBJ0bfMWlM1ZJNHg11PwVeBU5hej1u X-Google-Smtp-Source: AGHT+IF7o1XNj8SnhdsoCRhQEEq244YYpnkRe8USV3We0oOaH61eR+2cKKAVGfxGX5h5U8S+Lkcg X-Received: by 2002:a05:620a:28d6:b0:796:2f2e:b547 with SMTP id af79cd13be357-79be47b9b9cmr1657878285a.51.1719506356707; Thu, 27 Jun 2024 09:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719506356; cv=none; d=google.com; s=arc-20160816; b=VgNWWBqfaLQcX2RBs0ikoky5FRdf8gLXyCVyPxONolPrlBq+8sSfqsGl6HMl3GYq+G x6+syGQ2rQqSkN2S0+DAmdTox3Zj1cdF9XiGx95jBPNxjLLwedINiv93EFQYAf535Bqa Eqo1w4mV9okUSBdtMVBYkQFQTZZoPMGOW+N6QKjvYf+AXlLqfoVpEgVGSbQyXdQzdGcE i4pO028G820iI+C5DRBizYNVXCibmQeiKubDiIckMAPbiWMmSP/aKgcFhOW9QUPG2NJ7 fPdq2Kb1fHcX4Zo+kEZrRf12zASmKVANriZulJFTJrfJdTV/WOe2eIxOKqCxSIppfdh5 AQsQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=ElTFXrWk1t5GFFl/PEOUB6AD+AcjxlfHmcfeuSqI9GI=; fh=E5m7+9HN0zGcNIUskxjX+xkpcxQksSinAMYSY8RmZaI=; b=TyKbQxXBYxm55twkoGJV96Te4K457vUnlFTjj5CvILv2tzauO9Zw7dTXSKpAICYk6G eYcnAT/ho4YZLMe0ns2eHhFrkfUimRFnCLp68rUe3vaWoNS/Cror6qgVHcbiRRXlR975 KD5vTKhnHq2S5TxblXxfR060WebhtGwHC0Ljk+0ApLQLGcTnYMW43+PIy23+4f8urRXT aPmGSLoNJmJ1WvDKqJJxPk8dXZw34IEKfUY0D6q6Hc646RqQP4zsWoqzj6Kdpg9/Pg6C Q654iiGDeONfQvvWDZYqTvgsI1dmlgYrnP6EKToplAQ6MMw7G/aPUMm+QzayqEfPs/Yn XgkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S34anmV3; 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-79d5c8f4496si167638285a.695.2024.06.27.09.39.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Jun 2024 09:39:16 -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=S34anmV3; 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 1sMs9A-0000xX-En; Thu, 27 Jun 2024 12:38:56 -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 1sMs99-0000x2-Bs for qemu-devel@nongnu.org; Thu, 27 Jun 2024 12:38:55 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMs97-0006iA-LZ for qemu-devel@nongnu.org; Thu, 27 Jun 2024 12:38:55 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4256742f67fso5207105e9.3 for ; Thu, 27 Jun 2024 09:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719506332; x=1720111132; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ElTFXrWk1t5GFFl/PEOUB6AD+AcjxlfHmcfeuSqI9GI=; b=S34anmV3H/d5LD516RqlN2k+Q8Ek3CoHI0fEr9X5AjfRVwNdQdn9UtdWXEUTLS+tE+ sgW/25mz+DQFojZMtvcL9f9hDI95u5wDmnHIo0NC/3pXhXw2HQLeD1MB/96nv5bZLxFS rW0BNCWZaRiWl7b5Xp/eXpSMJaLaFzOrI1xWOkGTCT7LUavScdYOc9t+KngEp05OZgf1 eZRkQ4kVdCuy0o2UkzNVIWSKwueIQCqaS4IrOxmT7y1h668GDS4WN+N9yYNtVT/aNSAQ TRtIkQgxViZ7xqajlX95JRn+yVjJ1i3FdulteOTQHlzK/LLXHzOiYyYxRgZO+GVUbn59 wrkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719506332; x=1720111132; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ElTFXrWk1t5GFFl/PEOUB6AD+AcjxlfHmcfeuSqI9GI=; b=PmISaaEdkVw4VAYvclWQTgpMzJGWbjLktx1F0VLf1u54dTm4Qw2Ga0SIceZQqTZv0b G3Ow2xj+OjhRIuye0YBMBtcH8QCQUU1FmeF0Bf4qMbDsm3EQEVkqBWUHfdvo17YGHTXM uU/2Uq/5nL2dienGQ/iHqMF0auTdw9youdM6U2mTW7scR/JvsD1DbyDiQxtChCe+oYoP 6S67/V3yQ1POaSXCBSbuU7LT8v6sb5u6n4WUr5Q2LN6m6R+7r0DjYqfRy7uzsnz9XXi3 DvS+9kmTFIUuWvmh0WMn56e8kFVcFxjhSa9zEJzLwfI/NGqKAtU6CSqxBO2R9WPqEo5L MJbQ== X-Gm-Message-State: AOJu0YxXCf79/blMq+M1u6VtQWUdOwaDx9Rxw6ndHdjGMifFom18mSDM yg2LXe58mt7wLCwUXg0zVQBnkW+rvqgQeuV3TKF95iysGyMFBRSwYMrxzcgg/kDD5s2a2/AfbUL gEi0= X-Received: by 2002:a05:600c:5118:b0:424:a56d:83a with SMTP id 5b1f17b1804b1-424a56d08fbmr59252955e9.0.1719506330723; Thu, 27 Jun 2024 09:38:50 -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 5b1f17b1804b1-42564bc59f5sm35960875e9.42.2024.06.27.09.38.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 27 Jun 2024 09:38:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Joel Stanley , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Francisco Iglesias , qemu-block@nongnu.org, Sai Pavan Boddu , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Bin Meng , Luc Michel Subject: [PATCH 00/11] hw/sd/sdcard: Consolidate SDProto::cmd[] arrays Date: Thu, 27 Jun 2024 18:38:32 +0200 Message-ID: <20240627163843.81592-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 Use the SDProto structure to handle command properties such name, type, class and handler. Add stubs for optional commands to ease tracing. Based-on: <20240627163403.81220-1-philmd@linaro.org> Full series for testing: https://gitlab.com/philmd/qemu/-/tags/emmc-v4 Philippe Mathieu-Daudé (11): hw/sd/sdcard: Move sd_[a]cmd_name() methods to sd.c hw/sd/sdcard: Pass SDState as argument to sd_[a]cmd_name() hw/sd/sdcard: Prepare SDProto to contain more fields hw/sd/sdcard: Store command name in SDProto hw/sd/sdcard: Store command type in SDProto hw/sd/sdcard: Store command class in SDProto hw/sd/sdcard: Remove SEND_DSR dead case (CMD4) hw/sd/sdcard: Register generic optional handlers (CMD11 and CMD20) hw/sd/sdcard: Register optional handlers from spec v6.00 hw/sd/sdcard: Register SDIO optional handlers hw/sd/sdcard: Register Security Extension optional handlers hw/sd/sdmmc-internal.h | 26 ------ include/hw/sd/sd.h | 5 +- hw/sd/sd.c | 192 ++++++++++++++++++++++++++++++----------- hw/sd/sdmmc-internal.c | 72 ---------------- hw/sd/meson.build | 2 +- 5 files changed, 144 insertions(+), 153 deletions(-) delete mode 100644 hw/sd/sdmmc-internal.c