From patchwork Thu Sep 21 14:51:35 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: 113271 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp1976816edb; Thu, 21 Sep 2017 07:54:07 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCRqQMLHDArf45FbVZjbma5QUyAz8N5GUh4rv8oh45eLp7xR3iUmYloOGzWz31NIRbbPbzD X-Received: by 10.80.177.29 with SMTP id k29mr1446987edd.159.1506005647856; Thu, 21 Sep 2017 07:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506005647; cv=none; d=google.com; s=arc-20160816; b=IkfPsYue7tF1xFkfFevhZf66PKKecK6tbZFbucz/LT0lU4H6UUkph+MCe2vHOxhaBv M/3pCBMvo2kgnxR/Q/07pNWcwyZMtGWPkHZxCzXboUsojaFwDGtmYrPI69ahvCyXYz4j LWVySQm8RBOcXErJWPqgZ+ETg7ZtLqotBitfYZxfkKJYC4WNhglzs6tttTo1PUPfJdZe jixjm4saoq3Nf0tIo/eNlOFnxBcnCfa1Ig0mMq3KkpcxGKECV+I4Al8LVCdGvq4njQRD G4iuCHOrzOJKwmehymwnZDW/NewdO7nOErY7N9GrqBp/sw6OqBTbaLGFR/Jb0DbkYfV6 36Yw== 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 :cc:mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=uZENrx/5b6ebxh1HvXrXwHPLFRjHSML3luJBXmlSyJc=; b=AmIc22DfMvqq8gnmBNFfrP6pN+9IWwXOa3ot2btTqAgocjY+xigDt+Bi5AmcdwM0Bg 1dHevwQorM9uzAwRvHTnCpQbn6/R2GaChboplKMIEYWuKAwjPFBEpqkqcXqF0CARm7q7 pvNMjlf5g1/5iEAH/XkGtBVFTnl7RvrdVtUBa8Qq02P3n3OXsrXIYpuI29noIBTFD+KL X0d6xk7zIDVYybU6cnNKPH/nxXJ8FC2V0UE3tvjrxiOFrY0r0UyMH1ZrVboD35/hKk8Y IB1o1dT7VZUzDN0u+kqBMC83Gw78ADXssBj+TDwdI3ZZZxcrms30e5yBL3y+i6Ob9hB2 qTXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=wQVAtFtx; 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 z11si1089785edh.217.2017.09.21.07.54.07; Thu, 21 Sep 2017 07:54:07 -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.s=ti-com-17Q1 header.b=wQVAtFtx; 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 7312EC2208A; Thu, 21 Sep 2017 14:53:18 +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 48B8BC22046; Thu, 21 Sep 2017 14:52:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C1CCFC22046; Thu, 21 Sep 2017 14:52:01 +0000 (UTC) Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by lists.denx.de (Postfix) with ESMTPS id 3C693C2200A for ; Thu, 21 Sep 2017 14:51:58 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8LEpt9B005525; Thu, 21 Sep 2017 09:51:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1506005515; bh=UvYeT3jm6DXxVhoq3tfLffoypOogDrMkGjFxori84dI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wQVAtFtxKl1C/q8QMY/UnyWS7Xhy8fnxwLn5zxtI5rhBl++adBV2EMrwSj5YGcIlL GHHsinnUW5F62iHjyfvANTVdUCvgqkCnUIR7iBsujGSrqGU5VJ5De47SckZQs+aybf j3gWkyQcH9/rp7g9xc0KhZi94tQ32fmqgmVQPRMM= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LEptWL028024; Thu, 21 Sep 2017 09:51:55 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 21 Sep 2017 09:51:55 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 21 Sep 2017 09:51:55 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LEprb7009818; Thu, 21 Sep 2017 09:51:54 -0500 From: Jean-Jacques Hiblot To: , , , Date: Thu, 21 Sep 2017 16:51:35 +0200 Message-ID: <1506005496-8635-5-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506005496-8635-1-git-send-email-jjhiblot@ti.com> References: <1506005496-8635-1-git-send-email-jjhiblot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 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 Reviewed-by: Tom Rini --- 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 3cac6ea..fcda0e2 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -492,6 +492,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) { @@ -548,7 +552,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);