Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2748272imj; Mon, 11 Feb 2019 07:55:14 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib0hkV75bt8effS+WGl64otavWamrL3Z6seKU8v7mtpDCgOusBI3p/mJZ6Glh6ygfsS2VQb X-Received: by 2002:a62:6702:: with SMTP id b2mr1965906pfc.244.1549900514171; Mon, 11 Feb 2019 07:55:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900514; cv=none; d=google.com; s=arc-20160816; b=JjFd9A+nWejDdvXnKTvhNvTPKpFjyM/BOn3xYlrdFnyUbyK6NCIzh6+U520mqUuvs/ 7seSS4zUFWc3Pz+kXYc//Evr7JhWlM4tEfQwzJ4tF4qnvkIA7BfUmSrsLHoHfygD8WOu bdQcwqrBC+NGxHItS2XhnnbbaUh/XLBcniX/vgdr6KcH1BrRZVBEZmbcDD0ra1bqylDT pGyvFc5jCL8yeimUu0uIq1xgJEhoE50Frq15f5cE5Nh+MGrLjnKoxYPgTMJaMHMmbszr QCQdXiTcpnhSEnU5MGVsCQxg/axxtUr8uvcvUFsa9unSK7Uwvzs0y/EJNnufQv8mMlih Swuw== 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:dkim-signature; bh=WYNsWO01qMBz5kTyvVO0+wVOBvVGpRRAPsu+ng6XwDo=; b=J5lLMoZIcw9EiXviFT3FfK9PdQ4Ji0G+aR0wbvFzoEm089axpXZU5yOojCKMmvKWQ+ O+vvQejjhbQcO3BapPQNRnQQoA/OFR2h0B9XrMxdnxJ+yWp+36GDFtHCIyUjXbxi71cu 0kh4fQPI1K0rO/R5ku9pvAdi//zMKC57oLQiNc0/KpbcD4hkw0KElBxJoDClFPOGclbD J0ktzqpUWv5FwPySrzigpMdiOdCPev6ihPG7Wyc0gcVyn/egdcLmLo8p1qsMoJ+8gANS jskXgcBsCxg0oV5qasahaodg+aJiiaKua3WpQ48hXwEWU6+SIxyytJY5FA/18BRP1GTg frfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@plaes.org header.s=mail header.b=UcWzavtC; 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 bd12si10109082plb.193.2019.02.11.07.54.57; Mon, 11 Feb 2019 07:55:14 -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; dkim=fail header.i=@plaes.org header.s=mail header.b=UcWzavtC; 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 S1731166AbfBKOgA (ORCPT + 99 others); Mon, 11 Feb 2019 09:36:00 -0500 Received: from plaes.org ([188.166.43.21]:45486 "EHLO plaes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731113AbfBKOf4 (ORCPT ); Mon, 11 Feb 2019 09:35:56 -0500 Received: from plaes.org (localhost [127.0.0.1]) by plaes.org (Postfix) with ESMTPSA id C02C9412CA; Mon, 11 Feb 2019 14:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=plaes.org; s=mail; t=1549895753; bh=8Gi4omit073u81WaoF9zvkqRCS3LXU7oUSEGO5wyFVg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UcWzavtCei5KDgJWdYUmJqg3iM+kJGgqI6RL1LfSuXi7HxH8x92/YtcE/TFpRV/vd OXTkEpfGw0zTjOOhXn26nTz88366xRfx/duaJqI5JvIA6oDOpPckgIU4P3dDRu3uN4 l9z2yNsJdbOCz1Hrle7EwdowWHV6rNEPpa+KU1XNhHWubpo5LKKYZhK7ZPpF4LFvEp dXlObLMkJjG1EudRgdcaFUugj+GukUBJQ8cYeGpYhXF5b8vf7dhXZtywiCn+KupPB5 ku36ilStHzdIwhC5RzuoXiDBk0fiXEaiuIYZA3G36e8i53XSBp8x9scneTReEAt+ta IP0ydVUHZEYrA== Date: Mon, 11 Feb 2019 14:35:52 +0000 From: Priit Laes To: Maxime Ripard Cc: Chen-Yu Tsai , Michael Turquette , Stephen Boyd , linux-arm-kernel , linux-clk , linux-kernel , Jernej Skrabec Subject: Re: [RFC PATCH] clk: sunxi-ng: sun4i: Use CLK_SET_RATE_PARENT for mmc2 clock Message-ID: <20190211143552.2uqx6yy53dyv5lbl@plaes.org> References: <20190202155209.31617-1-plaes@plaes.org> <20190205094529.t7je4ozzu2b4ornc@flea> <20190206092000.f46nsn4fw2n4crub@flea> <20190206100309.dhkm2l73qzkwgjzg@plaes.org> <20190206155227.wbkzvsdgykir4wn5@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190206155227.wbkzvsdgykir4wn5@flea> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 06, 2019 at 04:52:27PM +0100, Maxime Ripard wrote: > Hi, > > On Wed, Feb 06, 2019 at 10:03:09AM +0000, Priit Laes wrote: > > > > I'm concerned for other users of the PLL-PERIPH clock. AFAIK > > > > all of them, except the HRTIMER, expect the clock rate to stay > > > > the same and not change underneath them. And SATA expects it to > > > > be at 600 MHz, as the datasheet says. And while it may not directly > > > > apply to the LIME2, eMMC on newer SoCs / boards run at the slightly > > > > reduced rate of 50 MHz just fine. > > > > > > > > In the commit in question, clocks without CLK_SET_RATE_PARENT > > > > should be using the old code (now in the if conditional block), > > > > i.e. the behavior should not have changed. > > > > > > > > I don't think this actually "fixes" whatever bug was introduced, > > > > but only papers over the issue, and possible introduces further > > > > issues for other users. > > > > > > You're right, I've overlooked that it was pll-periph being > > > affected. I've dropped it for now. > > > > Any ideas what could be done. I currently have no time to debug it, > > but it affects existing systems. > > I can't find what would change with that commit either if the flag > isn't set, so looking at the register state before and after that > commit would help I guess? Register dump without the patch: $ busybox devmem 0x01c20090 0x0250030E pll-ddr-base 2 2 0 768000000 0 0 50000 pll-ddr-other 1 1 0 768000000 0 0 50000 mmc2 3 3 0 51200000 0 0 50000 Register dump with patch applied, booted from mmc0 and after mounting emmc: $ busybox devmem 0x01c20090 0x8140020B 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 > > Maxime > > -- > Maxime Ripard, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com