Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp520327ybs; Sun, 24 May 2020 12:29:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxF5F1JCqpZkSStdrpEYfpW7plWJIDClMgAPZMlrYCiA4aINNdl6dopYBjrYuiW5+W1Lii X-Received: by 2002:a17:906:9384:: with SMTP id l4mr15893019ejx.168.1590348582097; Sun, 24 May 2020 12:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590348582; cv=none; d=google.com; s=arc-20160816; b=sAotilwDWGkIVyW/P1YZMpW6QHiBbCo14pgKj+A1gId4J/NiNGbHzvmKXa247iRaHa muFrGuBc8fYftL10QZq1XJq2STHQNUmhKSZjF8zSFEvxSoy4fLyCb807apz+E1D51Bop gx/dOgZt81yZqgcF7FFvn56nS7tGvioyqHqqEeOCZk8N1LFndXDza0MGvgJ8e+hx7zJM 07RY4LMcbZrV+//cKTKJClzwIooApsOgl4jNoEUxtBRU+i7LE5HUBzoMKyeFO379MQDV lKbaP9P9FcM8uLTy8jEx5TSz7oMNxLgfrn6lTLUEuDRuDAtp97pfMftdPDV9C66UNBNz A2Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:ironport-sdr :ironport-sdr; bh=Q6tt6qfybzIze2k+qsyva/LRTOdfuFO6WezA1qT4Ij0=; b=dytDzIT5z1cYb2hnAFB2hSu92Mrh0VK/RhQtNU01+mx3zcVsYVekp5XnjxS7pyW6Rp N2qAAI0BJaJ8o+QpAJOMv5qPRGB53N0lRKm0KpXTf487kk8QaDhH2kKh1koDSRm/zVQs RbZYswwQR21VNGDw2vtRD/y7lpcUvKyiQUnHPcg7OA9ca9zNFK2pxNTP/W3RgO7sjo26 p1a11J27K0L0LHxerIZswXfSSJVBvZCIVWLn1BA6zM56iDdvChYYTVi9UkDtfYPjjMj0 7tu/5366RhBS/w5E2QHVDrQ8RdGDiX8W9xGGauEQIDy9YtakRm+ye30L/r1b4veoTLPc y3/Q== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r22si2405912ejo.327.2020.05.24.12.29.19; Sun, 24 May 2020 12:29:42 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388256AbgEXT1H (ORCPT + 99 others); Sun, 24 May 2020 15:27:07 -0400 Received: from mga17.intel.com ([192.55.52.151]:57044 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388084AbgEXT1G (ORCPT ); Sun, 24 May 2020 15:27:06 -0400 IronPort-SDR: By0a9SYhJ4TZ0JTmp34WG8jdU48wtKFiM7XgPJAWNyaaXGepPb8f8+UZ65hsfFwu1lORA67o03 fJZ0vrn521Jw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2020 12:27:06 -0700 IronPort-SDR: Jt1wxSweHy/gcVmjApzJ6eqN4bNznRQXVLnIg1IoO4kg/6e/ivSQzfrpA+9iAoRqDLNMEBs8k6 LYbv/QAMX3Jw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,430,1583222400"; d="scan'208";a="413310334" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.157]) ([10.237.72.157]) by orsmga004.jf.intel.com with ESMTP; 24 May 2020 12:27:03 -0700 Subject: Re: [PATCH 2/3] sdhci: sparx5: Add Sparx5 SoC eMMC driver To: Lars Povlsen Cc: Ulf Hansson , SoC Team , Microchip Linux Driver Support , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni 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: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Sun, 24 May 2020 22:26:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87wo56q2o3.fsf@soft-dev15.microsemi.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > >> Yes, its supposedly a card quirk. I'll see to use the card quirks >> methods in place. >> >