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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED 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 93D5EC10F0E for ; Fri, 12 Apr 2019 10:07:02 +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 6437621872 for ; Fri, 12 Apr 2019 10:07:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dIR/dzT/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6437621872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sntech.de 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=owMWJXKR2ZqLyIK0jXOJCWYIUzC4L7BMztpVmYxbTbo=; b=dIR/dzT/iAC2l+ Pzr+bKuWkuWRF5rICaiN44W9lGwZkkzeRMgCsGJMqTsbFylGlNxxYiBHW2GUPH4MzA9LCAh8cKRfH o8nrA5S0yMmjpM8mEUk8JL7lfUscBizCj71sKotoXqB4rooonjjxpnt5W+G9B8va/tMe9KK1H+qVA mvyoZO5JRyl+Uq86ELX26IYV71+m+SR+UgMUU0FROy1poQxql5DSyJjvODCakg8Z58nYcU2kFDeDz bUYx1bGhs4Ow9AGYVEN3ppDXernv4+7MPskJfk76PelHOUPeXP5LQ4AEPZbo1wOaH3lEAMWbIV8K9 EBW7C1aBJji6lyOpPfWA==; 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 1hEt5F-00030C-PA; Fri, 12 Apr 2019 10:06:57 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEt5B-0002yh-JH; Fri, 12 Apr 2019 10:06:55 +0000 Received: from ip5f5a6320.dynamic.kabel-deutschland.de ([95.90.99.32] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hEt54-0004eM-CE; Fri, 12 Apr 2019 12:06:46 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Douglas Anderson Subject: Re: [PATCH 1/5] clk: rockchip: Turn on "aclk_dmac1" for suspend Date: Fri, 12 Apr 2019 12:06:45 +0200 Message-ID: <17495106.TRDjcDkMKC@diego> In-Reply-To: <20190411232157.55125-1-dianders@chromium.org> References: <20190411232157.55125-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_030653_781247_8016F17A X-CRM114-Status: GOOD ( 21.72 ) 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: Elaine Zhang , amstan@chromium.org, Stephen Boyd , briannorris@chromium.org, Michael Turquette , dbasehore@chromium.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, mka@chromium.org, ryandcase@chromium.org, Chris Zhong , 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 Am Freitag, 12. April 2019, 01:21:53 CEST schrieb Douglas Anderson: > Experimentally it can be seen that going into deep sleep (specifically > setting PMU_CLR_DMA and PMU_CLR_BUS in RK3288_PMU_PWRMODE_CON1) > appears to fail unless "aclk_dmac1" is on. The failure is that the > system never signals that it made it into suspend on the GLOBAL_PWROFF > pin and it just hangs. > > NOTE that it's confirmed that it's the actual suspend that fails, not > one of the earlier calls to read/write registers. Specifically if you > comment out the "PMU_GLOBAL_INT_DISABLE" setting in > rk3288_slp_mode_set() and then comment out the "cpu_do_idle()" call in > rockchip_lpmode_enter() then you can exercise the whole suspend path > without any crashing. > > This is currently not a problem with suspend upstream because there is > no current way to exercise the deep suspend code. However, anyone > trying to make it work will run into this issue. > > This was not a problem on shipping rk3288-based Chromebooks because > those devices all ran on an old kernel based on 3.14. On that kernel > "aclk_dmac1" appears to be left on all the time. > > There are several ways to skin this problem. > > A) We could add "aclk_dmac1" to the list of critical clocks and that > apperas to work, but presumably that wastes power. > > B) We could keep a list of "struct clk" objects to enable at suspend > time in clk-rk3288.c and use the standard clock APIs. > > C) We could make the rk3288-pmu driver keep a list of clocks to enable > at suspend time. Presumably this would require a dts and bindings > change. > > D) We could just whack the clock on in the existing syscore suspend > function where we whack a bunch of other clocks. This is particularly > easy because we know for sure that the clock's only parent > ("aclk_cpu") is a critical clock so we don't need to do anything more > than ungate it. > > In this case I have chosen D) because it seemed like the least work, > but any of the other options would presumably also work fine. > > Signed-off-by: Douglas Anderson applied for 5.2 with Elaine's rb Thanks Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel