From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [PATCH v6 09/14] memory: tegra: Add EMC scaling support code for Tegra210 Date: Tue, 14 Apr 2020 23:39:42 +0300 Message-ID: <385ad42b-ebed-1783-0dd2-dc3693aeaf6b@gmail.com> References: <20200409175238.3586487-1-thierry.reding@gmail.com> <20200409175238.3586487-10-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20200409175238.3586487-10-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding Cc: Rob Herring , Jon Hunter , Michael Turquette , Stephen Boyd , Joseph Lo , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-tegra@vger.kernel.org 09.04.2020 20:52, Thierry Reding пишет: ... > +static int tegra210_emc_set_rate(struct device *dev, > + const struct tegra210_clk_emc_config *config) > +{ > + struct tegra210_emc *emc = dev_get_drvdata(dev); > + struct tegra210_emc_timing *timing = NULL; > + unsigned long rate = config->rate; > + s64 last_change_delay; > + unsigned long flags; > + unsigned int i; > + > + if (rate == emc->last->rate * 1000UL) > + return 0; Isn't it possible that parent is changed, while the rate is not? I think the clock change should proceed in this case.