Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp455251pxx; Wed, 28 Oct 2020 08:44:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNa6sVAoVekZvysQCfhIW0tSHEvib1mwBghOY76n7DYhXf2ZmOzHPrxqNW689M2wAXi9JF X-Received: by 2002:a17:906:415a:: with SMTP id l26mr1820577ejk.442.1603899847310; Wed, 28 Oct 2020 08:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603899847; cv=none; d=google.com; s=arc-20160816; b=lbNmwAvsgP3ngoj+5SQg4JL2hjQfg+QuogeD4/HaFeITpwlYbV2mT7sGkFtI/wWuBX j7/ZDlbWwUAQOmlACz3SzLrcW39mRGIUedTI9NAWj4nY5a9kvhH3GHzST7tDr5vC9X+N miEdqa3+dajTo3AVbgRfswR8fw22fP7gE07Vbl58XE2r7chKlaekSd8wqooo8EeUoUiq pqX9M28RiaW0xUifE1W9pgh7bVHE39Am5cTQiNlUWeXJV9IHs2+bgbwg21Kvg25o6n2n WkP5swRZN2FKgXB1kkZXT+1Jl4MSs1B2W9pfuamTnS2ZdZihNwCDS+c6cmPqaNZH6+so rqEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I7uvpD4yEjSaZfRcmcMhyztOYHSz6wFrPmkxA6siv0w=; b=eSF64XBNP3MgRrjK5tW531nYtjXJ1g+xvrkBCmgLCJms7R6k3ycv+a4XFkO3TCp6gP zKRceLfgDqKr9LQt21oALOdkLmpgq+0S6E0VmMAa4DJlQvfEvlyxdpKFKPYNhyQhMR0l eyp3ThvgIBGKSlVcYY8YFYE27Ik+vnAAZGkOxFiZHpx6zAxsfvu054qPwAd+tphrW4o7 uxSrBC2RgrBQTP4X7LNsCgla8DA9kc7ogg2OHQSYXt/0VM4D6ghOU+VaTnIvxOFtextq 0wmfUJ0YLcNZ8K+hVHh2WZaIhhvwfVjKzsQJgP993e8LlX5AHAxgYWjQCHcAtaQkXlWk Zavw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fPX4xRbx; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si3402013edu.343.2020.10.28.08.43.45; Wed, 28 Oct 2020 08:44:07 -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=@kernel.org header.s=default header.b=fPX4xRbx; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1813035AbgJ0Qrn (ORCPT + 99 others); Tue, 27 Oct 2020 12:47:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:34464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S368876AbgJ0PmR (ORCPT ); Tue, 27 Oct 2020 11:42:17 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24D5C22403; Tue, 27 Oct 2020 15:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813336; bh=0eeB7qKmmbGRKV34fM5M6+cN10gAzIBlle4uu8UJFik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fPX4xRbxCc25edbojaoVGMLrWm2THuKfw+PRf7SgKroGltGEB/SPn+zgEO+Xoe64A 22IZQP5/YN9smAZMa4kJeTh4NtDPhsI8CzuDXwhH/IqSuHkfDDxJ/YQEHATSyio2eD tbUDAR6WDOXEYBgJaag8KH0V8OTjM7ybR6traNeY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner , Jerome Brunet , Anand Moon , Marek Szyprowski , Sasha Levin Subject: [PATCH 5.9 518/757] clk: meson: g12a: mark fclk_div2 as critical Date: Tue, 27 Oct 2020 14:52:48 +0100 Message-Id: <20201027135514.777322145@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Agner [ Upstream commit 2c4e80e06790cb49ad2603855d30c5aac2209c47 ] 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") Signed-off-by: Stefan Agner Signed-off-by: Jerome Brunet Tested-by: Anand Moon Cc: Marek Szyprowski Link: https://lore.kernel.org/r/577e0129e8ee93972d92f13187ff4e4286182f67.1598629915.git.stefan@agner.ch Signed-off-by: Sasha Levin --- 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 9803d44bb1578..b814d44917a5d 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.25.1