Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1298472pxa; Fri, 28 Aug 2020 08:56:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWJmxhG9vrqbln7o+9cEYwVjUa3sbbvmNOdqaRhrHDUmQ4b9mJcThBS3uhcvx2OzkSWAxP X-Received: by 2002:a17:907:444e:: with SMTP id on22mr2437698ejb.473.1598630185391; Fri, 28 Aug 2020 08:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598630185; cv=none; d=google.com; s=arc-20160816; b=cN5YI/+LMVvmu9uPoKr8f0vZAcYl2EY7FiadHjmsLcuFXfKihIUJXQpVi2+62ylbQy FNJz2lTyokdlat6P2Gcs1N5H2SBGTvBxcFhVxRYZYioG4J2LEizxpxU4euSCIsC45yjI zHvWNWbmSetTIhtZyCgcSRREcQzh8/5sFAHzAskqvKo3PypS/Z5PY8s7/2UVEcL4+/cz 21F73A7MaYa9co5a3hJYRQ2fprFC+EZ7Ndh0KiVV+oOt/AVEhmnTZcxqltUFMcmy6LW4 dMaJQm6zbsmbNXRX3EQLPYoGEUi7j8aCkfnYepIZSXXXQrrOI7B5HqgBWDLE0MXLslnY uIYQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=o6gJHPgz29HyNEp7tVvUTXqsiIrqG4vlD8Mvx37LylM=; b=ws+j7/4SqMc7d27mK82gIdXQJFXm89Y5qvHOWSE0kjpBvUZDMJSMrD3vBgxiSVd67I nDer4NJer4f2hxyQ1lLTGoQHGUyff+qRzumEGonv9dXpL4ulZwOtPe9kqHgxhq2Nqa3l A3xroSCMOxtah/BU+sLiuSPPybAld3Oj0ESoKFl6Lj2iZQnNfYn+m5bl9nJBBkk8UFb3 fHLYkhirPnkoI1g2XFFCGzRxMLd5oaSIwCrIvxzUzXrYkFAgsugwnYuxIJXSEtyqSUS9 MTi+0QpLOa0g3YprnOSyzuNPaEnC5oTI/5jRACWv2wuvujtfz7Y/HKjPmyDAWAxLXaKq J6vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b="ESh/+xyD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm19si914541ejb.332.2020.08.28.08.56.01; Fri, 28 Aug 2020 08:56:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b="ESh/+xyD"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727843AbgH1Pwd (ORCPT + 99 others); Fri, 28 Aug 2020 11:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbgH1Pwb (ORCPT ); Fri, 28 Aug 2020 11:52:31 -0400 Received: from mail.kmu-office.ch (mail.kmu-office.ch [IPv6:2a02:418:6a02::a2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDBC0C061264; Fri, 28 Aug 2020 08:52:30 -0700 (PDT) Received: from allenwind.lan (unknown [IPv6:2a02:169:3df5::4db]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 447C45C95F7; Fri, 28 Aug 2020 17:52:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1598629942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=o6gJHPgz29HyNEp7tVvUTXqsiIrqG4vlD8Mvx37LylM=; b=ESh/+xyDYVvJ0e5ntEQbTNpgABcwit7kFnkvpxvH/HXkMmBvKoqsGEMhpd3SetmXSR8hhR YB8LxM6gBrlXsQZuPOgXBUBdWYH2M+lzZLHEs/TJykZT9bb+i4ak69GCTxmKryt2N3Q3Ny 0khkg0/Jv+TIk7HtSOQtsweLLPLHa1A= From: Stefan Agner To: narmstrong@baylibre.com, jbrunet@baylibre.com Cc: mturquette@baylibre.com, sboyd@kernel.org, khilman@baylibre.com, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stefan@agner.ch, Marek Szyprowski , Anand Moon Subject: [PATCH v2] clk: meson: g12a: mark fclk_div2 as critical Date: Fri, 28 Aug 2020 17:52:05 +0200 Message-Id: <577e0129e8ee93972d92f13187ff4e4286182f67.1598629915.git.stefan@agner.ch> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2 seems to be necessary for the system to operate correctly as well. Typically, the clock also gets chosen by the eMMC peripheral. This probably masked the problem so far. However, when booting from a SD card the clock seems to get disabled which leads to a system freeze. Let's mark this clock as critical, fixing boot from SD card on G12b platforms. Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") Cc: Marek Szyprowski Signed-off-by: Stefan Agner Tested-by: Anand Moon --- drivers/clk/meson/g12a.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index fad616cac01e..6d44cadc06af 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -298,6 +298,17 @@ static struct clk_regmap g12a_fclk_div2 = { &g12a_fclk_div2_div.hw }, .num_parents = 1, + /* + * Similar to fclk_div3, it seems that this clock is used by + * the resident firmware and is required by the platform to + * operate correctly. + * Until the following condition are met, we need this clock to + * be marked as critical: + * a) Mark the clock used by a firmware resource, if possible + * b) CCF has a clock hand-off mechanism to make the sure the + * clock stays on until the proper driver comes along + */ + .flags = CLK_IS_CRITICAL, }, }; -- 2.28.0