Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4767827ybv; Mon, 17 Feb 2020 05:37:05 -0800 (PST) X-Google-Smtp-Source: APXvYqzzxaIKNAUDFZbRcNHSdKpQLBsPnDx3/GF49AcdxYMV0Nam/+yRU/4JiIuMNloSrwil/xC7 X-Received: by 2002:a05:6830:154a:: with SMTP id l10mr12322538otp.44.1581946624879; Mon, 17 Feb 2020 05:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581946624; cv=none; d=google.com; s=arc-20160816; b=uqX4RDwHTMGVtE9T/YILuFF+qcjzJRvbHk8EUjFzmNAGYnXSwh31F88OAqVO/X4kQ+ zPQ1H9SaNQyrviaQooJLbuiMwNkaXWi4IE4FRDR3qguUiDKd8LivLlbJSVwwbFPz5uJk W84uS1dpqmlgjqSLUDLauP7eOCj99Dai/YaxJnArV0xaZke8uonYtMEh+gWmGiNeeSxI 2Ec6WHk5KWl00oVSoE4gwcNERPFimOl1gCpGuV9Ox5wzuvMJQcNjeZzlbmoEs7XtKaMB pmIjLQbdAYhvnbMUqOASSAUx7O5uh0gk4fjhAEBzXFmBg+tf7jcHBzyPh1CdypJiaMLH eqfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oKZige4m/AoNTTthLZdSUaeHyHzQ4UT6ng0N8s0kzVk=; b=1GvEE+UWdknYCeuahaSAffuiIIiEuKOj7wqUi/mgDBolLOQ0f4TWDj1JXqtH70NP5E NEadKUB5CPaEkd0qOH15OIKCIQDNnaCYWxsugJUbrvsI6wDXwiwkm7sEppkXGYMZtyaN jF46/HYxk7gw2mfbQNSg+J4qtt6R7dEms99j9IdKlxaESMOE71mhpJu+2xayghxemTM8 t7eG+k3KpZlA6HLIG+SnaCM8VOy/jsAmWy4bHd4EiItBLpys34YXpv0aebTJsK4R0alX jBg65AdUMogDnz8QAEUtYqq4Y3R1dFdK0PwwSRuGr25C7Hlay6TLojtu+uTtqr1Ss3Bb ozIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=McIHR4Hq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si6825158oic.183.2020.02.17.05.36.53; Mon, 17 Feb 2020 05:37:04 -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=pass header.i=@gmail.com header.s=20161025 header.b=McIHR4Hq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728658AbgBQNaQ (ORCPT + 99 others); Mon, 17 Feb 2020 08:30:16 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:41720 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727089AbgBQNaQ (ORCPT ); Mon, 17 Feb 2020 08:30:16 -0500 Received: by mail-il1-f193.google.com with SMTP id f10so14217437ils.8; Mon, 17 Feb 2020 05:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oKZige4m/AoNTTthLZdSUaeHyHzQ4UT6ng0N8s0kzVk=; b=McIHR4HqYVgFbC6brytrdSkaOQ3tJKrEhWb45DEuUAYXqoA+IO8qwVbx2KpqFr9DUb o6njCVJFfIXDCRBfv711DuWgjJphYFThWmvOv9evpZ3TsdOV/Rk1ZPIqXxZLs6Sainmc S1zxOVLhQRiOwSH1GMfEcsuD2KtXgUMJrRMViVoq/UZL0HZt6ERELVgYoFml+6uggMFX cGLzk6Weomiv0gAG8h5grNeHOOHNF15TVuokP0GoIDIxVc+bnGX1DzNdMRar+5yqfEM3 hAyOKF3b1iCXri88ClHayFeOvwp5Xp3aYia+cJ90T4xMdC1SDfrtBTehcKf/VtSEzeK+ LQjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oKZige4m/AoNTTthLZdSUaeHyHzQ4UT6ng0N8s0kzVk=; b=oIZqnHx1fIU+6fY18zzifRFeJ/BZ68kZCa7SuKd3aZBWxmd4psvlmt72o+4cP3GmCT FWCNkAEPVpnDh/3ghoAfPceiBCay3iq6IaIMySMcJztQdNiaFWK+sB8l5bdpqwLsQ9+r A36EsXlEE8DU3w+x9yZE2tUkb3Q2eJ5KOk5vV/VBKMCjss60fciMzBx5pk/atwlBoVnz i1aXx6Q6QM3wZup0GnpSTM85mFytq6MgQTBlBK36Z69M67O4M3yXTgNyRo8bI6wyMFRm xeVVQ2+2dPmDZYyBq1dNR3rF+Jl11sqIG3aIbVYCYokR9LQUfjUZNdfZZeiw8ziV0brE d7Ww== X-Gm-Message-State: APjAAAUifIlLy4phR3wlBwdvFy54gijNJXuX7y3COCU3sToiu8obnPPc UXhWxw4qJqRjlwDaKwYLaKb7rEl6F5OJ8t9ZFiI= X-Received: by 2002:a92:85c1:: with SMTP id f184mr14075867ilh.221.1581946214224; Mon, 17 Feb 2020 05:30:14 -0800 (PST) MIME-Version: 1.0 References: <20200216173446.1823-1-linux.amoon@gmail.com> <20200216173446.1823-4-linux.amoon@gmail.com> <1jmu9hzlo2.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jmu9hzlo2.fsf@starbuckisacylon.baylibre.com> From: Anand Moon Date: Mon, 17 Feb 2020 19:00:04 +0530 Message-ID: Subject: Re: [PATCHv1 3/3] clk: meson: g12a: set cpu clock divider flags too CLK_IS_CRITICAL To: Jerome Brunet Cc: Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Michael Turquette , Stephen Boyd , Kevin Hilman , devicetree , linux-arm-kernel , linux-amlogic@lists.infradead.org, Linux Kernel , "open list:COMMON CLK FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jeronme, Thanks for your review comments. On Mon, 17 Feb 2020 at 13:32, Jerome Brunet wrote: > > > On Sun 16 Feb 2020 at 18:34, Anand Moon wrote: > > > Odroid N2 would fail to boot using microSD unless we set > > cpu freq clk divider flags to CLK_IS_CRITICAL to avoid stalling of > > cpu when booting, most likely because of PWM module linked to > > Where did you see a PWM ? > > > the CPU for DVFS is getting disabled in between the late_init call, > > between the late_init call and what ? > > > so gaiting the clock source shuts down the power to the codes. > > what code ? > Sorry, I was really upset about my self. I tried to improvise this commit message based on previous mails. sorry about that. > > Setting clk divider flags to CLK_IS_CRITICAL help resolve the issue. > > > > Cc: Martin Blumenstingl > > Cc: Jerome Brunet > > Cc: Neil Armstrong > > Suggested-by: Neil Armstrong > > Signed-off-by: Anand Moon > > --- > > > > Following Neil's suggestion, I have prepared this patch. > > https://patchwork.kernel.org/patch/11177441/#22964889 > > --- > > drivers/clk/meson/g12a.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c > > index d2760a021301..accae3695fe5 100644 > > --- a/drivers/clk/meson/g12a.c > > +++ b/drivers/clk/meson/g12a.c > > @@ -283,6 +283,7 @@ static struct clk_fixed_factor g12a_fclk_div2_div = { > > .ops = &clk_fixed_factor_ops, > > .parent_hws = (const struct clk_hw *[]) { &g12a_fixed_pll.hw }, > > .num_parents = 1, > > + .flags = CLK_IS_CRITICAL, > > This makes no sense for because: > * This clock cannot gate and none of its parents can either. IOW, the > output of this clock is never disabled. > * I cannot guess the relation between fdiv2 and the commit description > Ok I check this code changes is not needed for this fix. > > }, > > }; > > > > @@ -681,7 +682,7 @@ static struct clk_regmap g12b_cpub_clk = { > > &g12a_sys_pll.hw > > }, > > .num_parents = 2, > > - .flags = CLK_SET_RATE_PARENT, > > + .flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, > > Why not. Neil what do you think of this ? > If nothing is claiming this clock and enabling it then I suppose it > could make sense. > I would like core developers to handle this. Sorry for the noise. -Anand > > > }, > > }; >