From patchwork Fri Oct 13 20:59:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Gerlach X-Patchwork-Id: 115831 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp1152197qgn; Fri, 13 Oct 2017 14:00:45 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDShNcOnq9ImxOqVXmJ+rvu6KMgh+3nBkKdnCwTeA6ghShQSR47tWWlPT8Sa2rLydn1LUHl X-Received: by 10.98.144.142 with SMTP id q14mr2360966pfk.303.1507928445115; Fri, 13 Oct 2017 14:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507928445; cv=none; d=google.com; s=arc-20160816; b=Ttb+DSlz5TUnhutXSGkUVrwIfIr0vgu9RA3KnD9wLwVZjrOjEYs1IxBEAPYqp/04MB yT6MM12J+4pK1pqhj8SM9+FAkY9xwekKQWKSwSX6NKIRcGzEVAFHcPwhRn7IcxnlJCJ4 vcKlIeEdokPgJ0VsptHhK0/O7TiE7ger0RWjcGfmxTg5F2MQlpJ97K3uhZTxKEXOTHYJ BHmjCnqqLdaDrSlH4+f/GCFIgTcq2Zq1ZdXPuSzzAuLWKiOOSlIKhvu9n7Onxdmu4cVE dM3oKW7vHQEvarZU+USq4Co18h6I2/HVjWFEfknEhMqnNhrTGgpl2nyTSFyxZ0n5Ln+0 JcSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature:arc-authentication-results; bh=PZwp9pzomu6ZnLf7Q3fWLhzMyc0evHSmUQNQhwiObrc=; b=JKeCP6ym9a3T47Tcwf2FAtof/lb2pQJvviwnqeQzIL/3qXKpRFRTyciCHLU1PI60yQ Io0L1o+NEGETBH5BdYtKnAdBi5ta5Zf/Ztr2zy+fB5TVuCac1wwIJz4WfUXy0733Af7d ASKr9vRz2ERyxQBWj0G6B/lXgTCP0/PEyfkm8Q5oGbzliKY++5St0Ezb6U214DYxP7ol nys89NVifUeWJnvTH65ujKEG1KSp7lqLYZ9LI5krFFnOWhyKezjk3TGBSYzOj5KnHnWD kVxf4tUSK7VBiElSMITRMBEnq0Ab0MsvUhyP8IGkaGKpvhPfZYM7mY7FBvMpBMZfv466 hvtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hn5/Oa6Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si1033309pfb.181.2017.10.13.14.00.44; Fri, 13 Oct 2017 14:00:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hn5/Oa6Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752798AbdJMVAm (ORCPT + 27 others); Fri, 13 Oct 2017 17:00:42 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:42860 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbdJMVAO (ORCPT ); Fri, 13 Oct 2017 17:00:14 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9DKxKNA026992; Fri, 13 Oct 2017 15:59:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507928360; bh=U6FvJQUd0xi4Y+ebTC3iZGueVKVvexaUyPTcM4X2UgE=; h=From:To:CC:Subject:Date; b=hn5/Oa6Q49eVQVzh64H996vzA2IxoO8ZmFf5nroDWF8ONSBAzP9VZnGF7QpW8pmye 6pEWC53Bwhl1JEBEzFOOyyw8aw9+QL2hi+ty2mYxhm44ElOE2xGY2XFLDj0T3rFG8u lOOScICyorES0ISIRem9JkPMWpWFS+tPFRMoxS10= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9DKxKVM010000; Fri, 13 Oct 2017 15:59:20 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 13 Oct 2017 15:59:19 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 13 Oct 2017 15:59:19 -0500 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 v9DKxJ1u029627; Fri, 13 Oct 2017 15:59:19 -0500 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 v9DKxJ317949; Fri, 13 Oct 2017 15:59:19 -0500 (CDT) From: Dave Gerlach To: Tony Lindgren , Santosh Shilimkar , Russell King CC: , , , , Rob Herring , Dave Gerlach , Keerthy J , Johan Hovold Subject: [PATCH v5 0/2] memory: Introduce ti-emif-sram driver Date: Fri, 13 Oct 2017 15:59:13 -0500 Message-ID: <20171013205915.9652-1-d-gerlach@ti.com> X-Mailer: git-send-email 2.13.4 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is v5 of the series introduces a ti-emif-sram driver to be used on am335x and am437x. The previous version of this series can be found here [1]. The only change to this version is to greatly simplify the makefile rules used to generate the emif-asm-offsets header to fix some build issues caught by the kbuild robot. The file has been renamed as ti-emif-asm-offsets.h and is also now placed under include/generated so that it is handled along with the other generated headers. The macros were left inside the "ti_emif_offsets" inline function in the ti-emif-sram header as they are also needed by the sleep33xx and sleep43xx from the "code (seen here [2]), and describing the build depency on the generated ti-emif-asm-offsets.h file got messy. Just including the macros in the asm-offsets file generated for the arch/arm/mach-omap2 was the cleanest way I could come up with, otherwise ensuring that ti-emif-asm-offsets.h is generated before sleep33/43xx.S gets built was problematic. Of course, I am open to a better idea if someone has one. 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 [3]. Regards, Dave [1] https://www.spinics.net/lists/arm-kernel/msg607959.html [2] https://www.spinics.net/lists/arm-kernel/msg595934.html [3] https://github.com/dgerlach/linux-pm/tree/upstream/v4.14/amx3-suspend-v5 Dave Gerlach (2): Documentation: dt: Update ti,emif bindings memory: ti-emif-sram: introduce relocatable suspend/resume handlers .../bindings/memory-controllers/ti/emif.txt | 18 +- drivers/memory/Kconfig | 10 + drivers/memory/Makefile | 13 + drivers/memory/emif-asm-offsets.c | 22 ++ drivers/memory/emif.h | 17 ++ drivers/memory/ti-emif-pm.c | 339 +++++++++++++++++++++ drivers/memory/ti-emif-sram-pm.S | 334 ++++++++++++++++++++ include/linux/ti-emif-sram.h | 144 +++++++++ 8 files changed, 896 insertions(+), 1 deletion(-) 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 -- 2.13.4