Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4500731ybv; Mon, 17 Feb 2020 00:02:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyma2HM9MO8quTNYy1w1R7fpwKbpOs0L5v2x8hgGTFPFZcac96D0SGcLpUONGTD7vb/A0VJ X-Received: by 2002:a05:6830:138b:: with SMTP id d11mr10642946otq.38.1581926570548; Mon, 17 Feb 2020 00:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581926570; cv=none; d=google.com; s=arc-20160816; b=Zh1JH0G+LSQoN4ijB7G6y1BIVfkEDoxTO/PAgixB3JASG3LmOdap4x6l8XepO6DyDQ F3t2jpMt4uwtTWExUw+LQcAZcYq4mNM6gbung5o3yBRPFqFpiWKj4hm5IDv7pnm4QAIv IE5IEfP6cy7qaAQxy4MBzewOReCS0W2zLEzFohy+YOiCtdPijnuIXw8AmdgiHJXLqKzN ruNwFEhxIdLaixiv37K5R4e5XMTHHoJF8aaasQGf+zj6jUfL2vfFO/c7fo4nY3yo/SSs 1vZp2YAuKLAEBHzBdqeDzeuzf2dvH39JcNp/ff0wYefSuCtIJRy1RSvEeSKsLBtSVC/X rk/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:dkim-signature; bh=l3DKox+qqztb4asvNOVtIBlg1suTqH8KA57WcRUyDeo=; b=KI8xOmf/lgzTJ00zuUEIh8cl1e5vEH44cfwG9YOSBSQHgTaO3ZywrwMke6k/C7rGp7 VnIF5ruTiZ7du5jWLE0qnGx43WXt2HfuwB1/AQMf/42/FMM+mmtFeVaC/+5pcI8Yvehm P3lWFikc+BvzFaawLmC548iQZN5+eIMb+/0PZo8pNtnrVy/4uGc2a4pp+2nY9xo0ekDS etLSY9fU80eE75GwRIH7XGadWuocyn/2sP4jFngO7ReL4zEvtlvbX1SikdrGBTAFSB1l dhq3DwMFLg1QsDXpxChI/2LlzvTq7eg0wXMooi9UPbOZcpO148+heCmrqVv3N9fKkiUk EEAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="Dqjt/y5q"; 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 o1si6354884otk.154.2020.02.17.00.02.37; Mon, 17 Feb 2020 00:02:50 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="Dqjt/y5q"; 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 S1727322AbgBQIC0 (ORCPT + 99 others); Mon, 17 Feb 2020 03:02:26 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:34872 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbgBQICZ (ORCPT ); Mon, 17 Feb 2020 03:02:25 -0500 Received: by mail-wm1-f68.google.com with SMTP id b17so17296735wmb.0 for ; Mon, 17 Feb 2020 00:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=l3DKox+qqztb4asvNOVtIBlg1suTqH8KA57WcRUyDeo=; b=Dqjt/y5qO0gWAFA+/BwiQiNhQnAs5jTW/fatxUCIn40u9KvZm+xZrPas0dS2viq7bb jgSlXwD9Suu+XUxmUNuKB+d41jrMD77xnjTrLbSIqa4rpt4hTuG1Vg6Z4PZf7vfR1y6M PZ7Bpfk3t0Ys/yTJcz2WswnxPbn+B1ZTgALvyA457dZ3sb0WFxc3i2SkN30NVfhEsrKn yjwGuobhZJuIsBjIXOX9C/RFy5ppYs4HMjiUY1y0tl983Am6BGddtiyrE5ozmCY/CSRh f8d7UZvXyRjgawetaECG7ERoPthoDmHd7MBqGqypHgUVhTfvROhg73+BQ+lZcKll+QrN JRlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=l3DKox+qqztb4asvNOVtIBlg1suTqH8KA57WcRUyDeo=; b=nFu+wR4j4PBAx4zjpgjyKpWNyMttu48FBhFuSnX/ZbyLmYYNjJz6a75voQIWn/0gaZ IG6u6yUMODWXwW/gu4B2iB/ugSBZAIfA9Q04R/MEOc2W/UqBjOy7KhyhnLHEky5Ce9/1 spX7VVnPFB0wnRWwpS+HbJUliMzyYRcNly3AMR39o7/lsMZOympFRAN1xlPKywKgWGil nTzavhmeaWKi8Ayjuebkxh9GZwK8V/apx5SPpuqskblUssluiLBRp+qz+20SRSAmBFhh fl0LrDSFppi818fTzMYea0GYSp+bkUzzLAAIJkDrK/ErXQzhwHmvXvq+tek5VKdZh5w2 9rBQ== X-Gm-Message-State: APjAAAUNnwehoaYZHspX6o4EpElIxpPqw7Gz3RXd4uNJIMtRu18yBgIH NSAl0mHWgIFiXmS934V6gojNzpRDOxw= X-Received: by 2002:a1c:bc08:: with SMTP id m8mr21757452wmf.189.1581926543185; Mon, 17 Feb 2020 00:02:23 -0800 (PST) Received: from localhost (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.gmail.com with ESMTPSA id f11sm18834522wml.3.2020.02.17.00.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 00:02:22 -0800 (PST) References: <20200216173446.1823-1-linux.amoon@gmail.com> <20200216173446.1823-4-linux.amoon@gmail.com> User-agent: mu4e 1.3.3; emacs 26.3 From: Jerome Brunet To: Anand Moon , Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Michael Turquette , Stephen Boyd Cc: Kevin Hilman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: Re: [PATCHv1 3/3] clk: meson: g12a: set cpu clock divider flags too CLK_IS_CRITICAL In-reply-to: <20200216173446.1823-4-linux.amoon@gmail.com> Date: Mon, 17 Feb 2020 09:02:21 +0100 Message-ID: <1jmu9hzlo2.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? > 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 > }, > }; > > @@ -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. > }, > };