From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 677FCC43381 for ; Sat, 2 Mar 2019 04:30:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34A1E20857 for ; Sat, 2 Mar 2019 04:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OVHvi90F"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sholland.org header.i=@sholland.org header.b="K50d1HyP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="HRCCY0W7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34A1E20857 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=30oP3gHNE+fRhy/bUD24tHICDPKZV3fwdXBe9ML79ks=; b=OVHvi90F0Orhq3 IjLkxFvfeXUYrFTZ8Zo89ViyIdPtIn67xVuLUULP4p/sHWfRwwVScQ/5gG+2GKQrRDA460Izh9d+6 BxCzX/bSCXKuU24kgPGsOEAeGrYu+tzaVDZqwNDVwEd6Uj23tAc2Q/TFAuc15D9bmOqiDiDzXlgBL MPYcTIiIGCD+hZFh7rxiyuEEpJxJLeVtpM3ZtryUXVb85PlJIp5oNzuYRsf1jBBDJyoCgCaHsNgXC wZzb7l/tqGk4rT1Lpy4/8q8RNtMplgs5Y1K7+pOAzmtRtLxs/98nzgRv23rgHYCGI3mwwWWymEoAE Bzr6APXNcjyRqM6EFKeQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzwIC-0000qC-1h; Sat, 02 Mar 2019 04:30:32 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzwHg-0007Uc-IE for linux-arm-kernel@lists.infradead.org; Sat, 02 Mar 2019 04:30:03 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3B42E22101; Fri, 1 Mar 2019 23:29:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 01 Mar 2019 23:29:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=bADvv49nXnLPt pW614Ubn0XGjHhOdyRTQa2gb7Gflf0=; b=K50d1HyPpvpTEjvzWX5dR1s0dSMJT LAlxolW8MyvZ52EOMPnd1Ya3L5d/VhuAPc/1KWaSrCuk5lDXvilCWjPUoiYWhIb0 IrqweSGPcPUxVt8DcwcI2dQ4gWv7DUk3wHMqu5E7cdESQk2eq882V9PV916Jc58E NmxDLdoKlL0uVvwco1A6bXydp9BkyC7QxRS0h471sqeuL5ET0Ux8vXh7eAuj6Yiu 3lQohhPg417zaGe/JJh5AIw7YN9giX/G4tX0n9JUFpuS/+vq+RNKTfDAdjKorrmk SRKdB268yPzdQjZthA9Kqejw0C8CQqu9Ez2VbWyKk/siC/JeClUcuufXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=bADvv49nXnLPtpW614Ubn0XGjHhOdyRTQa2gb7Gflf0=; b=HRCCY0W7 Uym4gSN0f944OKlxytTMGQXKPJRkx8bIHe45yQVo4CmV6ileBE8jUCiXPb1LTK82 4Ma4YdJ6j23+ZS3yBUT96lLIgaO1GjycPqT7eFtFbx97h+PRVMPD80BKoAyxAJJu 7Y9f+ElHXEFrXgEVr6qzk6GBetvhnCJSoFy8bVYInI9TBP5TPQ9tqObPVfcylzQC +jQzI+mn/l/fZuqSS7uGU0DfoYOqXDeT4H/BoxMZtOqsXbBhuyibafnZYrXV3+9y 4hl+gO0reh46oy0dGsoHegKVqNyjBW0yKxAS2JceFRtbVg3J1ebJqxf5M9n/cVQ6 c3HFa106rfUh8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrvdeigdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecukfhppe ejtddrudefhedrudegkedrudehudenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhu vghlsehshhholhhlrghnugdrohhrghenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 41B7210318; Fri, 1 Mar 2019 23:29:53 -0500 (EST) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jassi Brar , Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland Subject: [PATCH v3 02/15] clk: sunxi-ng: Mark AR100 clocks as critical Date: Fri, 1 Mar 2019 22:29:38 -0600 Message-Id: <20190302042951.53671-3-samuel@sholland.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190302042951.53671-1-samuel@sholland.org> References: <20190302042951.53671-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_203000_811361_BB980B27 X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Samuel Holland , linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c | 2 +- drivers/clk/sunxi-ng/ccu-sun8i-r.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c index 27554eaf6929..4f822b598ade 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c @@ -45,7 +45,7 @@ static struct ccu_div ar100_clk = { .hw.init = CLK_HW_INIT_PARENTS("ar100", ar100_r_apb2_parents, &ccu_div_ops, - 0), + CLK_IS_CRITICAL), }, }; diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r.c b/drivers/clk/sunxi-ng/ccu-sun8i-r.c index 71feb7b24e8a..90b3530e2c18 100644 --- a/drivers/clk/sunxi-ng/ccu-sun8i-r.c +++ b/drivers/clk/sunxi-ng/ccu-sun8i-r.c @@ -50,7 +50,7 @@ static struct ccu_div ar100_clk = { .hw.init = CLK_HW_INIT_PARENTS("ar100", ar100_parents, &ccu_div_ops, - 0), + CLK_IS_CRITICAL), }, }; -- 2.19.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel