Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3680155ybl; Tue, 20 Aug 2019 00:12:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxr1UeA+TjMjeyqT0/IN4eadKN6AOzQIjfgXcHjTlzGD+XaH+nCEqaRiAG8X3XW72ZHTKm0 X-Received: by 2002:a65:5082:: with SMTP id r2mr22986047pgp.170.1566285179010; Tue, 20 Aug 2019 00:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566285179; cv=none; d=google.com; s=arc-20160816; b=ZadcfBgBJguf3U1gFr7leb9fsKYomYU3KPrT9xG8/Z7yix0oCWbaOmlD4025tX0rKF 793w9eWMX1ej2BLO++PItE1+thQ3Kp/pNgMSObAKxjOUCSkIQeXTuYzs7VgaGfbyDWi1 uq3cZE1xoHAu9osQ0Z4MAufMYRp6Wh7W5QfHR2O/Rylx/g4ElsocOo3H+vxsglFXZS/Y tv/5nVvXikqCLxwTqKcDG9+9AOyayupXp5eNT1tAHSGfe9ypwkPzsigsKNkkR1fVquQe KUBUdIT33JT4cubC+VP24cj8tnYRcNeXGiBK8ZNOXetrKIkKVfr/0umXd4rpN6IFlIob jU3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=aQr5tMIKSbNDyrvl43oZeAtDjZU9MhxkdzIVE5D12B8=; b=iDRbl74rx90kNmyuW80OMVWZ5yeI3o0bqAdnkSPAC6AS/pqeTf8u8t6wfX1BnTYeze s5hKw02pAMjsGYHmxeZJQ4qDTUaITInLQpDBsOWWBjBkazpufmq6pthOh/cp9FrCslIe Y3+HlhCuxWYRvvMzK5LfE3kcvM86qtbuM4Hr5iJGZXPTxKSfK1BgEU/kBF+s0KEx/xaD EZjEoPKUDm+GM2ILRoD9krYOyjmKPPaySohMEU8u2kXALaBB1vhWY111QMb1PkiKM7oP 314UxG4mBqpQPGYTRahWuiiSVbI1Ct2sgCD37E+gGZHPl8t9CmXnVjfULdncywPbFZ0r KwRA== ARC-Authentication-Results: i=1; mx.google.com; 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 n128si11654301pgn.82.2019.08.20.00.12.43; Tue, 20 Aug 2019 00:12:58 -0700 (PDT) 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; 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 S1729294AbfHTHLq (ORCPT + 99 others); Tue, 20 Aug 2019 03:11:46 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:50919 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728777AbfHTHLq (ORCPT ); Tue, 20 Aug 2019 03:11:46 -0400 X-Originating-IP: 86.250.200.211 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: maxime.ripard@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A19A340002; Tue, 20 Aug 2019 07:11:42 +0000 (UTC) Date: Tue, 20 Aug 2019 09:11:42 +0200 From: Maxime Ripard To: Samuel Holland Cc: Chen-Yu Tsai , Jassi Brar , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Corentin Labbe , Vasily Khoruzhick , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v4 02/10] clk: sunxi-ng: Mark AR100 clocks as critical Message-ID: <20190820071142.2bgfsnt75xfeyusp@flea> References: <20190820032311.6506-1-samuel@sholland.org> <20190820032311.6506-3-samuel@sholland.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i7cnfwqz3x4wuuzw" Content-Disposition: inline In-Reply-To: <20190820032311.6506-3-samuel@sholland.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i7cnfwqz3x4wuuzw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Mon, Aug 19, 2019 at 10:23:03PM -0500, Samuel Holland wrote: > On sun8i, sun9i, and sun50i SoCs, system suspend/resume support requires > firmware running on the AR100 coprocessor (the "SCP"). Such firmware can > provide additional features, such as thermal monitoring and poweron/off > support for boards without a PMIC. > > Since the AR100 may be running critical firmware, even if Linux does not > know about it or directly interact with it (all requests may go through > an intermediary interface such as PSCI), Linux must not turn off its > clock. > > At this time, such power management firmware only exists for the A64 and > H5 SoCs. However, it makes sense to take care of all CCU drivers now > for consistency, and to ease the transition in the future once firmware > is ported to the other SoCs. > > Leaving the clock running is safe even if no firmware is present, since > the AR100 stays in reset by default. In most cases, the AR100 clock is > kept enabled by Linux anyway, since it is the parent of all APB0 bus > peripherals. This change only prevents Linux from turning off the AR100 > clock in the rare case that no peripherals are in use. > > Signed-off-by: Samuel Holland So I'm not really sure where you want to go with this. That clock is only useful where you're having a firmware running on the AR100, and that firmware would have a device tree node of its own, where we could list the clocks needed for the firmware to keep running, if it ever runs. If the driver has not been compiled in / loaded, then we don't care either. But more fundamentally, if we're going to use SCPI, then those clocks will not be handled by that driver anyway, but by the firmware, right? So I'm not really sure that we should do it statically this way, and that we should do it at all. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --i7cnfwqz3x4wuuzw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXVudLgAKCRDj7w1vZxhR xUA2AP9aAfcTGshTf2qlHF7BN2TrmF218A9337dfKfbyq+0aCAD7Bcox3Vtd+uUp V0EntkOUoyN+OLRb+3kD0UVgB/gcBwM= =xm76 -----END PGP SIGNATURE----- --i7cnfwqz3x4wuuzw--