From patchwork Tue Jul 11 16:20:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 107407 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp5087787qge; Tue, 11 Jul 2017 09:23:24 -0700 (PDT) X-Received: by 10.80.179.12 with SMTP id q12mr3082710edd.151.1499790204054; Tue, 11 Jul 2017 09:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499790204; cv=none; d=google.com; s=arc-20160816; b=CWUaKRzb59EtnuP9beFOvwtWoIK9rm3wWMXPWArMSNcVhSZhG8cvmAmSbNqkcumB3S wjhSE/CRdZ6tdPN4vwRLc8POlDvQBAv+091Q8EYy3OnKjEzWidYiBmVWmIgUinHCuXI/ 3uSZUYOtab91ldocYmkCESdyMX3bT5ox6trIL8H0rBbxG2NuyWgQKzT1F+B+l/FH0xwy oJD9taqjwbC9frjbwqlulibe9dsLXI15lXW4pmgZ73A4cyu0LjkaOVCy8S20LIoyY5Pn WAI21a2o7K1wUicTuXfhl00XPPmoCVdRhQFlU+ImKT7FaltpWE9Fcw5cvLjhlOJQeYzv eBhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=hYXO1zEPN1f5VQ4P7c4Iyn0LlAAMPQCQ+nj7po54Ed0=; b=o8qSNNJc+Ju0+I4KI/rXG+Xm9P45iQueNDDJ6MXkzGDcYLDfOC+YrQK9BKeh6zsmAB fzvZBJvmfqnuueSbVFgbhCgw/xCUTVCxyU2qU0EwVj4f9mluZ7133qWehFQf3i6upI8b Jc0b7L8MKRHsL+Jj/M4/KH8zEfB87VmonFkS4ChsslCvO6zM/1As3h8qchVkX3B1khZX Mb+aGXQ9kT+3yMAO44v4qjAJzKyrGNaZ4ZgyzrqnSPPgyKdi9pYa9eqwCVMHvA5zwdN9 arhVDfBVSz7RmiGBpn0npUoupCf2ZEqgQgTBmiZTlpg4oOsuwt88NzczgAzIH8txCZAZ aX4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.b=jolb6dGS; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id d33si1889946edd.209.2017.07.11.09.23.23; Tue, 11 Jul 2017 09:23:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.b=jolb6dGS; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: by lists.denx.de (Postfix, from userid 105) id 9DE27C21D56; Tue, 11 Jul 2017 16:21:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7D2C1C21E58; Tue, 11 Jul 2017 16:20:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 124C0C21C73; Tue, 11 Jul 2017 16:20:27 +0000 (UTC) Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by lists.denx.de (Postfix) with ESMTPS id 0D5B0C21E63 for ; Tue, 11 Jul 2017 16:20:23 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v6BGKMx5006028; Tue, 11 Jul 2017 11:20:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1499790022; bh=drYEDhcZcg8IetpQxi5107b9LTd5UecDZtwzcYmjOVI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jolb6dGS1S5NEtNTEwkFuVNiNsf0WpRGuEUDPY2zrfvzYi5tc0wDMNA8rzKNQMqCE GrfVLv3ipwbqdvi7zkfh0NsP4MoMEGNjaYsqDgmCc8ppvYE5eHduErg0c+HvetWY7g 2tx3EQcsolA26e1KSNIaBE2WNVaTrYE0lNYBMsIs= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v6BGKMVD012217; Tue, 11 Jul 2017 11:20:22 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Tue, 11 Jul 2017 11:20:21 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v6BGKLoQ028982; Tue, 11 Jul 2017 11:20:21 -0500 From: Jean-Jacques Hiblot To: , , , , Date: Tue, 11 Jul 2017 18:20:13 +0200 Message-ID: <1499790014-29964-5-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499790014-29964-1-git-send-email-jjhiblot@ti.com> References: <1499790014-29964-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 4/5] mmc: omap_hsmmc: Enable Auto command (CMD12) enable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Kishon Vijay Abraham I Instead of sending STOP TRANSMISSION command from MMC core, enable the auto command feature so that the Host Controller issues CMD12 automatically when last block transfer is completed. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Jean-Jacques Hiblot --- drivers/mmc/omap_hsmmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 3419dc5..3ee81bb 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -490,6 +490,10 @@ static int omap_hsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, ulong start; mmc_base = priv->base_addr; + + if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION) + return 0; + start = get_timer(0); while ((readl(&mmc_base->pstate) & (DATI_MASK | CMDI_MASK)) != 0) { if (get_timer(0) - start > MAX_RETRY_MS) { @@ -546,7 +550,7 @@ static int omap_hsmmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, if (data) { if ((cmd->cmdidx == MMC_CMD_READ_MULTIPLE_BLOCK) || (cmd->cmdidx == MMC_CMD_WRITE_MULTIPLE_BLOCK)) { - flags |= (MSBS_MULTIBLK | BCE_ENABLE); + flags |= (MSBS_MULTIBLK | BCE_ENABLE | ACEN_ENABLE); data->blocksize = 512; writel(data->blocksize | (data->blocks << 16), &mmc_base->blk);