Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp915025ybl; Wed, 8 Jan 2020 07:59:51 -0800 (PST) X-Google-Smtp-Source: APXvYqytG4oDhc0LfeE94YMGhFoCxJMuJsF8LqL3o4Ur6tJ8amaxLuzOPJn9v8YnPpsb6ZJWU87b X-Received: by 2002:aca:5083:: with SMTP id e125mr3706170oib.96.1578499191812; Wed, 08 Jan 2020 07:59:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578499191; cv=none; d=google.com; s=arc-20160816; b=gK6pWC57wV2L0N6+gIZnOq8bMyVlMcOnBWyCZ1QpbbZjM1A3ZKQeFn8INYsfPkjfLU BraYMdxub7yOTrXeFULOHMMsSo5uxmlY518mOqNbXVDJUxF04skyeTLOq0F5XgtFxBPB u1ryaBqwU+AMGNT0KArTI9dkujwjC4LauNhsXtKGXInUUGgBHY2GJpRrmMisZ9NMB91a 30i9VNgnAgBRTgd1B7B8KrgcLoLiAciOwkOosKw4iv8XGxbzCKssvWdAYp21GIxbysFP sI31VojPgQs4Z58/pIPahSnGa1jUG9sIY8xlSL4Wv5FefFvIuBdt2fTPtNrUW/QVJFEP nWaA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zHIIrACqLL9VHEPM34U/A7g8x9YWRzxHUu+RtrxLOpU=; b=bUDXZkRKuWvcPTOCVPOsCP/X1QQNsKCHv1tlYDrTwt14oD3j26RMPXp0tX2tLyzBZ7 F39DYD+cywtVhJLlzS7ioMQ0bppsTtyk6CedmKdz6LBzFhv1Ki8lDdDFc1ts3ptIUHnh 9iCKVWNrvugotBek3MTMQMof40Gz8ISVMpB+/7XTlyHSjU3M6uZQJ8MxPCEpiJ8WN8Kn RoD2gp0270EX2WMtd4IfWe4JM30DnA08PhJVLAfSEZ8nSADD3eyoxHZtll/fzdv9UNfw 2JGkz5kaTNNIbExx/eLQzlhjkGqyFmojWdWYh6IVp04k59UXX9ENQn5044LYcT2bDfh0 Ka2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rHLrLx3+; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s16si1945655oih.4.2020.01.08.07.59.39; Wed, 08 Jan 2020 07:59:51 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=rHLrLx3+; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728795AbgAHObm (ORCPT + 99 others); Wed, 8 Jan 2020 09:31:42 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36984 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgAHObi (ORCPT ); Wed, 8 Jan 2020 09:31:38 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 008EVaPl065332; Wed, 8 Jan 2020 08:31:36 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1578493896; bh=zHIIrACqLL9VHEPM34U/A7g8x9YWRzxHUu+RtrxLOpU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rHLrLx3+7zgCDGRnKuFbMhHB0jluNBDt0xdLAC9eCqqLlHnp4Ncr2HsQN2uJl5aL8 Jo4buNXbiXNpaUvlFG2py6Yl/hpLD19+s77Ksgkwcjoekv5qiBSNxOri48f9t+/EV2 0JJjichGF1dQOc4hLmi3J8BU4W1iD3pt//+Gij5g= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 008EVaZE049289; Wed, 8 Jan 2020 08:31:36 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Wed, 8 Jan 2020 08:31:36 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Wed, 8 Jan 2020 08:31:36 -0600 Received: from a0230074-OptiPlex-7010.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 008EVS9X112013; Wed, 8 Jan 2020 08:31:34 -0600 From: Faiz Abbas To: , CC: , , Subject: [PATCH 3/3] mmc: sdhci_am654: Fix Command Queuing in AM65x Date: Wed, 8 Jan 2020 20:03:01 +0530 Message-ID: <20200108143301.1929-4-faiz_abbas@ti.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20200108143301.1929-1-faiz_abbas@ti.com> References: <20200108143301.1929-1-faiz_abbas@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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, -- 2.19.2