From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49DF9C433E0 for ; Mon, 25 May 2020 14:27:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D03B20888 for ; Mon, 25 May 2020 14:27:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nxKECGwL"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="zc71N2lR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D03B20888 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date: In-Reply-To:Subject:To:From:References:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BIPbIWv2IflDqOmD4xmKh9NENBYaj8pzwGiUnE5wae0=; b=nxKECGwLN0UAU6i8VECDGoomUM k51+CPF3CMotBn9vMizsAfGD1KYzk0IN+q7e7bstWeLlDNpCA5f7CqN1/iBmAMbjtWSbGwI6GAGf0 hD9KaAptqyZ9YcVHvDDWoMzfsBYcRmHYGFmXHzdGmTXXrevT+wgcpuyN5viRYkcDMSOFtPWlWVjcI gSEMrbLuXNKZll3FvDO68zTLUxoKapFIOEsXWZjCfxEJMUneG7JM0xUmp5Y+8SB54LZUqlz7wU0EI AFkYWAhGWLJuHYMGcgavVa+aF7qPNT7OIp0i4vN8xKpt3XWV7JPkZkRQI5Z57AJNFAxPgOC8bYped qhjSyj3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdE4O-0002De-Ij; Mon, 25 May 2020 14:27:12 +0000 Received: from esa4.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdE4J-0002CR-Ek for linux-arm-kernel@lists.infradead.org; Mon, 25 May 2020 14:27:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1590416827; x=1621952827; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=GFYGDQDidiAIsf6A9qkRWMwevlywavapMyZL4vq1R3o=; b=zc71N2lReX+mUV6dFDPIQEA8bQ9Ad+eGsvkFDELeXt3b5KJsuIjdBh4l B9RKX3NQjd0+w1v14QP29/j4+03+4kQYWkVU+s6eJpBy9x+k8PQqiO1RB IPnxhj7zZP06YbVbmXxRFzTwNLep81gbTfPTEmEol3uaXRBcuP/6L5AF7 74ugcRwxEVQf7Gkojsh+y/jUndDqL5UIEiYVqzCSBOg7HvQ6DUkJviBz4 N7ELtielbq0DyP4aYr4oC5JGVxVzj6YfcswOVMA6xoGIsqLMpjBDtGWAG CWbpOmcbqcCyAnbP1MZUa1SLgMKqXhTnI8ybTxRMpfUo6GgrpToJ2kNAv w==; IronPort-SDR: b2/4aXB09gGz4fU4ObByebBRtITl0q6dSxd9wzWdo7W8teK24GN3lCnoNM/H11S0qrmP3OYiyy b4+L8Z5qmZn8+jxryZ21rB3zJdnAHRZcsjA/tbRDvxAVwDtAKj/U5BlVt5Gxe5Bee1EdrygqN9 JvnbXgC2QAM2vJwDviz4VRAl7bfYsUzXKqcmy9WvWo98gaHAjpFlMTVWLfs7oERoQcRaau9cFi /DxZBpY3JL7k02ALG+WCyBO7hh8rS4qULchSdVOmSZ4pkNXZzaEwTURAIDq1vljsMZnhjcBIBx aEY= X-IronPort-AV: E=Sophos;i="5.73,433,1583218800"; d="scan'208";a="74410943" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 May 2020 07:27:03 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 25 May 2020 07:27:02 -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; Mon, 25 May 2020 07:27:00 -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> From: Lars Povlsen To: Adrian Hunter Subject: Re: [PATCH 2/3] sdhci: sparx5: Add Sparx5 SoC eMMC driver In-Reply-To: Date: Mon, 25 May 2020 16:26:59 +0200 Message-ID: <87sgfoozt8.fsf@soft-dev15.microsemi.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200525_072707_610838_1F5EBB58 X-CRM114-Status: GOOD ( 18.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Cc: devicetree@vger.kernel.org, Ulf Hansson , Alexandre Belloni , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Microchip Linux Driver Support , SoC Team , linux-arm-kernel@lists.infradead.org, Lars Povlsen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. ---Lars >> >>> Yes, its supposedly a card quirk. I'll see to use the card quirks >>> methods in place. >>> >> -- Lars Povlsen, Microchip _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel