From patchwork Thu Aug 25 07:07:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 74657 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp691640qga; Thu, 25 Aug 2016 00:06:19 -0700 (PDT) X-Received: by 10.194.105.40 with SMTP id gj8mr6690138wjb.71.1472108779296; Thu, 25 Aug 2016 00:06:19 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id p71si12922336wmf.51.2016.08.25.00.06.19; Thu, 25 Aug 2016 00:06:19 -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 3D7AAA7576; Thu, 25 Aug 2016 09:06:16 +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 8d4YTf5xtJti; Thu, 25 Aug 2016 09:06:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B54E74B9F9; Thu, 25 Aug 2016 09:06:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 485DAA7534 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 AysAQ9C2QRk5 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 80C2B4B9F9 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 u7P75YOx012634; Thu, 25 Aug 2016 16:05:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u7P75YOx012634 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1472108736; bh=XfeYYM7Xd4r8mbOS+PBlOa0XpCKbmoxpcb8JyhIEV08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y+xXYf8qg8htQO00M5ZXuC6lOdBJXLjhx2O3d/SQzWmIGLLvMr+19gMdwAI3De7Xc icriYP9lEETQzjXyiYPVexciL20hGHhZrbUBhtnnyemrQyhJtZb/4mbYZexMzyjILR q4gS4ierm38/yicA5x6rM+m7gelf9dI6ay0FnPDsy2Wvw9rsKWNiP0vaJeUJuIQzfS DGqYWHdhjdpXIRFYFgIzaOlAY4WpdKJ93S4eYIG6J9/F+3rMq7usneurdGcxxegVZk bfAIoixQhIlT8PBAIOXnlbq5d0ziXPt6M+qyG7eulLk5mPVV+ewL1+pQbhK1wazI+y Zr6bWq/QpfTtQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 25 Aug 2016 16:07:36 +0900 Message-Id: <1472108859-19262-4-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 3/6] mmc: sdhci: move broken voltage quirk handling to sdhci_setup_cfg() 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. Move this quirk handling to sdhci_setup_cfg(), which is now the central place for hardware capability checks. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mmc/sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 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 d886777..c66151c 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -557,6 +557,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, if (caps & SDHCI_CAN_VDD_180) cfg->voltages |= MMC_VDD_165_195; + if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE) + cfg->voltages |= host->voltages; + cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT; if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { if (caps & SDHCI_CAN_DO_8BIT) @@ -597,9 +600,6 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) if (ret) return ret; - if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE) - host->cfg.voltages |= host->voltages; - host->mmc = mmc_create(&host->cfg, host); if (host->mmc == NULL) { printf("%s: mmc create fail!\n", __func__);