Message ID | 20210331105908.23027-21-claudiu.beznea@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=X/nU=I5=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,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 81DA1C433DB for <linux-arm-kernel@archiver.kernel.org>; Wed, 31 Mar 2021 11:07:57 +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 42F0F6187E for <linux-arm-kernel@archiver.kernel.org>; Wed, 31 Mar 2021 11:07:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42F0F6187E 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=f1lBmo2xH1G033cojoMt5Tnm/aLWHHCtlZLZTMQYMV0=; b=RWrxt3PtCaSUArdSeqziWJXVL xO13jPGjqY4JWRmAhzux8gJui+tqtc8PfeJMhudpRydQQ/eVBQnCkmCD6XwOYPpNBxxkrnXkzUQEb DhTG51NdgStGtbg1J0L2fyPrrMJrREtM2EWRJCOkyJoUr/J+ZyS0FgmrRIx2H/oALVYA52eShxOVv daPY767m39s9VyTRGEJjPXzaYvkPZscy92t3lCv3MmxEJEF1/YMIbucrFFinqbYdcxkMp1R0wJnqK mUdDNRvraA2SMsgwUci3kSGyDYx9BsXSG1jRzCZRTtpHBMGgP5rV4jpJIsW4ijkT/sCOz9l+0WOXx rtzBgUxGA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRYfu-006LmI-Bx; Wed, 31 Mar 2021 11:06:14 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRYa7-006JUI-Sq for linux-arm-kernel@lists.infradead.org; Wed, 31 Mar 2021 11:00:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617188415; x=1648724415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1EEQphPvvifx5tT1d9lrbbNwiHANmvdL/6HrlgcCol8=; b=WH1+eHT6eZ4FyM39Ly8OwkYwNAawXUGaTt847wbtlO8/Jg/nVeMx0Y54 9uPxYQpMS1daf1Eqls8eeUytmZFw+dqzwT85SPiyUBF3qyypGS1jdUxPK sdVxbFl+knUiN+yzA3Y9HyHJ0qCWSnLSs8WuSz5r4CF+hrXBLXQ7y96Lq lyLfGe96t9jx/NPix3EquPawLPD1lKh1XyZSkaCZDw5pXH5W7MW/AeaTJ Oa4VawGFO8X3oUo8b/EXJeIlgVljOBRVFniEAERoB3jKEMGzXE1/MwU9z AHSOb38wiJFcLP9/HCy8SgPS8wRDY/jZRqtrUr6sy/k2b2jKPrz2WXEfE g==; IronPort-SDR: KglwRD31JvSJsaafilbWO6mOcWB6nJT1oeEbojZN2BSeHF/PTjh9c8FwqO+i3IXrsabB14gGHM DEcDRA9hl6SqvbdV9OxnKAQIfA7RN40Acp/MwHOzPmuno6uOfPB5dphwAgh5Dd/aZpuGxAQxQh wWyM1CpZGaVCNtHizzhGuOGOz6yxdbpw6TmTzJqGe92grhxhhsHYfxgF2i8wHA3RnOi5m10/Rf XlQFuQkR2C1fhcEcXt7GDBSviyZtEfqcNFyI7O1FDdP6K4a1CdK4MfZrq9+jdqFasFbwu2XH6/ b7Y= X-IronPort-AV: E=Sophos;i="5.81,293,1610434800"; d="scan'208";a="115333372" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 31 Mar 2021 04:00:03 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 31 Mar 2021 04:00:03 -0700 Received: from rob-dk-mpu01.microchip.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; Wed, 31 Mar 2021 04:00:01 -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 20/24] ARM: at91: pm: add backup mode support for SAMA7G5 Date: Wed, 31 Mar 2021 13:59:04 +0300 Message-ID: <20210331105908.23027-21-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210331105908.23027-1-claudiu.beznea@microchip.com> References: <20210331105908.23027-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-20210331_120016_511327_6CB54835 X-CRM114-Status: GOOD ( 11.77 ) 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 91b4014d2e10..fcb20272d65d 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -729,7 +729,8 @@ static int __init at91_pm_backup_init(void) struct platform_device *pdev; int ret = -ENODEV, located = 0; - if (!IS_ENABLED(CONFIG_SOC_SAMA5D2)) + if (!IS_ENABLED(CONFIG_SOC_SAMA5D2) && + !IS_ENABLED(CONFIG_SOC_SAMA7G5)) return -EPERM; if (!at91_is_pm_mode_active(AT91_PM_BACKUP)) diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index 7396e18dd7e5..cbd61a3bcab1 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -106,6 +106,12 @@ lp_done_\ena: #endif .endm + .macro at91_backup_set_lpm reg +#ifdef CONFIG_SOC_SAMA7 + orr \reg, \reg, #0x200000 +#endif + .endm + .text .arm @@ -989,6 +995,7 @@ ulp_exit: ldr r0, .shdwc mov tmp1, #0xA5000000 add tmp1, tmp1, #0x1 + at91_backup_set_lpm tmp1 str tmp1, [r0, #0] .endm
Adapt at91_pm_backup_init() to work for SAMA7G5. Also, set the LPM pin to shutdown controller. This will signal to PMIC that it needs to switch to the state corresponding to backup mode. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> --- arch/arm/mach-at91/pm.c | 3 ++- arch/arm/mach-at91/pm_suspend.S | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-)