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=-6.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 EA9C1C004C9 for ; Tue, 7 May 2019 19:34:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C23CB2087F for ; Tue, 7 May 2019 19:34:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=crapouillou.net header.i=@crapouillou.net header.b="ul8LtZgM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbfEGTem (ORCPT ); Tue, 7 May 2019 15:34:42 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:56108 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbfEGTem (ORCPT ); Tue, 7 May 2019 15:34:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1557257680; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcPiB45jv4Du3jNcWzAjDm6qZc2pmDR2VP3HW6bhzj4=; b=ul8LtZgMtyVXQhTshbOKA1R32CPilvrSogtbt0Gh7fXvM54BnejQ+GUFaS8tU+G7TLbDUK J2Yk3q/eSTp+t/Suhdifemjnu8bvnSNUTkR930OsrfDBDY5KKjP2h2JukT7gL9SV4F1pt8 wjdKzuRzP72/OLovO+we7/gPS53XbKY= From: Paul Cercueil To: Ralf Baechle , Paul Burton , James Hogan , Michael Turquette , Stephen Boyd Cc: od@zcrc.me, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Paul Cercueil Subject: [PATCH 3/5] MIPS: jz4740: PM: Let CGU driver suspend clocks and set sleep mode Date: Tue, 7 May 2019 21:34:19 +0200 Message-Id: <20190507193421.12260-3-paul@crapouillou.net> In-Reply-To: <20190507193421.12260-1-paul@crapouillou.net> References: <20190507193421.12260-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org Instead of forcing the jz4740 clocks to suspend here, we let the CGU driver handle it. We also let the CGU driver set the "sleep mode" bit. This has the added benefit that now it is possible to build a kernel on SoCs newer than the JZ4740 with CONFIG_PM. Signed-off-by: Paul Cercueil --- arch/mips/jz4740/pm.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/mips/jz4740/pm.c b/arch/mips/jz4740/pm.c index 2d8653f2fc61..9e6c7a2b955f 100644 --- a/arch/mips/jz4740/pm.c +++ b/arch/mips/jz4740/pm.c @@ -18,21 +18,13 @@ #include #include -#include - static int jz4740_pm_enter(suspend_state_t state) { - jz4740_clock_suspend(); - - jz4740_clock_set_wait_mode(JZ4740_WAIT_MODE_SLEEP); - __asm__(".set\tmips3\n\t" "wait\n\t" ".set\tmips0"); - jz4740_clock_set_wait_mode(JZ4740_WAIT_MODE_IDLE); - jz4740_clock_resume(); return 0; } -- 2.21.0.593.g511ec345e18