Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp669797ybl; Wed, 8 Jan 2020 04:01:10 -0800 (PST) X-Google-Smtp-Source: APXvYqx7MqyDI/N/2Dsmdfr5MKkgV/YF4+tKSa0d5GyCHoi/hF4sWVnl8E4bUCMFpafaCLy2FTgI X-Received: by 2002:a9d:10b:: with SMTP id 11mr3922578otu.222.1578484870814; Wed, 08 Jan 2020 04:01:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578484870; cv=none; d=google.com; s=arc-20160816; b=Ly9dN151Fk9XawxnY+/KpXmr9UlQYbceUYlW+CqfN+kVo7zUMf9jzyAg33xbAR6Lfi n6qS/pXlXKznF/pv6r6Se1V6+v8MZ1Zwo8Hj/GWKZX2XW/lQVggY0zV1+HtF4TLiSSqm 1WOQPcKyrBQ5K2ntyx8rl7JmhGoRO5Xn4vo8Ck8SbuK5gaJuyxmQjj/zAXq4P+m8OOyq E2FtwYnKo0nOXSfy9BZe/YubMldYC0CKdSAGXnyHzwC58wfJU+SVMKDbdEBwkGwzKyE6 k4zgucXmhv1qLsas0MHF6819O+tNMN40zq2CCUtqpIQQckIeRVDpwNKZ6vK7fKYZTC0n 3TLQ== 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; bh=r8WRNwuILCvs271+DlOqkte4uWnwVAF0wYbexor4UnE=; b=moqeQDdD4kR0KAlWGuVe/M2YYhQs/8AVydiDoHAeABwEYarTk/wMttzhuMM3opzP2R 2Wp30a8bxooY3+KOAV9BTEa4N9jvAU4RhYXuHzpRNkklZOmDXt3/HVVxFMp3lIUrMZMF ZMEPeiC47OnK25E5PC3DXOierCbrz7wlrPL6Jr3QcIk/gntYF0k4AkKW4ANvPlHMbV0z SkGJA39fNK+3q2mUzJyGcdQquvj2YYCvj9hLBGPBQ/GlwKeY6+b3Ewf1h1Odv36+0e/R /8zsxZf/ipqyp5/SFzpS0tKhOSVvUFFWG0X1MHK+ZgZpwD2W5/cW21dGVMsNOS/NxAG1 skew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id u130si1666502oif.94.2020.01.08.04.00.57; Wed, 08 Jan 2020 04:01:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727378AbgAHMAD (ORCPT + 99 others); Wed, 8 Jan 2020 07:00:03 -0500 Received: from mga14.intel.com ([192.55.52.115]:62784 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbgAHMAC (ORCPT ); Wed, 8 Jan 2020 07:00:02 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 04:00:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,409,1571727600"; d="scan'208";a="370926604" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.167]) ([10.237.72.167]) by orsmga004.jf.intel.com with ESMTP; 08 Jan 2020 04:00:00 -0800 Subject: Re: [PATCH 0/3] Fix issues with command queuing in arasan controllers To: Faiz Abbas , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com References: <20191230092343.30692-1-faiz_abbas@ti.com> <837996b2-c69f-1446-fda4-5577e28ba8e1@ti.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <9c74c1b9-8ae4-49be-68e3-8e827d07cc66@intel.com> Date: Wed, 8 Jan 2020 13:59:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: 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 8/01/20 1:49 pm, Faiz Abbas wrote: > Adrian, > > On 08/01/20 5:12 pm, Adrian Hunter wrote: >> On 8/01/20 1:30 pm, Faiz Abbas wrote: >>> Hi, >>> >>> On 30/12/19 2:53 pm, Faiz Abbas wrote: >>>> In some Arasan SDHCI controllers, after tuning, the tuning pattern data >>>> is leftover in the sdhci buffer. This leads to issues with future data >>>> commands, especially when command queuing is enabled. The following >>>> patches help fix this issue by resetting data lines after tuning is >>>> finished. The first two patches have been tested with TI's am65x and >>>> j721e SoCs using the sdhci_am654 driver. >>>> >>>> I have a strong suspicion that this is the same issue with >>>> the sdhci-of-arasan driver where they are forced to dump data from the >>>> buffer before enabling command queuing. I need help from someone with a >>>> compatible platform to test this. >>>> >>> >>> I had some discussions with our hardware team and they say we should be >>> asserting both SRC and SRD reset after tuning to start from a clean >>> state. Will update the patches to do that in v2. >> >> Can you use the ->execute_tuning() for that instead of a quirk? >> > > ->platform_execute_tuning() is called before __sdhci_execute_tuning(). I > need this to be done after that. Should I add a post_tuning() callback? I meant hook host->mmc_host_ops.execute_tuning and call sdhci_execute_tuning() and then sdhci_reset(), like in intel_execute_tuning().