Message ID | 1514566812-16781-3-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | c42ee367fdab51eb9add12e73e8a25306030bd44 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4911309qgn; Fri, 29 Dec 2017 09:00:47 -0800 (PST) X-Google-Smtp-Source: ACJfBouBndxtOSbjOUaZCsI88zGuCJJ0I6tSpQQkqG8gDeIFYp5GJ8cBgRljKk/dC3QmnEQ5SFv7 X-Received: by 10.80.135.182 with SMTP id a51mr44405749eda.98.1514566847155; Fri, 29 Dec 2017 09:00:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514566847; cv=none; d=google.com; s=arc-20160816; b=b7nl1Yj2g44zKovdapmu+fG5U449zlhaPIEo3e3h2s6tq95gFXCSbaVQV8LBweXaNY WZTFoNLcxO391G7oUzb3bJpBHQbUL5JSf3v3qPA4J5YN/fMF4L8XbbYrASBkWqoHBXPQ SqoX+zpzzxTVCNsXddY1pqy8RDehiMsJKEtd6nFEHcTBwcIynTQ/SaKTa7m0CKqk1gn8 553Erlpm2mqO5NHciFtW4Bt5CkY4xfzTShU+FsfFgUfQ5AI7LrfI6oyAHWtWkoH97VN+ t+Nmf8ClbhPlheHP2HWOgv2GKNNkBnrYj+rf6MqwyqpGd7+W0e4UWq0PkFNSwYhve3It VldQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=wI68akq3V+4dyLGJ4QkzpvGHa7/E3ul9BC1Bde/a/Bk=; b=N2XSeW1GxmI13lnbjOni/2NH+DwITa7mExycdv9nM+cN6U2Ymx4fj4RRHQr5uY/1MJ D6EK3Aw6/carXhTMnSjUEGmVTIpB0qTz1qthKkpV4NyaSbpoM+4beV/j27kI9P9pblVL OfRBtCNBtBkBpjiTHW0oxX7v5xt3ul42n/Cu+SjLgDaYTAptSvQEzDDoxo1qRrzUbnZb 7eTUB+lREsSyVmXvJAhDjKCSKSZ1SKoipPGZ4Q49fva5eH7EFxw76pdqt5TheoVBxFRf Zx8FWhP1SzXvDtZz/CAZC0dUoB0ESddYjxN/r8KgdsMXSpnKyZGL4Ut8Dt00yUdYNZTc QfZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=17yYXSZQ; 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 Return-Path: <u-boot-bounces@lists.denx.de> Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r17si1534293edl.492.2017.12.29.09.00.46; Fri, 29 Dec 2017 09:00:47 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=17yYXSZQ; 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 Received: by lists.denx.de (Postfix, from userid 105) id 26D68C21DB2; Fri, 29 Dec 2017 17:00:43 +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_BLOCKED, 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 E8D1CC21C59; Fri, 29 Dec 2017 17:00:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 241E1C21DA3; Fri, 29 Dec 2017 17:00:39 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id 26671C21C59 for <u-boot@lists.denx.de>; Fri, 29 Dec 2017 17:00:37 +0000 (UTC) Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-08.nifty.com with ESMTP id vBTH0O9J000541; Sat, 30 Dec 2017 02:00:25 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com vBTH0O9J000541 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1514566826; bh=SZmK4XZtKFaqOTZhuf7rImc97Bw+LjX5UM8N3PuQUWE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=17yYXSZQDbGUPDl5aeUIxtqW/QV5+Fvf4pLaKdM7uk1N28cNQw3xSKRVnUr3LV83B a9sdKQ+tl6u10zJPColh+ncftD2miptCTg6hd2aIZe7xhgyPN2haBjdGh/7grOGFEB 7LSTn1fGQNKWbKLL3dgCSUTKRlWdtw0sqURmkoft0NiWab1DzvSNIHT8Lvl3Mmecd6 jhNdc1tDhgcZFn2ptUasckqhfkukMcKeD+e7d08ClM5zA0WCl5WBidlfnt0F/HxK7W yo2bHLEKJKFVyM9UzNDxaGlhy44Ja2FwgqG8ceIh4K3qGnzsnKDYP+LuISJd7j9DZY HmYRmjAgZqIZg== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada <yamada.masahiro@socionext.com> To: u-boot@lists.denx.de Date: Sat, 30 Dec 2017 02:00:06 +0900 Message-Id: <1514566812-16781-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514566812-16781-1-git-send-email-yamada.masahiro@socionext.com> References: <1514566812-16781-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 2/8] mmc: do not overwrite cfg->f_max if "max-frequency" if missing X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
mmc: some fixes for core and add HS200 support for sdhci-cadence
|
expand
|
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 793196b..37ce922 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -146,7 +146,8 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) break; } - cfg->f_max = dev_read_u32_default(dev, "max-frequency", 52000000); + /* f_max is obtained from the optional "max-frequency" property */ + dev_read_u32(dev, "max-frequency", &cfg->f_max); if (dev_read_bool(dev, "cap-sd-highspeed")) cfg->host_caps |= MMC_CAP(SD_HS);
mmc_of_parse() in U-Boot is a pussy helper; it sets cfg->f_max to 52MHz even if DT does not provide "max-frequency" at all. This can overwrite cfg->f_max that may have been set to a reasonable default. As the DT binding says, "max-frequency" is an optional property. Do nothing if DT does not specify it. This is the behavior of mmc_of_parse() in Linux. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mmc/mmc-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)