Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4857953ima; Tue, 5 Feb 2019 02:27:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IaSQK62WxogNhmantAGqpbynmtqZANskDtpa1Iis+Tujh47kzCqiKEnTP9slHXrug1S0Hkk X-Received: by 2002:a62:425b:: with SMTP id p88mr4246905pfa.137.1549362439332; Tue, 05 Feb 2019 02:27:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549362439; cv=none; d=google.com; s=arc-20160816; b=D4K4pn0fcXqLwO9v2ajm7XuRAnAF3gsFy6HsRUVO/jxxYy5FJvd0ajVzyanJDQvTJA N4R3yFWU9lclJtvveyvbtmoR3AB2zWpcff8O2jFQUgIesEQTa9wQz6MmJz7u9tvZmHiT LWVqeOX6zT4z59hZFXmSsbgvUIBDgzFkn01J1JsRhLriew9E3fWqX37+5wRM3MNaDTPo /L3l+Ns2XZV6pmmi+b+pQabQ1+0c/Q36GMYVibE54kL3Re+Zo2yuyWjc+BpHZroWO2Cj VUUuQ137Wtz6NzFII7gyCqrLKtPSZuFDK8yY1mFfS7zyLugPktKmesnYyJU+cctsCwX/ qREg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EatDEOnfF7n7gAy773SfEvXF/5Suy3zV5xEWSI7/XCU=; b=in0m61YqsTbJl/OHwB9RVrQcGyYuyT6y6+nTFRebkUh1AUaiOTFSrE5YftW+xJAUHH xmPytDjSmUO7zlwBQBppWNXZBfR9mT/BQk9MRsidC+d5gGNfA7cBi709AJN2H8IrMOC4 YgZ4BFaqjPdT5CZUpScP79J12nmylaiUQPEWZ5WGLoAbwm1z9Czguh8sTeJ/qXLwuxWQ I9uoDZJXYSlVeCiJl9DzflzwuR0ubSAH7vudHEK7MmSmgUybI6OXvqGBy2rfyEDT9E9K xVIng8IneW6AUxyVGYZtn2IpvUbfJ8SrST4a4zCtWU2/rFM1c7dTZDLRXezy3JnZ84YN gyLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si2897554pfq.56.2019.02.05.02.27.02; Tue, 05 Feb 2019 02:27:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728720AbfBEJ6U (ORCPT + 99 others); Tue, 5 Feb 2019 04:58:20 -0500 Received: from mslow2.mail.gandi.net ([217.70.178.242]:53202 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727127AbfBEJ6U (ORCPT ); Tue, 5 Feb 2019 04:58:20 -0500 Received: from relay9-d.mail.gandi.net (unknown [217.70.183.199]) by mslow2.mail.gandi.net (Postfix) with ESMTP id C84523A1E96; Tue, 5 Feb 2019 10:45:32 +0100 (CET) X-Originating-IP: 90.88.147.226 Received: from localhost (aaubervilliers-681-1-27-226.w90-88.abo.wanadoo.fr [90.88.147.226]) (Authenticated sender: maxime.ripard@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id DFCF0FF80B; Tue, 5 Feb 2019 09:45:29 +0000 (UTC) Date: Tue, 5 Feb 2019 10:45:29 +0100 From: Maxime Ripard To: Priit Laes Cc: Chen-Yu Tsai , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: Re: [RFC PATCH] clk: sunxi-ng: sun4i: Use CLK_SET_RATE_PARENT for mmc2 clock Message-ID: <20190205094529.t7je4ozzu2b4ornc@flea> References: <20190202155209.31617-1-plaes@plaes.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eqrr4j6aqz3xqscg" Content-Disposition: inline In-Reply-To: <20190202155209.31617-1-plaes@plaes.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --eqrr4j6aqz3xqscg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 02, 2019 at 05:52:09PM +0200, Priit Laes wrote: > Recent patch of improving MP clock rate calculations by taking > into account whether adjusting parent rate is allowed, have > unfortunately broken eMMC support on A20 Olinuxino-Lime2-eMMC > boards which fail with following error: >=20 > [snip] > EXT4-fs (mmcblk1p4): INFO: recovery required on readonly filesystem > EXT4-fs (mmcblk1p4): write access will be enabled during recovery > sunxi-mmc 1c11000.mmc: data error, sending stop command > sunxi-mmc 1c11000.mmc: send stop command failed > [/snip] >=20 > Previously, mmc2 clock was requesting 520MHz and settling at 512MHz > clock rate with following parents: > [snip] > pll-ddr-base 2 2 0 768000000 0 0 50000 > pll-ddr-other 1 1 0 768000000 0 0 50000 > mmc2 0 0 0 51200000 0 0 50000 > [/snip] >=20 > Now, after the improvements, requested and settled rate are both > 520MHz, but as mmc2 clock cannot adjust parent rate, the situation > ends up like this: > [snip] > pll-periph-base 3 3 0 1200000000 0 0 50000 > pll-periph 6 6 0 600000000 0 0 50000 > mmc2 3 3 0 50000000 0 0 50000 > [/snip] >=20 > With this patch (allowing mmc2 to set parent rate), we end up with > working tree with both mmc0 (sd-card) and mmc2 (eMMC) working: > [snip] > pll-periph-base 3 3 0 312000000 0 0 50000 > mbus 1 1 0 78000000 0 0 50000 > pll-periph-sata 1 1 0 26000000 0 0 50000 > sata 1 1 0 26000000 0 0 50000 > pll-periph 5 5 0 156000000 0 0 50000 > mmc2 0 0 0 52000000 0 0 50000 > mmc0 0 0 0 39000000 0 0 50000 > [/snip] >=20 > Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when all= owed") > Signed-off-by: Priit Laes Applied, thanks! Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --eqrr4j6aqz3xqscg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXFlbOQAKCRDj7w1vZxhR xaRYAQC0WLNx/9ga8vQdJsVGLopmekwrngsA7dsqJWdwuT6Y2QEA1g9aSZKzSpQL Gfc8ryx3K2r9net+Ehu/S9GU8vpXfQ8= =1aqM -----END PGP SIGNATURE----- --eqrr4j6aqz3xqscg--