Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6471444ybl; Wed, 15 Jan 2020 05:18:07 -0800 (PST) X-Google-Smtp-Source: APXvYqziEwkoWaZrB7wt5iDW7EfIEib2Q9ODAw3ar3t9ln7ir7jF6PYGD4UZhb4ewL8hMKmT8QaH X-Received: by 2002:a9d:7b51:: with SMTP id f17mr2644066oto.302.1579094287789; Wed, 15 Jan 2020 05:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579094287; cv=none; d=google.com; s=arc-20160816; b=zvRYVwPpt/mjqJqvznyacbNuYL22uma+67936NeJ4CbcLqkaudnMrgm2HDcvoH7uWy 1tW9jt0BYZrMWtW69IhYzXL7SgN0C6BRK8QLCCTxuo0I7ZVMA4csPf6HJvP6RIyAvhPs I9dM1mG2hr1tzaup9CfBBfZ6vgTczZxhJ7eB4ofgA6lomA0mRDJMYQkBA5pT/HI0nIZY N4DaP+dic3amR/8baayeXcfRzVQdIRMQq0XWY9ccp2dX13d3ftpJ0U47uDOF94JFA/bv +5HvqlXtxusBAFmeQ19VlkQNgsfUoivK6OE8lsQkDxuOMT+/a5C/O0xozeX4pwXdx2Hm g4Zg== 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=KvF4sxmUy+LE0h76DzD47cu56YJxpqYxaVRaY3McYng=; b=PhYwWesVH3Op5dPVutIxCkDhy4voMrUP4QpBehSB09nqiA3mrLYHFnEJGXohozjjBN nNhSSLzB+MtxlkGH9ezIN68ax79/rdRxPWGRi+xjuHU5tXNpjD0fUqRl4NYntikCVhGP eT8dDhnsvl17uuC/U6zJBI8lStJ/mPcW7FuKr2Ra+EJj0qPhitC+5On8lmwGkf2WHsIP /M9WfaCYDbhXOeJJV9ec5jVYO2mUt9jalgmMswICjzxgaU7tb1MKI5MU+UKlYEdYribU hxlAHaR5t+tMCVFbtQ4GgxCoGkiQmL3201EN9BBsusd5Y/HHg6ucOFhvcJV9PAAOisH5 +HPg== 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 u127si8843614oig.71.2020.01.15.05.17.55; Wed, 15 Jan 2020 05:18:07 -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 S1726552AbgAONQp (ORCPT + 99 others); Wed, 15 Jan 2020 08:16:45 -0500 Received: from mga11.intel.com ([192.55.52.93]:48309 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbgAONQp (ORCPT ); Wed, 15 Jan 2020 08:16:45 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 05:16:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,322,1574150400"; d="scan'208";a="256770814" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.167]) ([10.237.72.167]) by fmsmga002.fm.intel.com with ESMTP; 15 Jan 2020 05:16:43 -0800 Subject: Re: [PATCH 3/3] mmc: sdhci_am654: Fix Command Queuing in AM65x To: Faiz Abbas , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org References: <20200108143301.1929-1-faiz_abbas@ti.com> <20200108143301.1929-4-faiz_abbas@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: Date: Wed, 15 Jan 2020 15:15:50 +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: <20200108143301.1929-4-faiz_abbas@ti.com> 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 4:33 pm, Faiz Abbas wrote: > Command Queuing was enabled completely for J721e controllers which lead > to partial enablement even for Am65x. Complete CQ implementation for > AM65x by adding the irq callback. > > Fixes: f545702b74f9 ("mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E") > Cc: stable@vger.kernel.org > Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci_am654.c | 27 ++++++++++++++------------- > 1 file changed, 14 insertions(+), 13 deletions(-) > > diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c > index 59c0c41b3739..b8fe94fd9525 100644 > --- a/drivers/mmc/host/sdhci_am654.c > +++ b/drivers/mmc/host/sdhci_am654.c > @@ -256,6 +256,19 @@ static int sdhci_am654_execute_tuning(struct mmc_host *mmc, u32 opcode) > return 0; > } > > +static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask) > +{ > + int cmd_error = 0; > + int data_error = 0; > + > + if (!sdhci_cqe_irq(host, intmask, &cmd_error, &data_error)) > + return intmask; > + > + cqhci_irq(host->mmc, intmask, cmd_error, data_error); > + > + return 0; > +} > + > static struct sdhci_ops sdhci_am654_ops = { > .get_max_clock = sdhci_pltfm_clk_get_max_clock, > .get_timeout_clock = sdhci_pltfm_clk_get_max_clock, > @@ -264,6 +277,7 @@ static struct sdhci_ops sdhci_am654_ops = { > .set_power = sdhci_am654_set_power, > .set_clock = sdhci_am654_set_clock, > .write_b = sdhci_am654_write_b, > + .irq = sdhci_am654_cqhci_irq, > .reset = sdhci_reset, > }; > > @@ -278,19 +292,6 @@ static const struct sdhci_am654_driver_data sdhci_am654_drvdata = { > .flags = IOMUX_PRESENT | FREQSEL_2_BIT | STRBSEL_4_BIT | DLL_PRESENT, > }; > > -static u32 sdhci_am654_cqhci_irq(struct sdhci_host *host, u32 intmask) > -{ > - int cmd_error = 0; > - int data_error = 0; > - > - if (!sdhci_cqe_irq(host, intmask, &cmd_error, &data_error)) > - return intmask; > - > - cqhci_irq(host->mmc, intmask, cmd_error, data_error); > - > - return 0; > -} > - > static struct sdhci_ops sdhci_j721e_8bit_ops = { > .get_max_clock = sdhci_pltfm_clk_get_max_clock, > .get_timeout_clock = sdhci_pltfm_clk_get_max_clock, >