Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1326556ybs; Mon, 25 May 2020 13:03:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYCMDhLdSnnoaAeKD141cNTLXb93weBgMYGbGEnnCH4Vi2sdEvyKs4SWnudmw3yd8OmsOv X-Received: by 2002:a50:8707:: with SMTP id i7mr8902805edb.180.1590436989441; Mon, 25 May 2020 13:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590436989; cv=none; d=google.com; s=arc-20160816; b=sR57wxas9d/bGsxSS+zTwlKEG6pt7+XkB80VH6CQBUqbvN8WoyDQmHcNR9p+hTuA4l VoZSnV0H1iPT0mNEffmRIMn+Ov+ANI6mwHL9KAWi6ffZLNeDYDOTeN9GiFHouW1wIjzJ J+QMMq17OZJjXpqUVs5+HzxEpl+5y5WyAYHsXYuGk8V2CowNtAUBG9MRY3hesOKAsQ2U PHNiH7LhmXeuUd8MWAo5pKQb6hMnvVDiKbBbxvfYjMM47PQPoHzs0snV5COrLi9gCH2f 4xRE5h4/LVeBinENVzZ9vhHcCXyiwCTynsOF0FT1BnGJxCgCoLRt/Ow4MdkJOjnTiDIZ e4YA== 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=sUWHlsuUK4oMaThOAxtkJbFkuDtnEEtNupPJPNa30Qg=; b=wQOiPB88VteJ7k7lCl6cv1iYH3zwIJLWMKr1fVKGWFY0xdc+dt6DUnSgW8JAZTK00a g7PEdyoXUboxqpQKtC6/rl8gvPHUPzUsjTGue1Hf7TgR3GewxNJ1PMGnbfKuNjhHdv5o Lbxv57ZE6JoMutaImhCLCnNURewm6KYxIP8U20gVJ8qlGLWiFCE9RuCpq8FqZY+tCysp hJEQ+VYWLMO3rnoIN6Wzq+l78ztnEYS5BLbawZYkK2pc0s7zycom4MB0Cty13laIo5bA jHlp2wc2tihjRTWqr0s7pTaXpkD6rVIz6NJFAKUWR0HosCdNpPhzDedAzbIdlHLWdWf0 gQ6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b="dE1V/r8P"; 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 y43si11312328ede.404.2020.05.25.13.02.46; Mon, 25 May 2020 13:03:09 -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="dE1V/r8P"; 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 S2390909AbgEYO1E (ORCPT + 99 others); Mon, 25 May 2020 10:27:04 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:7220 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390879AbgEYO1E (ORCPT ); Mon, 25 May 2020 10:27:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1590416824; x=1621952824; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=GFYGDQDidiAIsf6A9qkRWMwevlywavapMyZL4vq1R3o=; b=dE1V/r8PYysMBFIYfsnaQed5+M+qPNcngXFq9gTcl1tcWji3CEu1sCQr p8SbfqbFcXZ9Z1qz4zpE/CTdr0hwAscVZq9Nkd6ie/i11pt5qBwpyGKy6 maUE7KtVGqte92kc4u3kbHJMjYLlxpUCCjpCsBRLkxwv6+HTPhZr8QKFR l/og+IggISkpNNpNP8WQQFV3piW1bDKP3mA3TekMoxOIGFyb3cuGVu2F8 M6vqZ2NClBTLgnmzAT3+eb4OK6bIb9BtQqr0rs9HqQMGNx5lZp092OAoZ fipKqvRhsGfKKYU+c1jpX+ZrM4+TQrdQRhtFK3RJEFgRGzWf5C6xhtk6R 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 CC: Lars Povlsen , Ulf Hansson , SoC Team , "Microchip Linux Driver Support" , , , , , Alexandre Belloni 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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