From patchwork Mon Oct 9 15:02:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice CHOTARD X-Patchwork-Id: 823287 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y9k4m6cjMz9rxm for ; Tue, 10 Oct 2017 02:02:48 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id BA077C21DC5; Mon, 9 Oct 2017 15:02:41 +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=none 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 3C46CC21C73; Mon, 9 Oct 2017 15:02:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2F17BC21C73; Mon, 9 Oct 2017 15:02:38 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id C40B1C21C40 for ; Mon, 9 Oct 2017 15:02:37 +0000 (UTC) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v99ExHCA012270; Mon, 9 Oct 2017 17:02:37 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2dem24ntgs-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 09 Oct 2017 17:02:37 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id EC3E73F; Mon, 9 Oct 2017 15:02:35 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node3.st.com [10.75.127.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D4CB92AC7; Mon, 9 Oct 2017 15:02:35 +0000 (GMT) Received: from localhost (10.75.127.49) by SFHDAG6NODE3.st.com (10.75.127.18) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Mon, 9 Oct 2017 17:02:35 +0200 From: To: , , Date: Mon, 9 Oct 2017 17:02:28 +0200 Message-ID: <1507561348-15602-1-git-send-email-patrice.chotard@st.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG4NODE1.st.com (10.75.127.10) To SFHDAG6NODE3.st.com (10.75.127.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-09_04:, , signatures=0 Subject: [U-Boot] [PATCH 1/1] mmc: stm32_sdmmc2: increase polling status register delay 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: Christophe Kerello MMC commands like MMC_CMD_ALL_SEND_CID or MMC_CMD_SEND_CSD can reach 500 us. This patch increases the polling status register delay to avoid a timeout on a command. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard --- drivers/mmc/stm32_sdmmc2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 0e1f40b..fd49d42 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -276,7 +276,7 @@ static int stm32_sdmmc2_end_cmd(struct stm32_sdmmc2_priv *priv, /* Polling status register */ ret = readl_poll_timeout(priv->base + SDMMC_STA, status, status & mask, - 300); + 10000); if (ret < 0) { debug("%s: timeout reading SDMMC_STA register\n", __func__);