Message ID | 20210415105010.569620-3-claudiu.beznea@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=z9KK=JM=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 B18F5C433ED for <linux-arm-kernel@archiver.kernel.org>; Thu, 15 Apr 2021 10:54:04 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4170B6115C for <linux-arm-kernel@archiver.kernel.org>; Thu, 15 Apr 2021 10:54:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4170B6115C Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wAN4KClx6fivYj7aiu6XX/1roR3hEn4mL+KH59OdvT0=; b=LWtd6Gw8ug/gf8+4jNQBUjNSu mtFehOVbsPLmJSeew/PTW3Or0d0KD/PVmct5PK/eha56YElqx18Gvp+yoJ4w4HrxM1FRyZxxfVM9N ULYaHhnMPxDRNFsqgzH7Dj6e6lzIDOQK+20MHWsMmExQ7SAtVA03YWgsf12zOKEdCF3sn/U86Q0ll ElyTFOyZL+qhG2Re2R/kaheaWCwV4XW9BV5dBbhYn/hEJfJs4oTZKLm+5yMjH0He/F30D9c7KcyD1 nJbYyGZOri5JbwFOgWtRpJ3iiZ2TFGj4JidHqsj77H3xBMv5dGHaSEkj4YClwLHFjG0lc0mst7NFp gA3swF5cA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWzb7-00FnmD-17; Thu, 15 Apr 2021 10:51:45 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWzaR-00Fnbu-TC for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 10:51:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Sender:Reply-To:Content-ID:Content-Description; bh=y460U6P2YqKsySi7lYReLv/tjozO5lW929mGHt/NhGQ=; b=BgAd3B29dCaqZD14+YKsZ5HMlC vLbIxgvkpka36CiLfpmxBlG9+m5vl06CqhjMBKqjtet1aOVpceGA1JPe2nn8DX6vCWe+5nWZY1946 il2Q1PsZd2yOmupZPpkmLGfZdLvkk71nfTTlLMtA6+4gRfuCEm0IQrBCKMtJx3bgmA+K7WufEEpRY zCrSb4z7q0Gpl9mydUq34u86DH/3BECq7gzD8WM2ctkwZ1LpQJiqyauqMPPQrMIiYnh9ypytsJEg2 f8cTdAaKWgMVAJA5tWKJGjPaDf/vG5fesQz9v3azD85cV8EOrPHV4w0vd8smifSDytK1r3ygddAqd +3KLDhng==; Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWzaP-008Ux0-EF for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 10:51:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1618483861; x=1650019861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EMydS6SpF+3ky5OFGHF+CX/2ifm7LJRo+KdwzVglFdE=; b=RpQieJRoTn+nNzAhH8X9DRYM3vEUxUCuEl4iVZzIWl4gdx9VkM++KlZi xsPkpvWkgqm+awjdkU0J/1EXOehzZ+YGlwI2p8f3lH7H9qc6FvxtPv/iS Fipb8sx6O3usnMhm75Nrsf9ZxfDN3gXFvpUDAvEZby6NSx1/dpBqzvDka MJvqutm8MULYx1dxKJ6wh9m4vKeclEaUJX3c7+lkBBgKlxeY+NfJza/1Z FjFFzwKvply/ReiyHsKIvAAG4/oP0YapfBW4aCfqK9La3VFyFsNlMf1+I d6b5HUawYCsEG39D9iINH4wAPe8XhG+zqDpjvXfMgcksUwyGYJwQ6e0xf w==; IronPort-SDR: aNPeE1F5hCsUQzeED8p3GY5b3eJnDySepGq5BLmOM7Qk0q3wv5DO00/atzFKKeS9aok5xldc6i FmIE/0KEyi4BiK3C7k/AYu0s8toQ7oamM46D8bSpAhl1md5mfQZ9CtDu6YGMgSoCdBn1ULF4E1 OMicRTsSFIuxg+1vQxxMtvfhpkSI9OrbaadW9C4UMRd3J8GP/FzALqGlkIXAEhvELLjXB9yzl0 rLm20N7f6tG7sXn2eqMldOfMRXstnBUJmngc2/lh6aigkmKWETz/0Itnyrw0kiwqQ5Sd76UwbE MtE= X-IronPort-AV: E=Sophos;i="5.82,223,1613458800"; d="scan'208";a="113688131" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Apr 2021 03:50:53 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 15 Apr 2021 03:50:52 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Thu, 15 Apr 2021 03:50:49 -0700 From: Claudiu Beznea <claudiu.beznea@microchip.com> To: <nicolas.ferre@microchip.com>, <alexandre.belloni@bootlin.com>, <ludovic.desroches@microchip.com>, <robh+dt@kernel.org>, <linux@armlinux.org.uk> CC: <linux-arm-kernel@lists.infradead.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Claudiu Beznea <claudiu.beznea@microchip.com> Subject: [PATCH v3 02/24] ARM: at91: pm: move the setup of soc_pm.bu->suspended Date: Thu, 15 Apr 2021 13:49:48 +0300 Message-ID: <20210415105010.569620-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210415105010.569620-1-claudiu.beznea@microchip.com> References: <20210415105010.569620-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_035101_564191_9B1450AB X-CRM114-Status: GOOD ( 11.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
ARM: at91: pm: add support for sama7g5
|
expand
|
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index e13ceef7ac9a..3742a1fb76db 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -214,6 +214,8 @@ static int at91_sam9x60_config_pmc_ws(void __iomem *pmc, u32 mode, u32 polarity) */ static int at91_pm_begin(suspend_state_t state) { + int ret; + switch (state) { case PM_SUSPEND_MEM: soc_pm.data.mode = soc_pm.data.suspend_mode; @@ -227,7 +229,16 @@ static int at91_pm_begin(suspend_state_t state) soc_pm.data.mode = -1; } - return at91_pm_config_ws(soc_pm.data.mode, true); + ret = at91_pm_config_ws(soc_pm.data.mode, true); + if (ret) + return ret; + + if (soc_pm.data.mode == AT91_PM_BACKUP) + soc_pm.bu->suspended = 1; + else if (soc_pm.bu) + soc_pm.bu->suspended = 0; + + return 0; } /* @@ -296,8 +307,6 @@ static int at91_suspend_finish(unsigned long val) static void at91_pm_suspend(suspend_state_t state) { if (soc_pm.data.mode == AT91_PM_BACKUP) { - soc_pm.bu->suspended = 1; - cpu_suspend(0, at91_suspend_finish); /* The SRAM is lost between suspend cycles */