diff mbox

[RFC,v3] Consolidate SRAM support

Message ID B85A65D85D7EB246BE421B3FB0FBB593024CF13ED4@dbde02.ent.ti.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Sekhar Nori May 17, 2011, 1:06 p.m. UTC
Hi Russell,

On Thu, May 12, 2011 at 23:15:46, Russell King - ARM Linux wrote:

> diff --git a/arch/arm/mach-davinci/pm.c b/arch/arm/mach-davinci/pm.c
> index 1bd73a0..c2f9767 100644
> --- a/arch/arm/mach-davinci/pm.c
> +++ b/arch/arm/mach-davinci/pm.c

[...]

> @@ -123,14 +118,14 @@ static int __init davinci_pm_probe(struct platform_device *pdev)
>  		return -ENOENT;
>  	}
>  
> -	davinci_sram_suspend = sram_alloc(davinci_cpu_suspend_sz, NULL);
> -	if (!davinci_sram_suspend) {
> +	davinci_sram_suspend_mem = pv_pool_alloc(davinci_pv_pool,
> +				davinci_cpu_suspend_sz, NULL);
> +	if (!davinci_sram_suspend_mem) {
>  		dev_err(&pdev->dev, "cannot allocate SRAM memory\n");
>  		return -ENOMEM;
>  	}
> -
> -	davinci_sram_push(davinci_sram_suspend, davinci_cpu_suspend,
> -						davinci_cpu_suspend_sz);
> +	davinci_sram_suspend = fncpy(davinci_sram_suspend_mem,
> +				davinci_cpu_suspend, davinci_cpu_suspend_sz);

This gave these build errors:

arch/arm/mach-davinci/pm.c: In function 'davinci_pm_probe':
arch/arm/mach-davinci/pm.c:127: error: lvalue required in asm statement
arch/arm/mach-davinci/pm.c:127: error: invalid lvalue in asm output 0
make[1]: *** [arch/arm/mach-davinci/pm.o] Error 1

Replacing davinci_cpu_suspend with &davinci_cpu_suspend fixed the issue.

With that change done, tested suspend-to-RAM on DA850 platform.
Also tested audio driver on DM365 platform with IRAM buffers enabled.

Can you also fold the following patch in? Without this the
kernel panics when suspend-to-RAM is enabled. 


Thanks,
Sekhar

Comments

Ben Gardiner May 17, 2011, 9:41 p.m. UTC | #1
The davinci platforms are mapping their io regions using iotables. This patch
series converts them to mapping using ioremap. 

This series is based on-top-of '[RFC PATCH v3] Consolidate SRAM support' from
Russell King.

The first patch in the series is a squash of the neccessary changes as
reported by Sekhar Nori in that thread.

The davinci sram init is first changed to ioremap the regions specified by 
each of the soc_infos; then the iotables are each removed; then the SRAM_VIRT
definition is removed. Finally, the da850's sram region is changed from 
the ARM local RAM region to the Shared RAM region. This change is needed
to support mcasp ping-pong buffers on da850. Suspend was tested with rtcwake
and was found to work.

Ben Gardiner (7):
  davinci: sram: ioremap the davinci_soc_info specified sram regions
  davinci: da850: remove the SRAM_VIRT iotable entry
  davinci: dm355: remove the SRAM_VIRT iotable entry
  davinci: dm365: remove the SRAM_VIRT iotable entry
  davinci: dm644x: remove the SRAM_VIRT iotable entry
  davinci: dm646x: remove the SRAM_VIRT iotable entry
  davinci: remove definition of SRAM_VIRT

Nori, Sekhar (1):
  davinci: pm: fix compiler errors and kernel panics from sram
    consolidation

Subhasish Ghosh (1):
  davinci: da850: changed SRAM allocator to shared ram.

 arch/arm/mach-davinci/da850.c               |   10 ++--------
 arch/arm/mach-davinci/dm355.c               |    6 ------
 arch/arm/mach-davinci/dm365.c               |    6 ------
 arch/arm/mach-davinci/dm644x.c              |    6 ------
 arch/arm/mach-davinci/dm646x.c              |    6 ------
 arch/arm/mach-davinci/include/mach/common.h |    2 --
 arch/arm/mach-davinci/include/mach/da8xx.h  |    1 +
 arch/arm/mach-davinci/pm.c                  |    2 +-
 arch/arm/mach-davinci/sleep.S               |    1 +
 arch/arm/mach-davinci/sram.c                |   12 ++++++++++--
 10 files changed, 15 insertions(+), 37 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/sleep.S b/arch/arm/mach-davinci/sleep.S
index fb5e72b..2cef533 100644
--- a/arch/arm/mach-davinci/sleep.S
+++ b/arch/arm/mach-davinci/sleep.S
@@ -37,6 +37,7 @@ 
 #define DEEPSLEEP_SLEEPENABLE_BIT      BIT(31)

        .text
+       .align 3
 /*
  * Move DaVinci into deep sleep state
  *