All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Yanovich <ynvich@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: pxa: PXA270 D-Cache as ram
Date: Tue, 21 May 2013 02:06:26 +0400	[thread overview]
Message-ID: <1369087586-1344-1-git-send-email-ynvich@gmail.com> (raw)

2.2.5.2 of Marvell PXA27x Processor Family Developers Manual says:
"The PXA27x processor cache configuration is identical to that of
the PXA255 processor."

As a result, it is perfectly legitimate to use PXA25X
'lock_cache_for_stack' on PXA27X as well.

Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
---
 arch/arm/cpu/pxa/start.S |   10 ++++++++--
 include/configs/lp8x4x.h |    5 +++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index ada91a6..5ea512e 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -40,6 +40,12 @@
 #include <version.h>
 
 #ifdef CONFIG_CPU_PXA25X
+#ifndef CONFIG_PXA2XX_CACHE_AS_RAM
+#define CONFIG_PXA2XX_CACHE_AS_RAM
+#endif
+#endif
+
+#ifdef CONFIG_PXA2XX_CACHE_AS_RAM
 #if ((CONFIG_SYS_INIT_SP_ADDR) != 0xfffff800)
 #error "Init SP address must be set to 0xfffff800 for PXA250"
 #endif
@@ -164,7 +170,7 @@ reset:
 	bl  cpu_init_crit
 #endif
 
-#ifdef	CONFIG_CPU_PXA25X
+#ifdef	CONFIG_PXA2XX_CACHE_AS_RAM
 	bl	lock_cache_for_stack
 #endif
 
@@ -482,7 +488,7 @@ fiq:
  * This is useful on PXA25x and PXA26x in early bootstages, where there is no
  * other possible memory available to hold stack.
  */
-#ifdef CONFIG_CPU_PXA25X
+#ifdef CONFIG_PXA2XX_CACHE_AS_RAM
 .macro CPWAIT reg
 	mrc	p15, 0, \reg, c2, c0, 0
 	mov	\reg, \reg
diff --git a/include/configs/lp8x4x.h b/include/configs/lp8x4x.h
index 026f321..27ff2f4 100644
--- a/include/configs/lp8x4x.h
+++ b/include/configs/lp8x4x.h
@@ -149,8 +149,9 @@
 
 #define	CONFIG_SYS_LOAD_ADDR		0xa0008000
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
-/* Use first 64kb bank of the internal SRAM */
-#define	CONFIG_SYS_INIT_SP_ADDR		0x5c010000
+/* Use CPU data cache as internal RAM */
+#define CONFIG_PXA2XX_CACHE_AS_RAM
+#define	CONFIG_SYS_INIT_SP_ADDR		0xfffff800
 
 /*
  * NOR FLASH
-- 
1.7.10.4

             reply	other threads:[~2013-05-20 22:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 22:06 Sergey Yanovich [this message]
2013-05-21 10:39 ` [U-Boot] [PATCH] arm: pxa: PXA270 D-Cache as ram Marek Vasut
2013-05-21 10:42   ` Sergey Yanovich
2013-05-21 10:54     ` Marek Vasut
2013-05-21 11:23       ` Sergey Yanovich
2013-05-21 11:38         ` Marek Vasut
2013-05-21 11:56           ` Sergey Yanovich
2013-05-21 15:00             ` Marek Vasut
2013-05-21 16:31               ` Sergey Yanovich
2013-05-21 19:02                 ` Marek Vasut
2013-05-21 19:18                   ` Sergey Yanovich
2013-05-21 19:24                     ` Marek Vasut
2013-05-21 19:42                       ` Sergey Yanovich
2013-05-21 20:07                         ` Marek Vasut
2013-05-21 20:24                           ` Sergey Yanovich
2013-05-21 21:38                             ` Marek Vasut
2013-05-22 13:02                               ` Sergey Yanovich
2013-05-22 13:04                                 ` Marek Vasut
2013-05-22 13:21                                   ` Sergey Yanovich
2013-05-22 13:54                                     ` Marek Vasut
2013-05-23 17:43                               ` Mike Dunn

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=1369087586-1344-1-git-send-email-ynvich@gmail.com \
    --to=ynvich@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.