All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] davinci: ioremap SRAM instead of iotables
@ 2011-05-31 21:46 Ben Gardiner
  2011-05-31 21:46 ` [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-05-31 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

The davinci platforms are mapping their io regions using iotables. This patch
series converts them to mapping using ioremap.

This version of the series is based on-top-of '[RFC PATCH v4] Consolidate
SRAM support' from Russell King and Jean-Christophe PLAGNIOL-VILLARD.

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 (2):
  [v2] davinci: sram: ioremap the davinci_soc_info specified sram
    regions
  [v2] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry

Subhasish Ghosh (1):
  [v2] 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/sram.c                |   10 ++++++++--
 8 files changed, 11 insertions(+), 36 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions
  2011-05-31 21:46 [PATCH v2 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
@ 2011-05-31 21:46 ` Ben Gardiner
  2011-06-01  5:17   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-05-31 21:46 ` [PATCH 2/3] [v2] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
  2011-05-31 21:46 ` [PATCH 3/3] [v2] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
  2 siblings, 1 reply; 10+ messages in thread
From: Ben Gardiner @ 2011-05-31 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

The current davinci init sets up SRAM in iotables. There has been an observed
failure to boot a da850 with 128K specified in the iotable.

Make the davinci sram allocator -- now based on RMK's consolidated SRAM
support -- do an ioremap of the region specified by the entries in
davinci_soc_info before registering with pv_pool_create().

This commit breaks runtime of davinci boards since the regions that
the sram init is now trying to ioremap have been iomapped by their
iotable entries. The iotable entries will be removed in the patches
to come.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sekhar Nori <nsekhar@ti.com>

---
Changes since v1:
 * return -ENOMEM if ioremap fails (Sekhar Nori)

