Message ID | 20171002122743.32334-2-jbrunet@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D005C60365 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:28:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2AA528782 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:28:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B78A828892; Mon, 2 Oct 2017 12:28:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6C29228782 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 2 Oct 2017 12:28:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=LTSJl/P8OvvM8TFNsFduKogfzbGDBv039sZO8iy2Zas=; b=sMUaQYzJwj5mJ3NUoHZIyoKvhm RQKVjUYGJ4WvVgervNwCkrntHI3EsiwBOk4XzTJmcqJnSzSoILhDHsLrcg04icM8fyErCAGYScOLQ 4Ixms3y3ZwBpf+WQZLaaUlVhNxYllWcad7+/K6Rbg4ZPStRVZh/l/dpPrPFrzI5b1OUMxh39Wh4Ur fM3hjv5/yP/FoYftnwFRfONt23Uy2LXFZgIC6ffQe6mM9mep+re0BTZR3b8IhOQ/0HcEK6Nv86cBi 997+99Ub/AjQ/BzHlCOAYeIxA2cxUY5eXeugw4eDVVT6HsaTpUhfGddT3lG6W/ns1Ui0XKl7eu6fe +bu2BZVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dyzps-0000mg-4N; Mon, 02 Oct 2017 12:28:36 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyzpU-0000P9-SL for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 12:28:17 +0000 Received: by mail-wm0-x230.google.com with SMTP id t69so10238514wmt.2 for <linux-arm-kernel@lists.infradead.org>; Mon, 02 Oct 2017 05:27:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EbXsKbLEj+gX7fv0Fug+KXdSgEQtEkMRgq9xyeaDprM=; b=c5dW8o8tw/c+b+AADPAnVCaNObYtLj8rW0FEy4uf7OP3KT2E2YlZuhBGWCJ08MX2Tn JI0J9fSM6Xj7ElWwYq64OAph/QHeg/qYYHVrGGL7rCF08yzew0lVWJP277WpV5WA9GHG dxqoFDkl76LLsL0B6VGbZg/KSJc2F0RM/6FeJFHFJQdJ42EEyf/RfYT5RBjDiHX8mFyB QH/6E2ZbJ5oC4tncmiy5j7EA2e+qp3LilpjX+rUmjbZWN32/0TRdevvChHclyItW5CmX 480nT2ApF0rolh2joC7rNNeutPrsvvWU2g2K66KJSlfg2ARcP8GJmDWMgcFms3uB1LKC k5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EbXsKbLEj+gX7fv0Fug+KXdSgEQtEkMRgq9xyeaDprM=; b=P0XpG4aOGkCznV0K3kgoOeL7j3UKyJVhE8geCup9woZYPp7FJVtcIBISsec4jkUj6e 1Qkgq49suWjCiHgMmBg6t+WoM+HNEo1pHV9NdLP1W+vPhhSCqGTqLyaN/ByTjAyOq/Wr 0rCPFQVZpJjDkmGn/M0xUk7enwX81bCCOnewlfssBlESV6NWouhaR/7MH4lzxwmcV5+v GOLuBy4OHJuJRzH8kNe6BWMXOcdO2slqyl0Yoi+JsDwLeKDXFlf9ezy0HYF7Wj05ItDR wlBTh5ZMI4FfeQDNGRz/WLMl0aFmgHerTRDcQvuStU4U0jdNpIdGFZyE9GrLuDhLXuv/ dkuA== X-Gm-Message-State: AHPjjUhVYhNvfGPOzBF24jIaVpAAC8nx5WYx66i8CPfJU0aWNmyGvQql 2XJBzr4lPmC4PIbGCv4L2vkZtQ== X-Google-Smtp-Source: AOwi7QAg71ZC3QpQFjuNOewv9Iw2wZxkxE1YzJksR8x/DQpgjwStRYOO9ymJGPT2XofxtNSniM7frA== X-Received: by 10.28.109.77 with SMTP id i74mr11344297wmc.67.1506947271073; Mon, 02 Oct 2017 05:27:51 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id u96sm14354287wrc.68.2017.10.02.05.27.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Oct 2017 05:27:50 -0700 (PDT) From: Jerome Brunet <jbrunet@baylibre.com> To: Ulf Hansson <ulf.hansson@linaro.org>, Carlo Caione <carlo@caione.org>, Kevin Hilman <khilman@baylibre.com> Subject: [PATCH 1/3] mmc: meson-gx: make sure the clock is rounded down Date: Mon, 2 Oct 2017 14:27:41 +0200 Message-Id: <20171002122743.32334-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20171002122743.32334-1-jbrunet@baylibre.com> References: <20171002122743.32334-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171002_052813_083135_B6EB54CC X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Jerome Brunet <jbrunet@baylibre.com>, linux-arm-kernel@lists.infradead.org, Heiner Kallweit <hkallweit1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index c885c2d4b904..421c8719c202 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -531,8 +531,7 @@ static int meson_mmc_clk_init(struct meson_host *host) div->shift = __ffs(CLK_DIV_MASK); div->width = __builtin_popcountl(CLK_DIV_MASK); div->hw.init = &init; - div->flags = (CLK_DIVIDER_ONE_BASED | - CLK_DIVIDER_ROUND_CLOSEST); + div->flags = CLK_DIVIDER_ONE_BASED; clk = devm_clk_register(host->dev, &div->hw); if (WARN_ON(IS_ERR(clk)))
Using CLK_DIVIDER_ROUND_CLOSEST is unsafe as the mmc clock could be rounded to a rate higher the specified rate. Removing this flag ensure that, if the rate needs to be rounded, it will be rounded down. Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/mmc/host/meson-gx-mmc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)