From patchwork Mon Apr 18 16:12:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 715951 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3IGE9Gn018885 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Apr 2011 16:14:31 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p3IGCd3m028340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Apr 2011 11:12:39 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id p3IGCchL022042; Mon, 18 Apr 2011 11:12:38 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A927B80627; Mon, 18 Apr 2011 11:12:38 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id 1E04780626 for ; Mon, 18 Apr 2011 11:12:36 -0500 (CDT) Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p3IGCWI2017586; Mon, 18 Apr 2011 21:42:32 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Mon, 18 Apr 2011 21:42:16 +0530 From: "Nori, Sekhar" To: Russell King - ARM Linux , "Hilman, Kevin" , Tony Lindgren , Paul Mundt , Magnus Damm Date: Mon, 18 Apr 2011 21:42:10 +0530 Subject: RE: [RFC PATCH v2] Consolidate SRAM support Thread-Topic: [RFC PATCH v2] Consolidate SRAM support Thread-Index: Acv9pgRtyViwYsxyQFO79CzixT7KrAAOgQiQ Message-ID: References: <20110415130607.GM1611@n2100.arm.linux.org.uk> <20110418085259.GA26044@n2100.arm.linux.org.uk> In-Reply-To: <20110418085259.GA26044@n2100.arm.linux.org.uk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Cc: "davinci-linux-open-source@linux.davincidsp.com" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Apr 2011 16:14:31 +0000 (UTC) Hi Russell, On Mon, Apr 18, 2011 at 14:22:59, Russell King - ARM Linux wrote: > This is the second revision of this patch. I've not moved it out of > ARM yet as I haven't had a positive response from SH yet. I was able to test this on DaVinci (DA850 suspend-to-RAM) with the following additional changes: There was a sram_free call remaining in pm.c file. > > Lastly, uio_pruss should probably take the SRAM pool pointer via > > platform data so that it doesn't have to include Davinci specific > > includes. > > arch/arm/Kconfig | 2 + > arch/arm/common/Kconfig | 4 ++ > arch/arm/common/Makefile | 1 + > arch/arm/common/pv-pool.c | 69 +++++++++++++++++++++++++++ > arch/arm/include/asm/pv-pool.h | 20 ++++++++ > arch/arm/mach-davinci/da850.c | 2 +- > arch/arm/mach-davinci/dm355.c | 2 +- > arch/arm/mach-davinci/dm365.c | 2 +- > arch/arm/mach-davinci/dm644x.c | 2 +- > arch/arm/mach-davinci/dm646x.c | 2 +- > arch/arm/mach-davinci/include/mach/common.h | 2 +- > arch/arm/mach-davinci/include/mach/sram.h | 13 +---- > arch/arm/mach-davinci/pm.c | 12 +---- > arch/arm/mach-davinci/sram.c | 42 +++-------------- > arch/arm/plat-mxc/Kconfig | 2 +- > arch/arm/plat-mxc/include/mach/iram.h | 24 +++++++-- > arch/arm/plat-mxc/iram_alloc.c | 50 +++++--------------- > arch/arm/plat-omap/include/plat/sram.h | 17 ++++--- > arch/arm/plat-omap/sram.c | 34 +++++--------- > drivers/uio/uio_pruss.c | 7 ++- > 20 files changed, 171 insertions(+), 138 deletions(-) The davinci audio driver in sound/soc/davinci/davinci-pcm.c uses the sram allocator too and would need to be converted to the new API. Thanks, Sekhar diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c index 06eb0ff..0068e41 100644 --- a/arch/arm/mach-davinci/pm.c +++ b/arch/arm/mach-davinci/pm.c @@ -131,7 +131,8 @@ static int __init davinci_pm_probe(struct platform_device *pdev) static int __exit davinci_pm_remove(struct platform_device *pdev) { - sram_free(davinci_sram_suspend, davinci_cpu_suspend_sz); + pv_pool_free(davinci_pv_pool, davinci_sram_suspend, + davinci_cpu_suspend_sz); return 0; } The cpu suspend code on DaVinci was not aligned 8 to bytes and so the fncpy function was throwing a bug. diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S index fb5e72b..dcb8e9d 100644 --- a/arch/arm/mach-davinci/sleep.S +++ b/arch/arm/mach-davinci/sleep.S @@ -50,6 +50,8 @@ * r4: contains virtual address of the DEEPSLEEP register */ ENTRY(davinci_cpu_suspend) + .align 3 + stmfd sp!, {r0-r12, lr} @ save registers on stack ldr ip, CACHE_FLUSH