From nobody Tue Feb 10 15:29:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528395149818470.8731538965901; Thu, 7 Jun 2018 11:12:29 -0700 (PDT) Received: from localhost ([::1]:59629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQzOf-0005va-3y for importer@patchew.org; Thu, 07 Jun 2018 14:12:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQzJJ-0001y6-CW for qemu-devel@nongnu.org; Thu, 07 Jun 2018 14:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQzJI-0004Nl-EC for qemu-devel@nongnu.org; Thu, 07 Jun 2018 14:06:57 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:43061) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQzJI-0004NU-9n; Thu, 07 Jun 2018 14:06:56 -0400 Received: by mail-qk0-x241.google.com with SMTP id g126-v6so7136930qke.10; Thu, 07 Jun 2018 11:06:56 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id s15-v6sm26838414qtc.81.2018.06.07.11.06.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 11:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j57TbYKsq9sZhOTQUMQ9/c4IJj1kN/Gj8wYczr2Piso=; b=dQ9WTUkyk6lq6WCB9sU7COPMInqRFrmXl/Ys5hdxkmfTEhS1dm0ZID1pVY2BDxXdSz r9uRd/A4GzYp7H8YQRASI0T07UdmNIDAC6VcwAKJVIB1wZ/lq4A1yIkF9pyyuokIVLBk wtZCmQNXjnblsRJpcBgNiAinEi9fUDEulf70pjOFoI79xU5z7+8sZJwMbmwvqltRl3A8 s43ydtjr9gPFQzXyGQVpZ26sdy1+Vlxhq1iahCJQjm5XWEcJH9HHfPET0yMBQpRO3SV6 o6lRLAwEHmC/At4gLlKCnFwdO1l7YWbx1i2sGUoJbVbz3/Rlrt3atf90zTXu13vUMN7a x/PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=j57TbYKsq9sZhOTQUMQ9/c4IJj1kN/Gj8wYczr2Piso=; b=dIhuM74N1uAAtYgRwiz3KcVkDe/N3xJzQyH5foHLt0KHOvJhZv7BvNhbfrFUG12PWa T6Fuhb3oqWWjJN/2AD7ZVWr0RX+aqLuitIiIgO7k8Vae2uUmB5hnSDqswU7fLJroooJB fKnyMGl8alc5MUTORvD7XWWYCmj8Cy332WDlXqucvtdncS9wSqqY0SqjKAOIUed+AEdd LYAwFe6HEsrSC+PEdKQhQTNqG1D+P0pHsxdBbO7wRzr/FCqRNbAGWV5eTWrUB5+tqMhg qmuiybAlnegbq0lNku83gv+W29MgtRN1Js+a267bhEFEuO8wOv1gx4BP2kyjJGWrv73y XB6A== X-Gm-Message-State: APt69E2m5lxFmSLwqtCCZPrd7BIjkqbGCgzQkUusMQtCQUv7wbYCfrZH r2/fN7uq0ZKfBz03GZiDfag= X-Google-Smtp-Source: ADUXVKLzQTTk/1x3Hl4bvk2XU3nCO3CBDuARNJZel4dhPdOnIrjvJvVhsSXDQR+2ua/G07yzzCNE5Q== X-Received: by 2002:a37:6216:: with SMTP id w22-v6mr2506419qkb.312.1528394815880; Thu, 07 Jun 2018 11:06:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis , Peter Maydell Date: Thu, 7 Jun 2018 15:06:36 -0300 Message-Id: <20180607180641.874-3-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180607180641.874-1-f4bug@amsat.org> References: <20180607180641.874-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH v2 2/7] sdcard: Allow commands valid in SPI mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From the "Physical Layer Simplified Specification Version 1.10" Chapter 7.3 "SPI Mode Transaction Packets" Table 57: "Commands and arguments" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Alistair Francis --- hw/sd/sd.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index e1218d1fb6..80e70dd93e 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -960,8 +960,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDR= equest req) return sd_illegal; =20 case 6: /* CMD6: SWITCH_FUNCTION */ - if (sd->spi) - goto bad_cmd; switch (sd->mode) { case sd_data_transfer_mode: sd_function_switch(sd, req.arg); @@ -1190,9 +1188,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) =20 /* Block write commands (Class 4) */ case 24: /* CMD24: WRITE_SINGLE_BLOCK */ - if (sd->spi) { - goto unimplemented_spi_cmd; - } switch (sd->state) { case sd_transfer_state: /* Writing in SPI mode not implemented. */ @@ -1217,9 +1212,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) break; =20 case 25: /* CMD25: WRITE_MULTIPLE_BLOCK */ - if (sd->spi) { - goto unimplemented_spi_cmd; - } switch (sd->state) { case sd_transfer_state: /* Writing in SPI mode not implemented. */ @@ -1259,9 +1251,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) break; =20 case 27: /* CMD27: PROGRAM_CSD */ - if (sd->spi) { - goto unimplemented_spi_cmd; - } switch (sd->state) { case sd_transfer_state: sd->state =3D sd_receivingdata_state; @@ -1371,9 +1360,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) =20 /* Lock card commands (Class 7) */ case 42: /* CMD42: LOCK_UNLOCK */ - if (sd->spi) { - goto unimplemented_spi_cmd; - } switch (sd->state) { case sd_transfer_state: sd->state =3D sd_receivingdata_state; --=20 2.17.1