From nobody Mon Nov 3 00:31:42 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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=temperror (zoho.com: Error in retrieving data from DNS) 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 1527984757655356.2781295195823; Sat, 2 Jun 2018 17:12:37 -0700 (PDT) Received: from localhost ([::1]:33134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPGdQ-0006VW-S3 for importer@patchew.org; Sat, 02 Jun 2018 20:12:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPGZr-0003zg-NY for qemu-devel@nongnu.org; Sat, 02 Jun 2018 20:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPGZq-0002yi-NP for qemu-devel@nongnu.org; Sat, 02 Jun 2018 20:08:55 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:42648) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPGZq-0002yW-JI; Sat, 02 Jun 2018 20:08:54 -0400 Received: by mail-qt0-x241.google.com with SMTP id y31-v6so6607031qty.9; Sat, 02 Jun 2018 17:08:54 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id 17-v6sm10610894qkg.97.2018.06.02.17.08.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jun 2018 17:08:53 -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=OOZ7Vcc31wjxZvWvC4/OZIf0JoVPNazx0Zctb+9Jpyg=; b=UFaNscStTnVKq3/f0jmJ7UW6HsC8+H7OPrRaPXmCnCf9YwEHxALqozWiAJduD4KEdC 2UXCkqBYw9lwhm87z4K4r+SpfeaIzAOhALkQN2Q+kq5+Dm9wZITEoP7Haup9s7vgrCUm 5ek7+LaxfSXSurp5Jl3iiTZmTi75Cv0t4I95+heYIpgqdW4T5bsx0lhSByaCrM5N5z+m bvUlW9S/iBJOFe+bRoHnCj5uoYW2EUhUVJo8u0dk+WSTxBimqJLLQ3wT1Cgr5krzeEJC BbaVN19dpBNYSsFyIQHduZhFYgNsVVb+LTcEwoNSlySkqpGyRcgRQQXVEbDThjlWMncm DTbA== 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=OOZ7Vcc31wjxZvWvC4/OZIf0JoVPNazx0Zctb+9Jpyg=; b=Kp78tla20AndsDQVgLO1DTGZdTEvmCh7ubo7HHvu4N3IWmDGma+fCmWoZ9yakx1C0e sntPj0+STr7+8utGCbY50hVbQIKggW/DpgpvvUvAj0Y/uRLhBU9XFSmEjFyUnfTbuoRy WKmVO0VSHZs6W4rTs5WRMQfrEGooXVPjNACCI8xGubkwDAIrzpRxbr3S3U8v5EEimte9 BKvOckAwjBDZ+YG7+kCansrbRv5OMky/VdeWclcMjxTS3RoAAlN4gJfOLoO1EoSAAu72 Z69zanoiw/olDwXQqcMMdFHgzs4qNbx+yENrwe4pyyJ938K5fAnGHg/Z5YpXyPd1w2lI R86A== X-Gm-Message-State: APt69E2bNkt/sNYXfCdksvoqJhO4S1dd/2CZDdDRA9+iXAO0gxkowbpW UAqNZ9SNWih4SsabBAwGGr0= X-Google-Smtp-Source: ADUXVKIBlctV3S8Dt22HIKkEZY6in3rUY72tUcw6kIRFAhPsfrwFsNgqMtSJ+16goSm2tDqvKZt61g== X-Received: by 2002:aed:3e51:: with SMTP id m17-v6mr8450995qtf.283.1527984534233; Sat, 02 Jun 2018 17:08:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Alistair Francis , Peter Maydell Date: Sat, 2 Jun 2018 21:08:25 -0300 Message-Id: <20180603000827.30872-7-f4bug@amsat.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180603000827.30872-1-f4bug@amsat.org> References: <20180603000827.30872-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:c0d::241 Subject: [Qemu-devel] [PATCH 6/8] sdcard: Disable SEND_IF_COND (CMD8) for Spec v1 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: Peter Crosthwaite , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, qemu-arm@nongnu.org, Paul Brook , Paolo Bonzini 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_6 Z_629925259 SPT_0 SEND_IF_COND got introduced by Spec v2. Firmwares use the CMD8 in SPI mode to poll the Spec version supported: 7.2.1 Mode Selection and Initialization (SPI mode) The SD Card is powered up in the SD mode. It will enter SPI mode if the CS signal is asserted (negative) during the reception of the reset command (CMD0). If the card recognizes that the SD mode is required it will not respond to the command and remain in the SD mode. If SPI mode is required, the card will switch to SPI and respond with the SPI mode R1 response. The only way to return to the SD mode is by entering the power cycle. In SPI mode, the SD Card protocol state machine in SD mode is not observed. All the SD Card commands supported in SPI mode are always available. [...] If the card indicates an illegal command, the card is legacy and does not support CMD8. If the card supports CMD8 and can operate on the supplied voltage, the response echoes back the supply voltage and the check pattern that were set in the command argument. This change restore the SSI/SD functionality of the Stellaris LM3S6965EVB board. Message-Id: 201204252110.20873.paul@codesourcery.com Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Paolo, I guess this would be a good use of the Based-on: 201204252110.20873.paul@codesourcery.com tag in the git history :P hw/sd/sd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 81f178b36e..da65f2b178 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1017,7 +1017,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, S= DRequest req) break; =20 case 8: /* CMD8: SEND_IF_COND */ - /* Physical Layer Specification Version 2.00 command */ + if (sd->spec_version < SD_PHY_SPECv2_00_VERS) { + break; + } if (sd->state !=3D sd_idle_state) { break; } --=20 2.17.1