Message ID | 20240628070216.92609-68-philmd@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fe0a:0:b0:362:4979:7f74 with SMTP id n10csp226437wrr; Fri, 28 Jun 2024 00:18:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXGoFaJFXCKC2ru+wPattAOiT6aFu00EkKEi7M8305Srm4AYFx3uFGg/H4f2/cYG2vD+q1LhnjOAbkCCyi4j8Br X-Google-Smtp-Source: AGHT+IGd2bgjWtkrbU5O2wb0Ydg48FOZnS9HCdvubI20Zd7hmZYEuZwYNMTYAZ/GE9XoAOdNQkUE X-Received: by 2002:a67:f8c8:0:b0:48c:3497:7389 with SMTP id ada2fe7eead31-48f52a65ed0mr13496968137.17.1719559133885; Fri, 28 Jun 2024 00:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719559133; cv=none; d=google.com; s=arc-20160816; b=F1XB5zb0m3A6fG1Apoy1+AzF1SLINPSRRIYCP5cZ4lvUgephU6kcnukNP4QkX5gFs/ LVpvwloFtML5IYFZ99AvoYS3qmJLPIrXVLcU0L1u5+Jln+M5Ub1ufjA2t2IQiHI7ZTMR FNwo2OrNHjbZ7KeJq3rWI2x1e1sTyuolVJJDOCBCCYU4ZH1D+TTT1GJaoRf95Ij6NXPe byn2PpQqyzqwqjvn5492gyqMYVONmWvNfqM/qRN/XkUs0y49vbklb5Q3MgmP0zxp1xeD bmWiQ3jsTkJeWlPh2M7jTaZxodIUXEwTfpJlEb2RQgvgc6vQlA+5bfEUNSia9DRjXUj+ 2ebg== 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=Z4eT6ls1VgCOfFdDFeq72C/Jkjo1k0Xm3Q4yUyOE478=; fh=Vqz0ILX7NeXJwCG5xiS+Wtk94IhOmAmLtOfN3kRbil4=; b=0QMk6QOg7RYnoHiKwrtoQ6pxtyi6jgvguPWAn+FRSPa+mbeul2jaeWpX7KBs5riQPn tE+p9PcZrgbYvtcD+cYFHX+FOlRqSUv2bVL7ImHugdKkTIM94wFFZ6G3mlSki1bAIDTY nOEAwvaP199qiZM6bvAL3DQinGC5shcF8j+PRiwZjVN+CFbbRjAzCM3phlSWh4NFjk1Y L3Ikuvq7ONrR+E37MCrDmceaC2LJ4GN+I6PeQsab9v0e8p3Hwms3PIrtPeKK6ePi/OsI AlitL23dNrdxNfJdLxqk5Y3jlM9MZs7XS0Vc8fK32hvGFQXElMWoMqWHj2cCRP03ldHe KMEA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BixIGmhE; 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 af79cd13be357-79d6934ca4csi121081985a.747.2024.06.28.00.18.53 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jun 2024 00:18:53 -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=BixIGmhE; 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 1sN5jS-0006VM-1l; Fri, 28 Jun 2024 03:09:18 -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 1sN5jJ-0006L8-MI for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:09:12 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) 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 1sN5jH-0004Ub-FI for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:09:09 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42566fb8302so2506675e9.0 for <qemu-devel@nongnu.org>; Fri, 28 Jun 2024 00:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719558543; x=1720163343; 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=Z4eT6ls1VgCOfFdDFeq72C/Jkjo1k0Xm3Q4yUyOE478=; b=BixIGmhEcBTlBj3jz+uh91vv/znbeC8eK2knbgu59sDV3mfUO9P2GAJdegX2A6G3nr cCRg+n79GzEydLofoEbjnA2T2UIxp4huW5kFUsffyMGWv+TLK17UPf7AC1pqNXMnt2c6 U9PnmItbaFipV8GKRc7+C+e2xGvffsngUs+SraZHLcRy+fMcWcawb1c5/7N6FfucL4eq MGXr3xJ6HA4keveeqMYpiihTriMFsE3Nz/74GcfaFCKK6ToCvJJXl2jVYCYWGg73/K/8 LIU/4eMTiA8s2JsCe4ekKx8H1AMdkoyEIEKvuiMW0+9fae/5m6NKdP0UDx1WgYt8wHpN H5zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719558543; x=1720163343; 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=Z4eT6ls1VgCOfFdDFeq72C/Jkjo1k0Xm3Q4yUyOE478=; b=PM+Xt7YLtlpTsoQsWzkkdl+A+HsRS/zfIJyqxM240TPRL+BUZ7v7ZcPFBPYIL+olGR QsGmpT+dhodMPQ9p2bYJijXSCeATuZxt5ySzSTeg28Y/cu9wksLVmZx8pu/PcF5SPZ4/ lsptewXss36ewwWEjjyJAZnnJra3xVc6UawY9R8y3SS2+XHniejVj70VzxQTRg9rlCes DZPWyK+coDZwmYhioY5YQh+AErknSiG/Ln3iabMCwh41SBpQG40lnN0/7YhOjqcYBXvA /vrZBvOfmY5NB2qhx18hkprQkCe/VSh7X/g7MCI9fvDXRjwqNzIoMBC4cJAOZ+jffuFs CqDQ== X-Gm-Message-State: AOJu0YyktcAJNoMKiYx35jrR0exXYTfx/jNfXHYBKTJlyCCq9SSQenZH rTEqJqoVBYq/nMs7waRGV7r/HSqVr87dJ6v/Ra4g0x26r6B/GuCc6km46BdCiKvT/9rr8U2cZFG 4eo8= X-Received: by 2002:a05:600c:35c1:b0:425:6726:ab25 with SMTP id 5b1f17b1804b1-4256726ae12mr22849835e9.4.1719558543442; Fri, 28 Jun 2024 00:09:03 -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-4256b097b77sm20856555e9.33.2024.06.28.00.09.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 28 Jun 2024 00:09:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org> Subject: [PATCH v42 67/98] hw/sd/sdcard: Add spi_cmd_CRC_ON_OFF handler (CMD59) Date: Fri, 28 Jun 2024 09:01:43 +0200 Message-ID: <20240628070216.92609-68-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 |
hw/sd/sdcard: Add eMMC support
|
expand
|
On 6/28/24 9:01 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Cédric Le Goater <clg@redhat.com> Thanks, C. > --- > hw/sd/sd.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index b3b4cd5a3a..2f853a89d1 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -1666,6 +1666,12 @@ static sd_rsp_type_t spi_cmd_READ_OCR(SDState *sd, SDRequest req) > return sd_r3; > } > > +/* CMD59 */ > +static sd_rsp_type_t spi_cmd_CRC_ON_OFF(SDState *sd, SDRequest req) > +{ > + return sd_r1; > +} > + > static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) > { > uint64_t addr; > @@ -1753,10 +1759,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) > case 26: /* CMD26: PROGRAM_CID */ > return sd_cmd_to_receivingdata(sd, req, 0, sizeof(sd->cid)); > > - /* Application specific commands (Class 8) */ > - case 59: /* CMD59: CRC_ON_OFF (SPI) */ > - return sd_r1; > - > default: > qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd); > return sd_illegal; > @@ -2325,6 +2327,7 @@ static const SDProto sd_proto_spi = { > [56] = {8, sd_spi, "GEN_CMD", sd_cmd_GEN_CMD}, > [57] = {10, sd_spi, "DIRECT_SECURE_WRITE", sd_cmd_optional}, > [58] = {0, sd_spi, "READ_OCR", spi_cmd_READ_OCR}, > + [59] = {0, sd_spi, "CRC_ON_OFF", spi_cmd_CRC_ON_OFF}, > }, > .acmd = { > [41] = {8, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND},
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index b3b4cd5a3a..2f853a89d1 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1666,6 +1666,12 @@ static sd_rsp_type_t spi_cmd_READ_OCR(SDState *sd, SDRequest req) return sd_r3; } +/* CMD59 */ +static sd_rsp_type_t spi_cmd_CRC_ON_OFF(SDState *sd, SDRequest req) +{ + return sd_r1; +} + static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) { uint64_t addr; @@ -1753,10 +1759,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req) case 26: /* CMD26: PROGRAM_CID */ return sd_cmd_to_receivingdata(sd, req, 0, sizeof(sd->cid)); - /* Application specific commands (Class 8) */ - case 59: /* CMD59: CRC_ON_OFF (SPI) */ - return sd_r1; - default: qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd); return sd_illegal; @@ -2325,6 +2327,7 @@ static const SDProto sd_proto_spi = { [56] = {8, sd_spi, "GEN_CMD", sd_cmd_GEN_CMD}, [57] = {10, sd_spi, "DIRECT_SECURE_WRITE", sd_cmd_optional}, [58] = {0, sd_spi, "READ_OCR", spi_cmd_READ_OCR}, + [59] = {0, sd_spi, "CRC_ON_OFF", spi_cmd_CRC_ON_OFF}, }, .acmd = { [41] = {8, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND},
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/sd/sd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)