diff mbox

[RFC,v2] Consolidate SRAM support

Message ID B85A65D85D7EB246BE421B3FB0FBB593024CA31B27@dbde02.ent.ti.com (mailing list archive)
State New, archived
Delegated to: Tony Lindgren
Headers show

Commit Message

Sekhar Nori April 18, 2011, 4:12 p.m. 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

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Russell King - ARM Linux April 18, 2011, 4:18 p.m. UTC | #1
On Mon, Apr 18, 2011 at 09:42:10PM +0530, Nori, Sekhar wrote:
> 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.

Hmm, wonder why my build for DaVinci didn't pick that up.  Thanks for
that and I'll merge it in.

> 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
> +

I think you want the .align 3 on the line before ENTRY().

> 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.

Ah, right - I'll sort that too.  Slightly annoying that sound stuff
is outside the drivers/ subdir.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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