All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nori, Sekhar" <nsekhar@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"Hilman, Kevin" <khilman@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	Paul Mundt <lethal@linux-sh.org>,
	Magnus Damm <magnus.damm@gmail.com>
Cc: "davinci-linux-open-source@linux.davincidsp.com"
	<davinci-linux-open-source@linux.davincidsp.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [RFC PATCH v2] Consolidate SRAM support
Date: Mon, 18 Apr 2011 21:42:10 +0530	[thread overview]
Message-ID: <B85A65D85D7EB246BE421B3FB0FBB593024CA31B27@dbde02.ent.ti.com> (raw)
In-Reply-To: <20110418085259.GA26044@n2100.arm.linux.org.uk>

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.

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

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


WARNING: multiple messages have this Message-ID (diff)
From: nsekhar@ti.com (Nori, Sekhar)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2] Consolidate SRAM support
Date: Mon, 18 Apr 2011 21:42:10 +0530	[thread overview]
Message-ID: <B85A65D85D7EB246BE421B3FB0FBB593024CA31B27@dbde02.ent.ti.com> (raw)
In-Reply-To: <20110418085259.GA26044@n2100.arm.linux.org.uk>

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.

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

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

  parent reply	other threads:[~2011-04-18 16:12 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 13:06 [RFC PATCH] Consolidate SRAM support Russell King - ARM Linux
2011-04-15 13:06 ` Russell King - ARM Linux
2011-04-15 13:39 ` Rob Herring
2011-04-15 13:39   ` Rob Herring
2011-04-15 14:02   ` Ithamar R. Adema
2011-04-15 14:02     ` Ithamar R. Adema
2011-04-15 14:40   ` Arnd Bergmann
2011-04-15 14:40     ` Arnd Bergmann
2011-04-15 15:26     ` Russell King - ARM Linux
2011-04-15 15:26       ` Russell King - ARM Linux
2011-04-15 15:32       ` Grant Likely
2011-04-15 15:32         ` Grant Likely
2011-04-15 15:41         ` Russell King - ARM Linux
2011-04-15 15:41           ` Russell King - ARM Linux
2011-04-16  4:11           ` Magnus Damm
2011-04-16  4:11             ` Magnus Damm
2011-04-17 17:47           ` Arnd Bergmann
2011-04-17 17:47             ` Arnd Bergmann
2011-04-15 16:03   ` Russell King - ARM Linux
2011-04-15 16:03     ` Russell King - ARM Linux
2011-04-15 16:18     ` Nguyen Dinh-R00091
2011-04-15 16:18       ` Nguyen Dinh-R00091
2011-04-15 16:20       ` Russell King - ARM Linux
2011-04-15 16:20         ` Russell King - ARM Linux
2011-04-15 16:58         ` Russell King - ARM Linux
2011-04-15 16:58           ` Russell King - ARM Linux
2011-04-15 19:20           ` Nguyen Dinh-R00091
2011-04-15 19:20             ` Nguyen Dinh-R00091
2011-04-15 19:40             ` Russell King - ARM Linux
2011-04-15 19:40               ` Russell King - ARM Linux
2011-04-15 20:06               ` Nguyen Dinh-R00091
2011-04-15 20:06                 ` Nguyen Dinh-R00091
2011-04-15 13:52 ` Eduardo Valentin
2011-04-15 13:52   ` Eduardo Valentin
2011-04-15 15:24   ` Russell King - ARM Linux
2011-04-15 15:24     ` Russell King - ARM Linux
2011-04-15 14:50 ` Detlef Vollmann
2011-04-15 14:50   ` Detlef Vollmann
2011-04-15 15:37   ` Russell King - ARM Linux
2011-04-15 15:37     ` Russell King - ARM Linux
2011-04-15 18:12     ` Detlef Vollmann
2011-04-15 18:12       ` Detlef Vollmann
2011-04-15 18:21       ` Russell King - ARM Linux
2011-04-15 18:21         ` Russell King - ARM Linux
2011-04-15 16:04   ` Nicolas Ferre
2011-04-15 16:04     ` Nicolas Ferre
2011-04-15 18:14     ` Detlef Vollmann
2011-04-15 18:14       ` Detlef Vollmann
2011-04-16 11:27       ` Detlef Vollmann
2011-04-16 11:27         ` Detlef Vollmann
2011-04-15 18:31 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 18:31   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 18:38   ` [PATCH 1/2] at91: 9260 and 9g20 add support of join SRAM Memory Mapping Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 18:39   ` [PATCH 2/2] at91: add generic allocator support for sram Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 20:11 ` [RFC PATCH] Consolidate SRAM support Uwe Kleine-König
2011-04-15 20:11   ` Uwe Kleine-König
2011-04-15 20:19   ` Russell King - ARM Linux
2011-04-15 20:19     ` Russell King - ARM Linux
2011-04-15 20:22     ` Uwe Kleine-König
2011-04-15 20:22       ` Uwe Kleine-König
2011-04-16 13:01 ` Haojian Zhuang
2011-04-16 13:01   ` Haojian Zhuang
2011-04-16 13:09   ` Russell King - ARM Linux
2011-04-16 13:09     ` Russell King - ARM Linux
2011-04-18  6:48     ` Tony Lindgren
2011-04-18  6:48       ` Tony Lindgren
2011-04-18  7:00       ` Tomi Valkeinen
2011-04-18  7:00         ` Tomi Valkeinen
2011-04-18  8:17         ` Tony Lindgren
2011-04-18  8:17           ` Tony Lindgren
2011-04-19 14:16           ` Tomi Valkeinen
2011-04-19 14:16             ` Tomi Valkeinen
2011-04-20  5:27             ` Tony Lindgren
2011-04-20  5:27               ` Tony Lindgren
2011-04-18  8:52 ` [RFC PATCH v2] " Russell King - ARM Linux
2011-04-18  8:52   ` Russell King - ARM Linux
2011-04-18  9:31   ` Haojian Zhuang
2011-04-18  9:31     ` Haojian Zhuang
2011-04-18 11:33   ` Tony Lindgren
2011-04-18 11:33     ` Tony Lindgren
2011-04-18 13:50   ` Detlef Vollmann
2011-04-18 13:50     ` Detlef Vollmann
2011-04-18 16:12   ` Nori, Sekhar [this message]
2011-04-18 16:12     ` Nori, Sekhar
2011-04-18 16:18     ` Russell King - ARM Linux
2011-04-18 16:18       ` Russell King - ARM Linux
2011-04-19 16:01   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 16:01     ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 16:18     ` Russell King - ARM Linux
2011-04-19 16:18       ` Russell King - ARM Linux
2011-04-19 19:05       ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 19:05         ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 23:20         ` Russell King - ARM Linux
2011-04-19 23:20           ` Russell King - ARM Linux
2011-04-20  4:06           ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-20  4:06             ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19  1:23 ` [RFC PATCH] " Linus Walleij
2011-04-19  1:23   ` Linus Walleij
2011-05-12 17:45 ` [RFC PATCH v3] " Russell King - ARM Linux
2011-05-12 17:45   ` Russell King - ARM Linux
2011-05-12 18:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-12 18:35     ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13  7:30   ` Jean Pihet
2011-05-13  7:30     ` Jean Pihet
2011-05-13  9:11     ` Russell King - ARM Linux
2011-05-13  9:11       ` Russell King - ARM Linux
2011-05-13  9:25       ` Jean Pihet
2011-05-13  9:25         ` Jean Pihet
2011-05-13  9:19   ` Santosh Shilimkar
2011-05-13  9:19     ` Santosh Shilimkar
2011-05-17 13:06   ` Nori, Sekhar
2011-05-17 13:06     ` Nori, Sekhar
2011-05-17 21:41     ` [PATCH 0/9] Ben Gardiner
2011-05-17 21:41       ` [PATCH 1/9] davinci: pm: fix compiler errors and kernel panics from sram consolidation Ben Gardiner
2011-05-17 21:41       ` [PATCH 2/9] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
2011-05-18  4:51         ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-18 12:11           ` Nori, Sekhar
2011-05-18 12:14             ` Russell King - ARM Linux
2011-05-18 15:58               ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-25 23:16                 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-18 13:18         ` Nori, Sekhar
2011-05-18 13:36           ` Ben Gardiner
2011-05-17 21:41       ` [PATCH 3/9] davinci: da850: remove the SRAM_VIRT iotable entry Ben Gardiner
2011-05-17 21:42       ` [PATCH 4/9] davinci: dm355: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 5/9] davinci: dm365: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 6/9] davinci: dm644x: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 7/9] davinci: dm646x: " Ben Gardiner
2011-05-17 21:42       ` [PATCH 8/9] davinci: remove definition of SRAM_VIRT Ben Gardiner
2011-05-18 10:40         ` Sergei Shtylyov
2011-05-17 21:42       ` [PATCH 9/9] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
2011-05-18 10:29         ` Sergei Shtylyov
2011-05-18 12:33           ` Ben Gardiner
2011-05-26  1:02   ` [RFC PATCH v4] Consolidate SRAM support Jean-Christophe PLAGNIOL-VILLARD
2011-05-26  1:02     ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]     ` <1306371777-20431-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
2011-05-31 17:09       ` Nori, Sekhar
2011-05-31 17:09         ` Nori, Sekhar
2011-05-31 21:21         ` Russell King - ARM Linux
2011-05-31 21:21           ` Russell King - ARM Linux
2011-06-29 13:12     ` Nori, Sekhar
2011-06-29 13:12       ` Nori, Sekhar
2011-07-08 16:51     ` Nori, Sekhar
2011-07-08 16:51       ` Nori, Sekhar
2011-07-08 16:58       ` Nori, Sekhar
2011-07-08 16:58         ` Nori, Sekhar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B85A65D85D7EB246BE421B3FB0FBB593024CA31B27@dbde02.ent.ti.com \
    --to=nsekhar@ti.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=khilman@ti.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.