---
 arch/arm/mach-davinci/sram.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index 2c53db2..68b05d5 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -8,6 +8,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  */
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -25,6 +26,7 @@ EXPORT_SYMBOL_GPL(davinci_gen_pool);
  */
 static int __init sram_init(void)
 {
+	void *addr;
 	unsigned len = davinci_soc_info.sram_len;
 
 	if (!len)
@@ -36,8 +38,12 @@ static int __init sram_init(void)
 	if (!davinci_gen_pool)
 		return -ENOMEM;
 
-	WARN_ON(gen_pool_add_virt(davinci_gen_pool, SRAM_VIRT,
-				  davinci_soc_info.sram_phys, len, -1));
+	addr = ioremap(davinci_soc_info.sram_phys, len);
+	if (!addr)
+		return -ENOMEM;
+	if (WARN_ON(gen_pool_add_virt(davinci_gen_pool, addr,
+				  davinci_soc_info.sram_phys, len, -1)))
+		iounmap(addr);
 
 	return 0;
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] [v2] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry
  2011-05-31 21:46 [PATCH v2 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
  2011-05-31 21:46 ` [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
@ 2011-05-31 21:46 ` Ben Gardiner
  2011-05-31 21:46 ` [PATCH 3/3] [v2] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
  2 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-05-31 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

The sram regions defined for da850-dm646x in their iotable entries are also
defined in their davinci_soc_info's.

Remove this duplicate information which is now uneccessary since sram
init will ioremap the regions defined by their davinci_soc_info's.

Since this removal completely removes all uses of SRAM_VIRT, also remove
the SRAM_VIRT definition.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>

---
Changes since v1:
 * squashed patches 3-8 in v1 series into this patch (Sergei Shtylyov)

---
 arch/arm/mach-davinci/da850.c               |    6 ------
 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 --
 6 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 5c2bf3b..904ede9 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -725,12 +725,6 @@ static struct map_desc da850_io_desc[] = {
 		.length		= DA8XX_CP_INTC_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(DA8XX_ARM_RAM_BASE),
-		.length		= SZ_8K,
-		.type		= MT_DEVICE
-	},
 };
 
 static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 9bda687..94f44d3 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -757,12 +757,6 @@ static struct map_desc dm355_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index d306034..58f5b0a 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -970,12 +970,6 @@ static struct map_desc dm365_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 static struct resource dm365_ks_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 3949ed7..11e6481 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -663,12 +663,6 @@ static struct map_desc dm644x_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00008000),
-		.length		= SZ_16K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index a4365f7..57d697e 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -747,12 +747,6 @@ static struct map_desc dm646x_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 665d049..16b5ec5 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -86,8 +86,6 @@ extern struct davinci_soc_info davinci_soc_info;
 extern void davinci_common_init(struct davinci_soc_info *soc_info);
 extern void davinci_init_ide(void);
 
-/* standard place to map on-chip SRAMs; they *may* support DMA */
-#define SRAM_VIRT	0xfffe0000
 #define SRAM_SIZE	SZ_128K
 
 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] [v2] davinci: da850: changed SRAM allocator to shared ram.
  2011-05-31 21:46 [PATCH v2 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
  2011-05-31 21:46 ` [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
  2011-05-31 21:46 ` [PATCH 2/3] [v2] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
@ 2011-05-31 21:46 ` Ben Gardiner
  2 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-05-31 21:46 UTC (permalink / raw)
  To: linux-arm-kernel

From: Subhasish Ghosh <subhasish@mistralsolutions.com>

This patch modifies the sram allocator to allocate memory
from the DA8XX shared RAM.

Signed-off-by: Subhasish Ghosh <subhasish@mistralsolutions.com>
[rebased onto consolidated SRAM patches]
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>

---
Changes since v1:
 * re-sorted the new DA8XX_SHARED_RAM_BASE definition in  da8xx.h
   to between DA8XX_AEMIF_CTL_BASE and DA8XX_ARM_RAM_BASE (Sergei
   Shtylyov).

---
 arch/arm/mach-davinci/da850.c              |    4 ++--
 arch/arm/mach-davinci/include/mach/da8xx.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 904ede9..4781230 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1093,8 +1093,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
 	.gpio_irq		= IRQ_DA8XX_GPIO0,
 	.serial_dev		= &da8xx_serial_device,
 	.emac_pdata		= &da8xx_emac_pdata,
-	.sram_phys		= DA8XX_ARM_RAM_BASE,
-	.sram_len		= SZ_8K,
+	.sram_phys		= DA8XX_SHARED_RAM_BASE,
+	.sram_len		= SZ_128K,
 	.reset_device		= &da8xx_wdt_device,
 };
 
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index ad64da7..b67499f 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -67,6 +67,7 @@ extern unsigned int da850_max_speed;
 #define DA8XX_AEMIF_CS2_BASE	0x60000000
 #define DA8XX_AEMIF_CS3_BASE	0x62000000
 #define DA8XX_AEMIF_CTL_BASE	0x68000000
+#define DA8XX_SHARED_RAM_BASE	0x80000000
 #define DA8XX_ARM_RAM_BASE	0xffff0000
 
 void __init da830_init(void);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions
  2011-05-31 21:46 ` [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
@ 2011-06-01  5:17   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
  0 siblings, 1 reply; 10+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-06-01  5:17 UTC (permalink / raw)
  To: linux-arm-kernel

On 17:46 Tue 31 May     , Ben Gardiner wrote:
> The current davinci init sets up SRAM in iotables. There has been an observed
> failure to boot a da850 with 128K specified in the iotable.
> 
> Make the davinci sram allocator -- now based on RMK's consolidated SRAM
> support -- do an ioremap of the region specified by the entries in
> davinci_soc_info before registering with pv_pool_create().
you should update the commit message
> 
> This commit breaks runtime of davinci boards since the regions that
> the sram init is now trying to ioremap have been iomapped by their
> iotable entries. The iotable entries will be removed in the patches
> to come.
> 
> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
> CC: Sekhar Nori <nsekhar@ti.com>
> 
> ---
> Changes since v1:
>  * return -ENOMEM if ioremap fails (Sekhar Nori)
you need to put your sob

otherwise 

Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

for the whole series

Best Regards,
J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables
  2011-06-01  5:17   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-06-01 15:03     ` Ben Gardiner
  2011-06-01 15:03       ` [PATCH 1/3] [v3] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
                         ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-06-01 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

The davinci platforms are mapping their io regions using iotables. This patch
series converts them to mapping using ioremap.

This version of the series is based on-top-of '[RFC PATCH v4] Consolidate
SRAM support' from Russell King and Jean-Christophe PLAGNIOL-VILLARD. V3 has
a fix to the commit message of 1/3 as requested by Jean-Christophe PLAGNIOL-
VILLARD and also his Acks added to the series.

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 (2):
  [v3] davinci: sram: ioremap the davinci_soc_info specified sram
    regions
  [v3] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry

Subhasish Ghosh (1):
  [v3] 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/sram.c                |   10 ++++++++--
 8 files changed, 11 insertions(+), 36 deletions(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] [v3] davinci: sram: ioremap the davinci_soc_info specified sram regions
  2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
@ 2011-06-01 15:03       ` Ben Gardiner
  2011-06-01 15:03       ` [PATCH 2/3] [v3] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-06-01 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

The current davinci init sets up SRAM in iotables. There has been an observed
failure to boot a da850 with 128K specified in the iotable.

Make the davinci sram allocator -- now based on RMK's consolidated SRAM
support -- do an ioremap of the region specified by the entries in
davinci_soc_info before registering with gen_pool_add_virt().

This commit breaks runtime of davinci boards since the regions that
the sram init is now trying to ioremap have been iomapped by their
iotable entries. The iotable entries will be removed in the patches
to come.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Sekhar Nori <nsekhar@ti.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Changes since v2:
 * Added Jean-Christophe PLAGNIOL-VILLARD's Ack
Changes since v1:
 * return -ENOMEM if ioremap fails (Sekhar Nori)

---
 arch/arm/mach-davinci/sram.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index 2c53db2..68b05d5 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -8,6 +8,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  */
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -25,6 +26,7 @@ EXPORT_SYMBOL_GPL(davinci_gen_pool);
  */
 static int __init sram_init(void)
 {
+	void *addr;
 	unsigned len = davinci_soc_info.sram_len;
 
 	if (!len)
@@ -36,8 +38,12 @@ static int __init sram_init(void)
 	if (!davinci_gen_pool)
 		return -ENOMEM;
 
-	WARN_ON(gen_pool_add_virt(davinci_gen_pool, SRAM_VIRT,
-				  davinci_soc_info.sram_phys, len, -1));
+	addr = ioremap(davinci_soc_info.sram_phys, len);
+	if (!addr)
+		return -ENOMEM;
+	if(WARN_ON(gen_pool_add_virt(davinci_gen_pool, addr,
+				  davinci_soc_info.sram_phys, len, -1)))
+		iounmap(addr);
 
 	return 0;
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] [v3] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry
  2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
  2011-06-01 15:03       ` [PATCH 1/3] [v3] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
@ 2011-06-01 15:03       ` Ben Gardiner
  2011-06-01 15:03       ` [PATCH 3/3] [v3] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
  2011-06-01 16:56       ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Nori, Sekhar
  3 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-06-01 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

The sram regions defined for da850-dm646x in their iotable entries are also
defined in their davinci_soc_info's.

Remove this duplicate information which is now uneccessary since sram
init will ioremap the regions defined by their davinci_soc_info's.

Since this removal completely removes all uses of SRAM_VIRT, also remove
the SRAM_VIRT definition.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Changes since v2:
 * Added Jean-Christophe PLAGNIOL-VILLARD's Ack
Changes since v1:
 * squashed patches 3-8 in v1 series into this patch (Sergei Shtylyov)

---
 arch/arm/mach-davinci/da850.c               |    6 ------
 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 --
 6 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 5c2bf3b..904ede9 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -725,12 +725,6 @@ static struct map_desc da850_io_desc[] = {
 		.length		= DA8XX_CP_INTC_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(DA8XX_ARM_RAM_BASE),
-		.length		= SZ_8K,
-		.type		= MT_DEVICE
-	},
 };
 
 static u32 da850_psc_bases[] = { DA8XX_PSC0_BASE, DA8XX_PSC1_BASE };
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index 9bda687..94f44d3 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -757,12 +757,6 @@ static struct map_desc dm355_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index d306034..58f5b0a 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -970,12 +970,6 @@ static struct map_desc dm365_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 static struct resource dm365_ks_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 3949ed7..11e6481 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -663,12 +663,6 @@ static struct map_desc dm644x_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00008000),
-		.length		= SZ_16K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index a4365f7..57d697e 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -747,12 +747,6 @@ static struct map_desc dm646x_io_desc[] = {
 		.length		= IO_SIZE,
 		.type		= MT_DEVICE
 	},
