From patchwork Thu Aug 25 07:07:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 74660 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp691898qga; Thu, 25 Aug 2016 00:07:01 -0700 (PDT) X-Received: by 10.28.22.6 with SMTP id 6mr6569982wmw.55.1472108821187; Thu, 25 Aug 2016 00:07:01 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id vj7si12441407wjb.30.2016.08.25.00.07.00; Thu, 25 Aug 2016 00:07:01 -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 4CF6EA75CC; Thu, 25 Aug 2016 09:06:39 +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 uMzCKf256rfT; Thu, 25 Aug 2016 09:06:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F9E1A7534; Thu, 25 Aug 2016 09:06:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D65D04BA81 for ; Thu, 25 Aug 2016 09:06:05 +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 7RfEb9wKznNr for ; Thu, 25 Aug 2016 09:06:05 +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-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by theia.denx.de (Postfix) with ESMTPS id 282AFA7528 for ; Thu, 25 Aug 2016 09:06:00 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u7P75YOv012634; Thu, 25 Aug 2016 16:05:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u7P75YOv012634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1472108735; bh=P5SVcRSb2ugQMOoLTLcPs7iR1k8x6QRv7b62Q87xqrQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fkriFQ+ILF/VDyzrrl4JH9Yieot6mDsAY+VVFqB0Oi3Iq7TpgVzGlVSr5TDCBYHiF lR/lQxkV/LWyGC+Fyt2r2rQAP9ZYQcUbY2cCc4YYJJIoc12yh/tP4SrNalaDSk1Q/E +qmsvgolRTBmXKpTkC+Zk2hpkLriWMcjaHml21ZdzW8L0lgrXtUZZCdMxzpJhUKj2D 9LjF1z1CuaefXC93Qkyp6hWCWOuZ+LFNKdDaTDWSns7w3e3zfMcycxWSsYsUo+aACe KK29oBW2zWKP+wbCebTOx+9JVdk6+YWJlx9xl70O53UG5WmV36BRsN/CgSnfEgjYhC N+zWVLCWdYY7A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 25 Aug 2016 16:07:34 +0900 Message-Id: <1472108859-19262-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472108859-19262-1-git-send-email-yamada.masahiro@socionext.com> References: <1472108859-19262-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH v2 1/6] mmc: sdhci: move sdhci_reset() call to sdhci_init() 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" If CONFIG_BLK is enabled, add_sdhci() is never called. So, sdhci_reset() is not called, either. This is a problem for my board as it needs the reset to start from a sane state. Move the add_sdhci() call to sdhci_init(), which is visited by both of the with/without CONFIG_BLK cases. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 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 7ddb549..91cc8b2 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -451,6 +451,8 @@ static int sdhci_init(struct mmc *mmc) { struct sdhci_host *host = mmc->priv; + sdhci_reset(host, SDHCI_RESET_ALL); + if ((host->quirks & SDHCI_QUIRK_32BIT_DMA_ADDR) && !aligned_buffer) { aligned_buffer = memalign(8, 512*1024); if (!aligned_buffer) { @@ -595,8 +597,6 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE) host->cfg.voltages |= host->voltages; - sdhci_reset(host, SDHCI_RESET_ALL); - host->mmc = mmc_create(&host->cfg, host); if (host->mmc == NULL) { printf("%s: mmc create fail!\n", __func__);