All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leoy@marvell.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	Russell King <linux@arm.linux.org.uk>,
	Haojian Zhuang <hzhuang1@marvell.com>
Cc: Leo Yan <leoy@marvell.com>
Subject: [PATCH 3/3] ARM: mmp: register internal sram bank
Date: Mon, 15 Aug 2011 11:09:54 +0800	[thread overview]
Message-ID: <1313377794-26721-4-git-send-email-leoy@marvell.com> (raw)
In-Reply-To: <1313377794-26721-1-git-send-email-leoy@marvell.com>

MMP2 have the internal sram, this sram can be allocated
for video, power management and secure processor.

Now the sram usage is:
0xd1000000 ~ 0xd101ffff (128KB) : reserved for secure processor
0xd1020000 ~ 0xd1037fff (96KB)  : for video and PM

Register the internal sram's second half 96KB buffer,
so that video and PM can dynamically alloc/free from it.

Signed-off-by: Leo Yan <leoy@marvell.com>
---
 arch/arm/mach-mmp/brownstone.c        |    6 ++++++
 arch/arm/mach-mmp/include/mach/mmp2.h |    6 ++++++
 arch/arm/mach-mmp/mmp2.c              |    2 ++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index db4b5fd..59dcf9d 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -191,6 +191,11 @@ static struct sram_platdata mmp2_asram_platdata = {
 	.granularity	= SRAM_GRANULARITY,
 };
 
+static struct sram_platdata mmp2_isram_platdata = {
+	.pool_name	= "isram",
+	.granularity	= SRAM_GRANULARITY,
+};
+
 static void __init brownstone_init(void)
 {
 	mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
@@ -202,6 +207,7 @@ static void __init brownstone_init(void)
 	mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
 	mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */
 	mmp2_add_asram(&mmp2_asram_platdata);
+	mmp2_add_isram(&mmp2_isram_platdata);
 
 	/* enable 5v regulator */
 	platform_device_register(&brownstone_v_5vp_device);
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
index c227328..2f7b2d3 100644
--- a/arch/arm/mach-mmp/include/mach/mmp2.h
+++ b/arch/arm/mach-mmp/include/mach/mmp2.h
@@ -30,6 +30,7 @@ extern struct pxa_device_desc mmp2_device_sdh1;
 extern struct pxa_device_desc mmp2_device_sdh2;
 extern struct pxa_device_desc mmp2_device_sdh3;
 extern struct pxa_device_desc mmp2_device_asram;
+extern struct pxa_device_desc mmp2_device_isram;
 
 static inline int mmp2_add_uart(int id)
 {
@@ -92,5 +93,10 @@ static inline int mmp2_add_asram(struct sram_platdata *data)
 	return pxa_register_device(&mmp2_device_asram, data, sizeof(*data));
 }
 
+static inline int mmp2_add_isram(struct sram_platdata *data)
+{
+	return pxa_register_device(&mmp2_device_isram, data, sizeof(*data));
+}
+
 #endif /* __ASM_MACH_MMP2_H */
 
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 9d00754..43266c4 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -227,4 +227,6 @@ MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120);
 MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120);
 MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120);
 MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000);
+/* 0xd1000000 ~ 0xd101ffff is reserved for secure processor */
+MMP2_DEVICE(isram, "isram", -1, NONE, 0xd1020000, 0x18000);
 
-- 
1.7.4.1


