Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3946045ybv; Sun, 16 Feb 2020 09:36:44 -0800 (PST) X-Google-Smtp-Source: APXvYqzkEvHlcguNM5glwxKrBZa+UPBzm/BqQkieuSbJP7QfKU44FVBMO+Yyv0oNBwPqC49hqLzo X-Received: by 2002:a9d:864:: with SMTP id 91mr6825610oty.289.1581874604706; Sun, 16 Feb 2020 09:36:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581874604; cv=none; d=google.com; s=arc-20160816; b=Qm9mO1/UYiO85CxfHOSIYv+NUPhSDx01on3AI+xh2QvQwmIJnLZXoRy+O8hi9Lymr1 p4zW/p8bkIf3lfHF7ea367+NGdiU3hZfU+Fyg9QnO2t0+TTZ59H0VhIkq4p3geCEUK6v sK51ge+zE98ed7bHqtezgMPAsWEhCjkIX5p6dz8LJMSV9xVoBHa+kMtCAItiahAmREK2 ZZ+9vcPPXKyC01ITj0Om40ZI7soLx4I9Y09gEzE+T/PBECZuTxnKqYe6SWdTjiakx4a2 3ppraGI4KZjRK95yiGKf9Bsc0eHnc5eZGTxcHXU/pgTnNe8cmguBRXbLEm9OprkoAa4V WYTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BNTtBgVLy/qcKAejtYBYBKwDBWINtwQVadgcq2wXqcc=; b=Ey7wm2lxbJHYns0Y81V0HWzlG8NaO7cjikQ1+18tnoRAzzy2O4JKU2eWRtgJuW/aai cT2aXWeBq3/zbj1iItEwwgc0FYfkZLp2wLqaBKi4lfzq+s0ZcMLfDeAHhKIyQho0MP08 Cpl7R8XJv07B99hC/8RndTVVUaB+tvoYox8f69Rok5TTXUAeEVp14w8+6JHpgBWQbETf C5wMnvdyNjmU3BsSwWF4r/A94/ee4MdKZ7dvvLtaOjUK9wJJEwhqC8STO8bz9kSwYGir Tr2ltLO9xbaDY2CzxBQTqSmqOMlJ9SYJQfkGCvRWS5NqPG3gsQVHVQSAYTEMqX897ZVx xAHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OecFXFWn; 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 b2si7170775ots.284.2020.02.16.09.36.32; Sun, 16 Feb 2020 09:36:44 -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=OecFXFWn; 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 S1726719AbgBPRfR (ORCPT + 99 others); Sun, 16 Feb 2020 12:35:17 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36207 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbgBPRfQ (ORCPT ); Sun, 16 Feb 2020 12:35:16 -0500 Received: by mail-pj1-f67.google.com with SMTP id gv17so6166313pjb.1; Sun, 16 Feb 2020 09:35:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BNTtBgVLy/qcKAejtYBYBKwDBWINtwQVadgcq2wXqcc=; b=OecFXFWn8mpigldvStNPoHEuXc6i76RtX1CJRWx0neN1mXT3cIGoQY5gMMzf0yW3UU 6fvBb7QDc9gtMQ9bCgAsiRMRapW9YqBFIRMVg45SSoElJYSnaClN0oziimHxUq0Qrdzo KZpX4J3jAnetKAF4uP1Kva9szm/p38k8ivcSjgYcm4HX8ta85lEe+IM1RuIE690JcoKp EAsmYnvFpTPeMKSKQJITs06yp8jvq0+0rT14RJTh7jUGRJL/Nlop/xQNfNel13sWHuOw drjVawtXzz1I8V46Kz0SIg3NNp/hFh+kr4Yi8lFML3tyUTMt6aDce7MmA50ZSllKjb9N 19Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BNTtBgVLy/qcKAejtYBYBKwDBWINtwQVadgcq2wXqcc=; b=VzgW9l4FyCT66VJJaUjsECkoQRR8KNYXe9mH7ccFimwkH3XYi0CoDxsMFE7BpmMENq hmswElh2nBWgNtGoJ0JAXbKkxXGTWCbnuHT1pn8d0VTNSc0eBxIOGIOpxFyel6/pCk0p XlRKx0wcbf4GSqRRlGbUwmzQqZL8TNvv7c4M+FOnQZed64Np95H/DNkIg4WMznBZYnK2 uVTkfc60FHAQjRWNLgXQMUNQwJJ8+TmknjRy2jXegqNtKudF/ChEswghxWyIH+4iUqRu eb+EN2kTW2AJ0zyfNfREgHa4Z31aqy1At3HpVOfGsq9nTsLAfwgD6KJrDYX4zgLnOVT4 ZAzw== X-Gm-Message-State: APjAAAVcSu57MiKnAEFXl9kI61Sr/eYoji+elIf/26TXa4MRAaBc3O89 Y3fROPBPW3xdhuRislNPjEY= X-Received: by 2002:a17:902:7b92:: with SMTP id w18mr12487443pll.72.1581874515671; Sun, 16 Feb 2020 09:35:15 -0800 (PST) Received: from localhost.localdomain ([103.51.74.127]) by smtp.gmail.com with ESMTPSA id a36sm14284724pga.32.2020.02.16.09.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2020 09:35:15 -0800 (PST) From: Anand Moon To: Rob Herring , Mark Rutland , Neil Armstrong , Martin Blumenstingl , Jerome Brunet , 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: [PATCHv1 3/3] clk: meson: g12a: set cpu clock divider flags too CLK_IS_CRITICAL Date: Sun, 16 Feb 2020 17:34:46 +0000 Message-Id: <20200216173446.1823-4-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200216173446.1823-1-linux.amoon@gmail.com> References: <20200216173446.1823-1-linux.amoon@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 the CPU for DVFS is getting disabled in between the late_init call, so gaiting the clock source shuts down the power to the codes. 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, }, }; @@ -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, }, }; -- 2.25.0