Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp575776ybm; Fri, 29 May 2020 07:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlBAoaksnP3cTHUoaNDT8JQrvoI1kmPzzyfH0tGZ8qr1MPJg89tTzEf/5uml465hsaYdaD X-Received: by 2002:a50:ec8d:: with SMTP id e13mr8901171edr.8.1590761692456; Fri, 29 May 2020 07:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590761692; cv=none; d=google.com; s=arc-20160816; b=NP0c4lfeaweBq7f/w6P7Fu/sxuIzkhgu6HZxWQwhl8H60d8LygP3c+iGt41uQfyBON PWrdHfEW3Z/P0SrdzS6awFS42os+a9j9EUVnTEcwwvUBPlb97u1dWU9kLEUyVuwtDRQe EKmIGwFZTJCxhbV1q+Mn0bnXaE10nfveqB7ZIqKodjHtyM4iXiUWuY27b4ddegtiYpd2 K5yHJqZKL++pT9CO/8v4mx7YiXmdPNpDftSayweWMlZNds2mWiZkIw/clAkPOOHCQpM3 NHW1CIavyc8QZCYfJn/TGstGGW15RSBv8VJmfli92QSX79rqBkeMmKWq08dUCUd5WLZI OSlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:references:ironport-sdr:dkim-signature; bh=W4rTfEODq/UQ2KoXJJ68Q4xk2G4wW/si5U9vSlA2qso=; b=Pvf9ljfHgOWpBtTIZ3dPqSimPDq+u04Ui7sKCWfcWUfSrnoO/YlBZA4//NfBKckW/f kcTyzRaeR2HmUs/ubLvTQuXa9Bv0FmitWaw/7ULqpfSaqrkrXj7Q7uEps78/GUUjw1nn p4dPhw+IEzXAhhj03S0krLPP8C7UURVsS9uGu/IlAihF+mZtAGaBycdO7OqT9HHothwI /+aOb7OK8WcFK0PXt8aOKFE9yCX1awD2rrJBGkJAWmKlLeIGuScL773RqB9EI2IsKEo6 lK+JCmbu3KbFhnMmHIZUEExIY5YUQdlTJwkMR1dURO/OFV3PVOEg1I+DzKvlY5ofTivU l8cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ZY87lhfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si6389064eja.516.2020.05.29.07.14.28; Fri, 29 May 2020 07:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=ZY87lhfX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727084AbgE2OLn (ORCPT + 99 others); Fri, 29 May 2020 10:11:43 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:9352 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbgE2OLm (ORCPT ); Fri, 29 May 2020 10:11:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1590761501; x=1622297501; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=McPi/uyYFfHmQeVvhx6otxjv+LEVF2BZkJXArIGF6Pw=; b=ZY87lhfXXTesXWE7rRdkGTksFF5JiCJd8L8JA7upEBIUtQDygo0xN/RU iSYVePT5au8QcDiYwvBsmnsc5QWnojsU6COnmqw02+GwMQUtZRYMxwVfB TG4Laa9WUnKvtuNOYDi06xufJRXEKeHKibcZFsNgnVU9vbOuxkv/udjrE KsFTu+krLt6vLs6DkRjmYiI2tvavguRfO2JSc5mXabIN+lWhOoAcltU/L 1ebdG1H7BScpZqhtyfea9d6221Zlf9A++QCtLJs4uDDnOxWNGeD0c9KNj hpSkcAVVc9Y/UpWJe3Hm4DJpshWQwTFlDpMi0C7hk3IFTPnMH+WbdP2vz A==; IronPort-SDR: 9A/C2v/lTqGJAah29JTQL5X9JQIdYVxPcU+b0aGKUa6hrEKlcwegvmtswmD9QoAY78BtH33Lhb ZHB5uP1yT48gEuJjf2Yztfowjp8+XUMY454fCfB6WQrR4k2STJrI+D1MHSwQl9EZWXZq1GYU+Z LPd1iBaJt4NpL5VeigQKPkQcJm16cNGA2DpQDzDVaRCgCK2CJO6RMbr4EOcABAbZxrSsNvRkca abK49kVUIR1sGVNghWMxaK+pLonzAp1B2N8mc2cZPdsxUhEXkewjoEUR4CsjBXKRSwY+F45+5t D8c= X-IronPort-AV: E=Sophos;i="5.73,448,1583218800"; d="scan'208";a="76765191" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 29 May 2020 07:11:41 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 29 May 2020 07:11:44 -0700 Received: from soft-dev15.microsemi.net.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 29 May 2020 07:11:38 -0700 References: <20200513133122.25121-1-lars.povlsen@microchip.com> <20200513133122.25121-3-lars.povlsen@microchip.com> <6398c7a6-ce5e-1df6-d5a6-08664a7fc123@intel.com> <87v9ktoc0h.fsf@soft-dev15.microsemi.net> <87wo56q2o3.fsf@soft-dev15.microsemi.net> <87sgfoozt8.fsf@soft-dev15.microsemi.net> From: Lars Povlsen To: Adrian Hunter CC: Ulf Hansson , SoC Team , "Microchip Linux Driver Support" , , , , , Alexandre Belloni , Lars Povlsen Subject: Re: [PATCH 2/3] sdhci: sparx5: Add Sparx5 SoC eMMC driver In-Reply-To: <87sgfoozt8.fsf@soft-dev15.microsemi.net> Date: Fri, 29 May 2020 16:11:37 +0200 Message-ID: <87k10uq19i.fsf@soft-dev15.microsemi.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lars Povlsen writes: > Adrian Hunter writes: > >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> On 20/05/20 2:14 pm, Lars Povlsen wrote: >>> >>> Lars Povlsen writes: >>> >>>> Adrian Hunter writes: >>>> >>>>> On 13/05/20 4:31 pm, Lars Povlsen wrote: >>>>>> This adds the eMMC driver for the Sparx5 SoC. It is based upon the >>>>>> designware IP, but requires some extra initialization and quirks. >>>>>> >>>>>> Reviewed-by: Alexandre Belloni >>>>>> Signed-off-by: Lars Povlsen >>>>>> --- >>> {Snip] >>>>>> +}; >>>>>> + >>>>>> +static const struct sdhci_pltfm_data sdhci_sparx5_pdata = { >>>>>> + .quirks = 0, >>>>>> + .quirks2 = SDHCI_QUIRK2_HOST_NO_CMD23 | /* Card quirk */ >>>>> >>>>> If this is a card quirk then it should be in drivers/mmc/core/quirks.h not here. >>>> >>> >>> Adrian, I had a go at changing the controller quirk to a card quirk. >>> >>> Unfortunately, SDHCI_QUIRK2_HOST_NO_CMD23 does not directly translate to >>> MMC_QUIRK_BLK_NO_CMD23, as for 'do_rel_wr' in mmc_blk_rw_rq_prep(), it >>> will *still* use MMC_SET_BLOCK_COUNT (cmd23), causing the issue. >>> >>> We are using a ISSI "IS004G" device, and so I have gone through the >>> motions of adding it to quirks.h. The comment before the list of devices >>> using MMC_QUIRK_BLK_NO_CMD23 suggest working around a performance issue, >>> which is not exactly the issue I'm seeing. I'm seeing combinations of >>> CMD_TOUT_ERR, DATA_CRC_ERR and DATA_END_BIT_ERR whenever a cmd23 is >>> issued. >>> >>> I have not been able to test the controller with another eMMC device >>> yet, but I expect its not the controller at fault. >>> >>> So, I'm a little bit in doubt of how to proceed - either keep the quirk >>> as a controller quirk - or make a *new* card quirk (with >>> SDHCI_QUIRK2_HOST_NO_CMD23 semantics)? >>> >>> Anybody else have had experience with ISSI eMMC devices? >>> >>> I have also tried to use DT sdhci-caps-mask, but MMC_CAP_CMD23 is not >>> read from the controller just (unconditionally) set in sdhci.c - so that >>> doesn't fly either. >>> >>> Any suggestions? >> >> It is up to you. In the future, you may want to distinguish devices that >> have this problem from ones that do not. >> >> If you are not sure it is the ISSI eMMC, and maybe not the host controller, >> then might it be the board? Perhaps make SDHCI_QUIRK2_HOST_NO_CMD23 >> conditional on the particular compatibility string? >> >> At a minimum, change the "/* Card quirk */" comment to a fuller explanation. >> > > Adrian, I'm getting a board ready with another eMMC device, and we're > also trying to contact ISSI for info. > > My hope is to at least verify whether this is a controller or a card > issue one way or the other. Then, I'll choose an appropriate solution > for it. > > Thank you for your advice so far. > I was able to try on a board with another eMMC card (panasonic), so that clearly casts the suspicion on the controller, and ISSI is in the clear. I reintroduced the original SDHCI_QUIRK2_HOST_NO_CMD23 quirk, with a "Controller issue" comment. I will refresh the series shortly. Cheers, > ---Lars > >>> >>>> Yes, its supposedly a card quirk. I'll see to use the card quirks >>>> methods in place. >>>> >>> -- Lars Povlsen, Microchip