WARNING: multiple messages have this Message-ID (diff)
From: leoy@marvell.com (Leo Yan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: mmp: register internal sram bank
Date: Mon, 15 Aug 2011 11:09:54 +0800	[thread overview]
Message-ID: <1313377794-26721-4-git-send-email-leoy@marvell.com> (raw)
In-Reply-To: <1313377794-26721-1-git-send-email-leoy@marvell.com>

MMP2 have the internal sram, this sram can be allocated
for video, power management and secure processor.

Now the sram usage is:
0xd1000000 ~ 0xd101ffff (128KB) : reserved for secure processor
0xd1020000 ~ 0xd1037fff (96KB)  : for video and PM

Register the internal sram's second half 96KB buffer,
so that video and PM can dynamically alloc/free from it.

Signed-off-by: Leo Yan <leoy@marvell.com>
---
 arch/arm/mach-mmp/brownstone.c        |    6 ++++++
 arch/arm/mach-mmp/include/mach/mmp2.h |    6 ++++++
 arch/arm/mach-mmp/mmp2.c              |    2 ++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index db4b5fd..59dcf9d 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -191,6 +191,11 @@ static struct sram_platdata mmp2_asram_platdata = {
 	.granularity	= SRAM_GRANULARITY,
 };
 
+static struct sram_platdata mmp2_isram_platdata = {
+	.pool_name	= "isram",
+	.granularity	= SRAM_GRANULARITY,
+};
+
 static void __init brownstone_init(void)
 {
 	mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
@@ -202,6 +207,7 @@ static void __init brownstone_init(void)
 	mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
 	mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */
 	mmp2_add_asram(&mmp2_asram_platdata);
+	mmp2_add_isram(&mmp2_isram_platdata);
 
 	/* enable 5v regulator */
 	platform_device_register(&brownstone_v_5vp_device);
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
index c227328..2f7b2d3 100644
--- a/arch/arm/mach-mmp/include/mach/mmp2.h
+++ b/arch/arm/mach-mmp/include/mach/mmp2.h
@@ -30,6 +30,7 @@ extern struct pxa_device_desc mmp2_device_sdh1;
 extern struct pxa_device_desc mmp2_device_sdh2;
 extern struct pxa_device_desc mmp2_device_sdh3;
 extern struct pxa_device_desc mmp2_device_asram;
+extern struct pxa_device_desc mmp2_device_isram;
 
 static inline int mmp2_add_uart(int id)
 {
@@ -92,5 +93,10 @@ static inline int mmp2_add_asram(struct sram_platdata *data)
 	return pxa_register_device(&mmp2_device_asram, data, sizeof(*data));
 }
 
+static inline int mmp2_add_isram(struct sram_platdata *data)
+{
+	return pxa_register_device(&mmp2_device_isram, data, sizeof(*data));
+}
+
 #endif /* __ASM_MACH_MMP2_H */
 
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 9d00754..43266c4 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -227,4 +227,6 @@ MMP2_DEVICE(sdh1, "sdhci-pxav3", 1, MMC2, 0xd4280800, 0x120);
 MMP2_DEVICE(sdh2, "sdhci-pxav3", 2, MMC3, 0xd4281000, 0x120);
 MMP2_DEVICE(sdh3, "sdhci-pxav3", 3, MMC4, 0xd4281800, 0x120);
 MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000);
+/* 0xd1000000 ~ 0xd101ffff is reserved for secure processor */
+MMP2_DEVICE(isram, "isram", -1, NONE, 0xd1020000, 0x18000);
 
-- 
1.7.4.1

  parent reply	other threads:[~2011-08-15  3:07 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15  3:09 [PATCH V4 0/3] ARM: mmp: add audio sram support Leo Yan
2011-08-15  3:09 ` Leo Yan
2011-08-15  3:09 ` [PATCH 1/3] ARM: mmp: add sram allocator Leo Yan
2011-08-15  3:09   ` Leo Yan
2011-08-15  8:59   ` Arnd Bergmann
2011-08-15  8:59     ` Arnd Bergmann
2011-08-15  9:09     ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15  9:09       ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15  9:30       ` Haojian Zhuang
2011-08-15  9:30         ` Haojian Zhuang
2011-10-07 19:06         ` Tony Lindgren
2011-10-07 19:06           ` Tony Lindgren
2011-08-15  9:26     ` Leo Yan
2011-08-15  9:26       ` Leo Yan
2011-08-15 13:23     ` Nicolas Pitre
2011-08-15 13:23       ` Nicolas Pitre
2011-08-15 13:32       ` Russell King - ARM Linux
2011-08-15 13:32         ` Russell King - ARM Linux
2011-08-15  9:11   ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15  9:11     ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-22 23:47   ` [PATCH] ARM: mmp: map sram as MT_MEMORY rather than MT_DEVICE Andres Salomon
2011-08-22 23:47     ` Andres Salomon
2011-08-23  0:07     ` Eric Miao
2011-08-23  0:07       ` Eric Miao
2011-08-23  2:08       ` Andres Salomon
2011-08-23  2:08         ` Andres Salomon
2011-08-23  7:48         ` Leo Yan
2011-08-23  7:48           ` Leo Yan
2011-08-23  8:22           ` Haojian Zhuang
2011-08-23  8:22             ` Haojian Zhuang
2011-08-23  0:07     ` Russell King - ARM Linux
2011-08-23  0:07       ` Russell King - ARM Linux
2011-08-23  2:13       ` Andres Salomon
2011-08-23  2:13         ` Andres Salomon
2011-10-07 19:05         ` Tony Lindgren
2011-10-07 19:05           ` Tony Lindgren
2011-08-15  3:09 ` [PATCH 2/3] ARM: mmp: register audio sram bank Leo Yan
2011-08-15  3:09   ` Leo Yan
2011-08-15  3:09 ` Leo Yan [this message]
2011-08-15  3:09   ` [PATCH 3/3] ARM: mmp: register internal " Leo Yan
2011-08-15  3:11 ` [PATCH V4 0/3] ARM: mmp: add audio sram support Haojian Zhuang
2011-08-15  3:11   ` Haojian Zhuang
2011-08-15  8:43   ` Eric Miao
2011-08-15  8:43     ` Eric Miao
2011-08-15  9:12     ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15  9:12       ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15  9:35       ` Eric Miao
2011-08-15  9:35         ` Eric Miao
2011-08-15 10:25         ` Leo Yan
2011-08-15 10:25           ` Leo Yan
2011-08-17 12:32           ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-17 12:32             ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-19  8:25             ` Haojian Zhuang
2011-08-19  8:25               ` Haojian Zhuang

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=1313377794-26721-4-git-send-email-leoy@marvell.com \
    --to=leoy@marvell.com \
    --cc=hzhuang1@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    /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.