Patchwork [U-Boot,V11,08/13] Add cache functions to SPL for armv7

login
register
mail settings
Submitter Stefano Babic
Date Dec. 16, 2011, 3:37 p.m.
Message ID <1324049833-18143-9-git-send-email-sbabic@denx.de>
Download mbox | patch
Permalink /patch/131852/
State RFC
Delegated to: Tom Rini
Headers show

Comments

Stefano Babic - Dec. 16, 2011, 3:37 p.m.
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
---
 arch/arm/cpu/armv7/Makefile |    4 ++--
 arch/arm/cpu/armv7/cpu.c    |    2 ++
 arch/arm/lib/Makefile       |    5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)
Tom Rini - Dec. 16, 2011, 3:46 p.m.
On Fri, Dec 16, 2011 at 8:37 AM, Stefano Babic <sbabic@denx.de> wrote:
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> CC: Tom Rini <tom.rini@gmail.com>
> CC: Wolfgang Denk <wd@denx.de>
> CC: Simon Schwarz <simonschwarzcor@gmail.com>

As I said in my reply to the intro email..

> -ifndef CONFIG_SPL_BUILD
> +#ifndef CONFIG_SPL_BUILD

Is why I assume this is an RFC :)

This patch is fine, assuming omap4/5 are still within size limits.

Patch

diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index f97fa3d..69f1910 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -27,9 +27,9 @@  LIB	= $(obj)lib$(CPU).o
 
 START	:= start.o
 
-ifndef CONFIG_SPL_BUILD
+#ifndef CONFIG_SPL_BUILD
 COBJS	+= cache_v7.o
-endif
+#endif
 
 COBJS	+= cpu.o
 COBJS	+= syslib.o
diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
index 662c496..c6fa8ef 100644
--- a/arch/arm/cpu/armv7/cpu.c
+++ b/arch/arm/cpu/armv7/cpu.c
@@ -52,7 +52,9 @@  int cleanup_before_linux(void)
 	 *
 	 * we turn off caches etc ...
 	 */
+#ifndef CONFIG_SPL_BUILD
 	disable_interrupts();
+#endif
 
 	/*
 	 * Turn off I-cache and invalidate it
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 300c8fa..39a9550 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -39,8 +39,6 @@  GLCOBJS	+= div0.o
 
 COBJS-y	+= board.o
 COBJS-y	+= bootm.o
-COBJS-y	+= cache.o
-COBJS-y	+= cache-cp15.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 COBJS-y	+= interrupts.o
 COBJS-y	+= reset.o
@@ -48,6 +46,9 @@  SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 endif
 
+COBJS-y	+= cache.o
+COBJS-y	+= cache-cp15.o
+
 SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
 	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))