From patchwork Thu Nov 30 22:56:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 843219 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="hajHTV+L"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ynt984x6Dz9sNV for ; Fri, 1 Dec 2017 09:58:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750747AbdK3W5E (ORCPT ); Thu, 30 Nov 2017 17:57:04 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:29277 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbdK3W5B (ORCPT ); Thu, 30 Nov 2017 17:57:01 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vAUMuHQw013316; Thu, 30 Nov 2017 16:56:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1512082577; bh=7VF+s3urrMxRl7zZm/Qd45NzusmZz7k38hcCsKWEi2Y=; h=From:To:CC:Subject:Date; b=hajHTV+L7zrK0sJdMz/fk7frQAZRMI/O0K3USoRXfgs0njCSMabjIvetl2QdCorge NbWmPE9PTO2TciKaXOb4vp6fGv8YF1ESmbRpn/19oHUyA8HjE7FmY4iSEDjhDo9FBc aDMi1rIFUPS94FkDonfbYkxytiGYCZFBBkZv81Ts= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAUMuHsa018804; Thu, 30 Nov 2017 16:56:17 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 30 Nov 2017 16:56:16 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 30 Nov 2017 16:56:16 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAUMuGPQ028620; Thu, 30 Nov 2017 16:56:16 -0600 Received: from localhost (uda0274052.dhcp.ti.com [128.247.59.203]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id vAUMuG326308; Thu, 30 Nov 2017 16:56:16 -0600 (CST) From: Dave Gerlach To: Tony Lindgren , Santosh Shilimkar CC: , , , , Rob Herring , Dave Gerlach , Russell King , Keerthy J , Johan Hovold Subject: [PATCH v6 0/2] memory: Introduce ti-emif-sram driver Date: Thu, 30 Nov 2017 16:56:06 -0600 Message-ID: <1512082568-5012-1-git-send-email-d-gerlach@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This is a resend of v5 of this series found here [1]. It introduces relocatable PM handlers for the emif that are copied to sram and run from there during low power mode entry. The patches still have the previous ACKs but have a small change to accomodate a change made by Tony in commit cd57dc5a2099 ("ARM: dts: Add missing hwmod related nodes for am33xx"). If there are objections to this let me know ASAP. Now that a hwmod is present for the am335x EMIF, on probe fail the call to pm_runtime_put_sync causes the board to hang. In fact, this emif driver should never alter the PM state of the hardware at all through normal kernel calls, it is the job of the suspend handlers that are added, that is the whole point of this driver. Because of this, I have dropped all runtime pm calls, as any change to the PM state while the kernel is running is dangerous as we may shut of the memory controller. It makes the most sense just to drop runtime PM from the driver entirely. Besides that patch is unchanged. This code is required for low-power modes to work on AM335x and AM437x and a forthcoming PM series for those platforms will depend on this series. After both this and the PM series are reviewed I will send the necessary device tree changes for both, but in the meantime all remaining patches for am335x and am437x PM can be found here [2]. Regards, Dave [1] https://www.spinics.net/lists/arm-kernel/msg611537.html [2] https://github.com/dgerlach/linux-pm/tree/upstream/v4.15/amx3-suspend-v6 Dave Gerlach (2): Documentation: dt: Update ti,emif bindings memory: ti-emif-sram: introduce relocatable suspend/resume handlers .../bindings/memory-controllers/ti/emif.txt | 17 +- drivers/memory/Kconfig | 10 + drivers/memory/Makefile | 8 + drivers/memory/Makefile.asm-offsets | 5 + drivers/memory/emif-asm-offsets.c | 92 ++++++ drivers/memory/emif.h | 17 ++ drivers/memory/ti-emif-pm.c | 325 ++++++++++++++++++++ drivers/memory/ti-emif-sram-pm.S | 334 +++++++++++++++++++++ include/linux/ti-emif-sram.h | 69 +++++ 9 files changed, 876 insertions(+), 1 deletion(-) create mode 100644 drivers/memory/Makefile.asm-offsets create mode 100644 drivers/memory/emif-asm-offsets.c create mode 100644 drivers/memory/ti-emif-pm.c create mode 100644 drivers/memory/ti-emif-sram-pm.S create mode 100644 include/linux/ti-emif-sram.h