From patchwork Tue Apr 2 16:57:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 10882121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E79C91575 for ; Tue, 2 Apr 2019 16:57:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1C45286E0 for ; Tue, 2 Apr 2019 16:57:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3385287FF; Tue, 2 Apr 2019 16:57:16 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5527F286E0 for ; Tue, 2 Apr 2019 16:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730303AbfDBQ5P (ORCPT ); Tue, 2 Apr 2019 12:57:15 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45980 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729783AbfDBQ5P (ORCPT ); Tue, 2 Apr 2019 12:57:15 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x32Gv39b063783; Tue, 2 Apr 2019 11:57:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1554224223; bh=TQW5RUZ/VryjXyy1cIvUXYmnEVGt2jF1qbnUxdEOy2o=; h=From:To:CC:Subject:Date; b=JbM27JdDU0v2Pr0DZSoaCPOkbOsQAALEd4SLD+hRnncznZ280DRRSRvmF5I1fVg4L KCNSKB7H3/2047HaByIDJ6PdrT+kYjfLy+Er63lyx8HIpfifPOJITmko1b7v0+trVH QF+LwqmjPP3f+EeThUvbzAR7C7/QaTC/iE406LUQ= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x32Gv3Ss074938 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 2 Apr 2019 11:57:03 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 2 Apr 2019 11:57:02 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 2 Apr 2019 11:57:02 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x32Gv2ID105313; Tue, 2 Apr 2019 11:57:02 -0500 From: Dave Gerlach To: Tony Lindgren , Santosh Shilimkar CC: , , Dave Gerlach , Keerthy J , Brad Griffis Subject: [PATCH 0/2] ARM: OMAP2+: AM43x: Support DDR HW leveling suspend/resume Date: Tue, 2 Apr 2019 11:57:41 -0500 Message-ID: <20190402165743.28106-1-d-gerlach@ti.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, These patches add support for resuming am437x SoCs from suspend to mem when using hardware leveling (as configured by u-boot). This series has no effect on boards not currently using hardware leveling (am437x-gp-evm, am437x-sk-evm) but is required for any board that is using it (am437x-idk-evm) for resume to work at all, so this increases support for boards without affecting those that currently work. This series adds a ti_emif_run_hw_leveling call that is loaded to SRAM so that it can be run from low-level PM code during the resume path that attempts to trigger the HW leveling sequence just as was done in u-boot after all previously register values have been restored, which leads to a fully restored DDR configuration. These patches have been tested on am437x-gp-evm and am437x-sk-evm and showed no noticeable change in behavior (including resume time) and also tested on am437x-idk-evm which showed a working suspend to mem followed by resume, which did not previously work. Regards, Dave Dave Gerlach (2): memory: ti-emif-sram: Add ti_emif_run_hw_leveling for DDR3 hardware leveling ARM: OMAP2+: sleep43xx: Run EMIF HW leveling on resume path arch/arm/mach-omap2/sleep43xx.S | 3 +++ drivers/memory/emif.h | 4 ++++ drivers/memory/ti-emif-pm.c | 3 +++ drivers/memory/ti-emif-sram-pm.S | 41 ++++++++++++++++++++++++++++++++ include/linux/ti-emif-sram.h | 3 +++ 5 files changed, 54 insertions(+)