Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1319708imc; Mon, 11 Mar 2019 11:03:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7mN7gtgOVKpd3xYsmCawvhfyPB5r0TVuZ+UhF+XnwfUR2wVf5iU0P/sQqDwveLpdN7cqB X-Received: by 2002:a63:6193:: with SMTP id v141mr2317895pgb.392.1552327438851; Mon, 11 Mar 2019 11:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552327438; cv=none; d=google.com; s=arc-20160816; b=l4qBA4IyeSMtt5qIwSrat3Au6MU97oUkA7fsSlXbB70aYUOiiXX4gGho273DinXf0p Sl0GBnKaqTGZa3hIINOp1+tLO4Mz72MP22VXTIRLFdhdTuEqjL9HqCBCh0jQH+dlkvxK CWKpZfHvEdJCZjNGYEoozMCSwtaRmwi8tpjkgE38UhS3lQ3gjiG+0QSP0qIHJGWXyXsE 0YOxI/hUpMVG1J/LBNYr6oFxN914sGjgCNxE5cNcHZlO6XF3Vaik/M2r2JtR+CBy553G Mp/GOuLuPSLemhOncNwIkFlCAaLFLu15g2NloDFgzwKR3+AXZph/m6qTS3x7mQv8QytG BV2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=xXfxhjVfx7zZWxrfDnvmqGqXifxOh5qV+ofa+zpuvKs=; b=V7Ir52Cy0mUGfiD+EmdvRkKCN7NUB2o1pDxvIJqXgBAPqKc0MBQ0X1uRQUcgZ3hYQC 3PvVkXXWr59fRy1s9LRTLJ9w1lq/zNMWMb5dEJUPftwuPt7QbCalXoaVhTUaVz2iTGfb igvJcTzpwxyhdnPbdYwD9dTV3FX2jHwBQmXp4uPjc98OC0RqhdVxfX5YXD8D61/MKTRp iaJhPi2yDej21keM5VIEo7GdCi383MpQG1TUJDVx7qxuXN/QVMc4H0NuKc27uvfaHyG/ rz2Xm1dqdqbKv5r6Ym7r4mKCp1k+CX4qgYl+lAKoi3YQW1EpkR0tfyJtZ/Dsa4SGPfI3 X0jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=miHsXDG2; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si5197723pgs.553.2019.03.11.11.03.43; Mon, 11 Mar 2019 11:03:58 -0700 (PDT) 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=@nvidia.com header.s=n1 header.b=miHsXDG2; 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=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728212AbfCKSDJ (ORCPT + 99 others); Mon, 11 Mar 2019 14:03:09 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5151 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728039AbfCKSCr (ORCPT ); Mon, 11 Mar 2019 14:02:47 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 11 Mar 2019 11:02:36 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 11 Mar 2019 11:02:47 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 11 Mar 2019 11:02:47 -0700 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 11 Mar 2019 18:02:46 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 11 Mar 2019 18:02:46 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.110.103.53]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 11 Mar 2019 11:02:45 -0700 From: Sowjanya Komatineni To: , , , , CC: , , , , , , Subject: [PATCH V2 06/10] mmc: cqhci: allow hosts to specify dcmd cmd timing parameter Date: Mon, 11 Mar 2019 11:02:35 -0700 Message-ID: <1552327359-8036-6-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552327359-8036-1-git-send-email-skomatineni@nvidia.com> References: <1552327359-8036-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1552327356; bh=xXfxhjVfx7zZWxrfDnvmqGqXifxOh5qV+ofa+zpuvKs=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=miHsXDG2LoaX1G/up29xg0uTiIG5s+45TUAnf2YY8zvrOabfuuHaZZewnrNsalN43 e1ozW/7QV96ZMzw5F0AP6qkIMbIUFZeXKDObpemcjgbJjKqqJJ+mWqYPM6qUZJeC4c EPhBx2+Qnh02S6mODy/jKnQwjOwkKvVko9ZpUkgtyVcVUX/xgwg1gcpyK/cOsp2Bwk ZfmbqWe5XW+cv1hdpPP9PopfdGH5RvKA3lmn2CJeS2nd6PC9K7TJ2baulujJ05p+ki yrlc1iXS+2iFClTPRhy/8kX9DgpClr2dTJrSVP54k0l1WMtU+AcRuzGB+1kEm80azS 9wP6Gek1FRyaA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds get_dcmd_cmd_timing interface to cqhci_host_ops to allow hosts to specify CMD_TIMING bit of the DCMD task descriptor command parameter. This helps host driver to control whether the command can be issued during data transfer or only during idle time. Tested-by: Jon Hunter Signed-off-by: Sowjanya Komatineni --- drivers/mmc/host/cqhci.c | 2 ++ drivers/mmc/host/cqhci.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c index a8af682a9182..9a02f9c82aeb 100644 --- a/drivers/mmc/host/cqhci.c +++ b/drivers/mmc/host/cqhci.c @@ -528,6 +528,8 @@ static void cqhci_prep_dcmd_desc(struct mmc_host *mmc, } } + if (cq_host->ops->get_dcmd_cmd_timing) + timing = cq_host->ops->get_dcmd_cmd_timing(mmc, mrq); task_desc = (__le64 __force *)get_desc(cq_host, cq_host->dcmd_slot); memset(task_desc, 0, cq_host->task_desc_len); data |= (CQHCI_VALID(1) | diff --git a/drivers/mmc/host/cqhci.h b/drivers/mmc/host/cqhci.h index 9e68286a07b4..981158da3326 100644 --- a/drivers/mmc/host/cqhci.h +++ b/drivers/mmc/host/cqhci.h @@ -210,6 +210,8 @@ struct cqhci_host_ops { u32 (*read_l)(struct cqhci_host *host, int reg); void (*enable)(struct mmc_host *mmc); void (*disable)(struct mmc_host *mmc, bool recovery); + u8 (*get_dcmd_cmd_timing)(struct mmc_host *mmc, + struct mmc_request *mrq); }; static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg) -- 2.7.4