From patchwork Thu Apr 28 06:09:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66848 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp31474qge; Wed, 27 Apr 2016 23:09:56 -0700 (PDT) X-Received: by 10.194.3.20 with SMTP id 20mr15143665wjy.59.1461823796642; Wed, 27 Apr 2016 23:09:56 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id t130si13485632wme.63.2016.04.27.23.09.56; Wed, 27 Apr 2016 23:09:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1CE37A7854; Thu, 28 Apr 2016 08:09:55 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KPMsZDGJJ5lg; Thu, 28 Apr 2016 08:09:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C918A76FC; Thu, 28 Apr 2016 08:09:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D5097A76FC for ; Thu, 28 Apr 2016 08:09:51 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CUI90yVa4brm for ; Thu, 28 Apr 2016 08:09:51 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by theia.denx.de (Postfix) with ESMTPS id 30132A76D8 for ; Thu, 28 Apr 2016 08:09:47 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-10.nifty.com with ESMTP id u3S69DAU022034; Thu, 28 Apr 2016 15:09:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com u3S69DAU022034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461823758; bh=M+L50FJu0D2bZHIKjYyLms8EVET6leJ5hWt/roWj7As=; h=From:To:Cc:Subject:Date:From; b=mD4sjzmR9fb0yejlBDrqx6/k3CXLebpOLtfdUub8les9CFFjtdulcTQtGduc2Gx+y UQoq1cO6J0mwTkCPdKS6eBdTW5wbtkZth1sUehpWqlr9103m4lqGgggjlS89OExf6L gqIaz/i0x1DNnYWK850Kf4xAl8vp2odEeREcD84G5Fv5Odl4oSHcn1nF1FM41LNBN2 92NUv5tMJ3+Jw0KeatYBbVP+XPat5VKRouHagmf/Mbdq5aE00+SFe6ENK5rJIp4tbd 1ueV7um+hENGtAGiLVYID9r3P1faIM/GkO5jwLGt6k9/UzxIRmBWUTOFMpxPx2vboK SR5tpeYauEILQ== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 28 Apr 2016 15:09:10 +0900 Message-Id: <1461823750-29427-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Cc: Pantelis Antoniou Subject: [U-Boot] [PATCH] mmc: sdhci: increase default timeout and make it configurable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" I found the current timeout is too short for some devices to execute erase command. Nor can we override CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT from a board config. Increase the default timeout and surround the define with "ifndef" to allow to override it in case the default value is not a good fit. Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index ef7e615..7670d73 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -126,7 +126,9 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data, #ifndef CONFIG_SDHCI_CMD_MAX_TIMEOUT #define CONFIG_SDHCI_CMD_MAX_TIMEOUT 3200 #endif -#define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT 100 +#ifndef CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT +#define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT 1000 +#endif static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)