From patchwork Wed Jan 10 21:04:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10156111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4804560231 for ; Wed, 10 Jan 2018 21:05:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A7931FF29 for ; Wed, 10 Jan 2018 21:05:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CF6F1FFE5; Wed, 10 Jan 2018 21:05:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ACFB11FF29 for ; Wed, 10 Jan 2018 21:05:51 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=3taxwMrNDwFq4JDKN+lW8zwH+8LlaviNoO8cIlpXuDU=; b=kTn uOiypzhVjvwzHCDcTDhqzsKfAH6ak439X4p0q4YFAvMRYX+9z+wBmirV6b6MUTQBM/crppx2A8lkc n4N5+jxBWDurovBLnpdTNubBdDStwFkcD6oA6fVQE1zb/MEstcf6aqJwl9ZJ1HyIkghqNrKDfC/vv mrzDqhnk7vZF3PyOR0Wijlf8KURMPpql/WnNpgSaxsApEtdqVg3ojDLwLk5Y5QXVMQwMtRr4CN7pZ y+5Z2mi+BrHce5SfJpnqU3xhk9fIC0dOzDopZI4QLM7L3NS7a49+okkEb4CId+UdR331Pn5/hc1RF 7tZzcA+tpsoe2ZIqJEVOwJ4kkJx/obw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eZNZG-0006Dr-FK; Wed, 10 Jan 2018 21:05:50 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eZNYb-0003yq-Av for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2018 21:05:12 +0000 Received: from trochilidae.lan (unknown [IPv6:2001:1620:c6e::127]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 326BE5C3A55; Wed, 10 Jan 2018 21:58:14 +0100 (CET) From: Stefan Agner To: shawnguo@kernel.org, kernel@pengutronix.de Subject: [PATCH v2 1/7] ARM: imx: add timer stop flag to ARM power off state Date: Wed, 10 Jan 2018 22:04:47 +0100 Message-Id: <20180110210453.19264-1-stefan@agner.ch> X-Mailer: git-send-email 2.15.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1515617894; bh=2A7cXtdm0uzBn4yPvAF+RMA2Ao6n1xu5YTLGKYSgDgM=; h=From:To:Cc:Subject:Date:Message-Id; b=OTaabf7hNrV0hhd/7PHT1NplSL/xNW85PSiihTsM9/fLB7/7Sx2gBBmoiP76Z1DD1AhyTpA74v/pycnebr0I10qVyufCpIlYEu9AZssuHBO0V+kOh4GCdVuyIts1C81QT6oIIJYJScKW+T/08wneDpPW+StvO78dX6F5AhpDTLs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180110_130509_577757_3A623490 X-CRM114-Status: GOOD ( 10.78 ) 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: mark.rutland@arm.com, devicetree@vger.kernel.org, Anson Huang , linux-kernel@vger.kernel.org, Stefan Agner , robh+dt@kernel.org, fabio.estevam@nxp.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When the CPU is in ARM power off state the ARM architected timers are stopped. The flag is already present in the higher power WAIT mode. This allows to use the ARM generic timer on i.MX 6UL/6ULL SoC. Without the flag the kernel freezes when the timer enters the first time ARM power off mode. Note: The default timer on i.MX6SX is the i.MX GPT timer which is not disabled during CPU idle. However, the timer is not affected by the CPUIDLE_FLAG_TIMER_STOP flag. The flag only affects CPU local timers. Cc: Anson Huang Signed-off-by: Stefan Agner Reviewed-by: Lucas Stach --- arch/arm/mach-imx/cpuidle-imx6sx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/cpuidle-imx6sx.c b/arch/arm/mach-imx/cpuidle-imx6sx.c index c5a5c3a70ab1..d0f14b761ff7 100644 --- a/arch/arm/mach-imx/cpuidle-imx6sx.c +++ b/arch/arm/mach-imx/cpuidle-imx6sx.c @@ -89,6 +89,7 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { */ .exit_latency = 300, .target_residency = 500, + .flags = CPUIDLE_FLAG_TIMER_STOP, .enter = imx6sx_enter_wait, .name = "LOW-POWER-IDLE", .desc = "ARM power off",