From patchwork Wed Mar 31 10:58:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12175249 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=-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 D1162C433C1 for ; Wed, 31 Mar 2021 11:05:30 +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 D2BB86192F for ; Wed, 31 Mar 2021 11:05:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2BB86192F 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=8szH7XeQaMsvoG/x2XJNaZwtF2CElGaSQHtJaTsGBBo=; b=LqEFAbhQHhL2XXD9i/5OOX1r2 /uMqVVZKC+gigSz2EzOnuPyf/mhyTTIzRjjUTI1CjB7WQxCUgmZjXa95uoLcTV+j/rxXlo8zriEhL tr42+bwMuK4bNcPPH0LuYiixySaWnQ/c3w0kt2fyGGAGEY7q46tMIYp52YpEeX+k3McpDP1JmjohK GnyJ02E83177EbJ+oB1/HpyeIpxygI1NUIow8LUDX367E/3Rjs41JiXX7Myhr/wfV17ekYyXyn0ft eYKvmA3bEXtFM+OwUYgf0v3WnYllEZYmIgn4fxa7ajPPuxsiuS2NHpKuZccD6yvv9X86qrlxe9KmQ 9rK/M9ghg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRYcx-006KXA-Bp; Wed, 31 Mar 2021 11:03:12 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRYZk-006JOH-GF for linux-arm-kernel@lists.infradead.org; Wed, 31 Mar 2021 10:59:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617188392; x=1648724392; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4BQZ/iTmn3jDQYiKb3oiGkOU5qXJu63VT3CwhT9FgTM=; b=atupuNRiyaYK2L3oaDxNk8JbIlz4oi/DINNaLKy7SxI8P0c3+aEya1ur PclKTgUPMYBZ+rOdkZD0F9X8y813Eo4TSTDuDa4hfa2LWuIdBHcy7gppd w06wTGKAFoE+p9YeSZihDbdn1jJXgm6aH05BuIXBaX9L8XrSDovBdfngf X9rykK/UOG1EcGFF6LtaUoY8Ex18CFA9zJx9lpHrzxSx0WsmuxjnK+4pY d1tWA4cxJDu9fmH/Wl3WQ07nK8xA7RRZT7GQLQ6t9NLObDpOsAUB/YMBL sJnH3h/FrOUP7LrWRovB0IrbsMePqRryLj44x9F3Xei/q7mLIpnwJ9dqJ A==; IronPort-SDR: qiwHCcUd3Ap2D8kT5N+7Vu74ymEvZ4iVEkAUBmrfpkgCi51Bg5kNFdJTeEQGITA42b6ziZGiKK 62ywG0bLqMGkvxG0hPPzqUZcuBvJMLbYMourfVQ26WaBaQ0pQt8tp0NL8yBG3RVJCjsneHFOOv ZBvSPeB8wnkrgv9MuX8l374TyE3nkDirHgTd/DODSdbGQzULXhbrCJYWJXKCpdWjkFbqmU/81R TqrEtJwHFR3DCH1u/iiXZc38Oa3EtLqieGtCGc+FvFWRD2uV0GraiHUZcHJtxlumu//QreMvPY IyQ= X-IronPort-AV: E=Sophos;i="5.81,293,1610434800"; d="scan'208";a="109198810" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 31 Mar 2021 03:59:51 -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 03:59:51 -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 03:59:49 -0700 From: Claudiu Beznea To: , , , , CC: , , , Claudiu Beznea Subject: [PATCH 15/24] ARM: at91: pm: wait for ddr power mode off Date: Wed, 31 Mar 2021 13:58:59 +0300 Message-ID: <20210331105908.23027-16-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_115954_519858_020DCC86 X-CRM114-Status: UNSURE ( 8.11 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Wait for DDR power mode off before shutting down the core. Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/pm_suspend.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index 9c9e08fd8300..7396e18dd7e5 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -980,6 +980,11 @@ ulp_exit: mov tmp1, #0x1 str tmp1, [r0, #0x10] + /* Wait for it. */ +1: ldr tmp1, [r0, #0x10] + tst tmp1, #0x1 + beq 1b + /* Shutdown */ ldr r0, .shdwc mov tmp1, #0xA5000000