-	{
-		.virtual	= SRAM_VIRT,
-		.pfn		= __phys_to_pfn(0x00010000),
-		.length		= SZ_32K,
-		.type		= MT_MEMORY_NONCACHED,
-	},
 };
 
 /* Contents of JTAG ID register used to identify exact cpu type */
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 665d049..16b5ec5 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -86,8 +86,6 @@ extern struct davinci_soc_info davinci_soc_info;
 extern void davinci_common_init(struct davinci_soc_info *soc_info);
 extern void davinci_init_ide(void);
 
-/* standard place to map on-chip SRAMs; they *may* support DMA */
-#define SRAM_VIRT	0xfffe0000
 #define SRAM_SIZE	SZ_128K
 
 #endif /* __ARCH_ARM_MACH_DAVINCI_COMMON_H */
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] [v3] davinci: da850: changed SRAM allocator to shared ram.
  2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
  2011-06-01 15:03       ` [PATCH 1/3] [v3] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
  2011-06-01 15:03       ` [PATCH 2/3] [v3] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
@ 2011-06-01 15:03       ` Ben Gardiner
  2011-06-01 16:56       ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Nori, Sekhar
  3 siblings, 0 replies; 10+ messages in thread
From: Ben Gardiner @ 2011-06-01 15:03 UTC (permalink / raw)
  To: linux-arm-kernel

From: Subhasish Ghosh <subhasish@mistralsolutions.com>

This patch modifies the sram allocator to allocate memory
from the DA8XX shared RAM.

Signed-off-by: Subhasish Ghosh <subhasish@mistralsolutions.com>
[rebased onto consolidated SRAM patches]
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

---
Changes since v2:
 * Added Jean-Christophe PLAGNIOL-VILLARD's Ack
Changes since v1:
 * re-sorted the new DA8XX_SHARED_RAM_BASE definition in  da8xx.h
   to between DA8XX_AEMIF_CTL_BASE and DA8XX_DDR2_CTL_BASE (Sergei
   Shtylyov).

---
 arch/arm/mach-davinci/da850.c              |    4 ++--
 arch/arm/mach-davinci/include/mach/da8xx.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
index 904ede9..4781230 100644
--- a/arch/arm/mach-davinci/da850.c
+++ b/arch/arm/mach-davinci/da850.c
@@ -1093,8 +1093,8 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
 	.gpio_irq		= IRQ_DA8XX_GPIO0,
 	.serial_dev		= &da8xx_serial_device,
 	.emac_pdata		= &da8xx_emac_pdata,
-	.sram_phys		= DA8XX_ARM_RAM_BASE,
-	.sram_len		= SZ_8K,
+	.sram_phys		= DA8XX_SHARED_RAM_BASE,
+	.sram_len		= SZ_128K,
 	.reset_device		= &da8xx_wdt_device,
 };
 
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index ad64da7..b67499f 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -67,6 +67,7 @@ extern unsigned int da850_max_speed;
 #define DA8XX_AEMIF_CS2_BASE	0x60000000
 #define DA8XX_AEMIF_CS3_BASE	0x62000000
 #define DA8XX_AEMIF_CTL_BASE	0x68000000
+#define DA8XX_SHARED_RAM_BASE	0x80000000
 #define DA8XX_ARM_RAM_BASE	0xffff0000
 
 void __init da830_init(void);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables
  2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
                         ` (2 preceding siblings ...)
  2011-06-01 15:03       ` [PATCH 3/3] [v3] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
@ 2011-06-01 16:56       ` Nori, Sekhar
  3 siblings, 0 replies; 10+ messages in thread
From: Nori, Sekhar @ 2011-06-01 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ben,

No need to send out a new revision just to add an ack.
The maintainer would take care of collecting the acks
when committing the patch.

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-01 16:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 21:46 [PATCH v2 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
2011-05-31 21:46 ` [PATCH 1/3] [v2] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
2011-06-01  5:17   ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-01 15:03     ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Ben Gardiner
2011-06-01 15:03       ` [PATCH 1/3] [v3] davinci: sram: ioremap the davinci_soc_info specified sram regions Ben Gardiner
2011-06-01 15:03       ` [PATCH 2/3] [v3] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
2011-06-01 15:03       ` [PATCH 3/3] [v3] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner
2011-06-01 16:56       ` [PATCH v3 0/3] davinci: ioremap SRAM instead of iotables Nori, Sekhar
2011-05-31 21:46 ` [PATCH 2/3] [v2] davinci: da850-dm646x: remove the SRAM_VIRT iotable entry Ben Gardiner
2011-05-31 21:46 ` [PATCH 3/3] [v2] davinci: da850: changed SRAM allocator to shared ram Ben Gardiner

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.