浏览代码

Add cache functions to SPL for armv7

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>
Stefano Babic 13 年之前
父节点
当前提交
d460587a44
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 0 2
      arch/arm/cpu/armv7/Makefile
  2. 2 0
      arch/arm/cpu/armv7/cpu.c
  3. 3 2
      arch/arm/lib/Makefile

+ 0 - 2
arch/arm/cpu/armv7/Makefile

@@ -27,9 +27,7 @@ LIB	= $(obj)lib$(CPU).o
 
 
 START	:= start.o
 START	:= start.o
 
 
-ifndef CONFIG_SPL_BUILD
 COBJS	+= cache_v7.o
 COBJS	+= cache_v7.o
-endif
 
 
 COBJS	+= cpu.o
 COBJS	+= cpu.o
 COBJS	+= syslib.o
 COBJS	+= syslib.o

+ 2 - 0
arch/arm/cpu/armv7/cpu.c

@@ -52,7 +52,9 @@ int cleanup_before_linux(void)
 	 *
 	 *
 	 * we turn off caches etc ...
 	 * we turn off caches etc ...
 	 */
 	 */
+#ifndef CONFIG_SPL_BUILD
 	disable_interrupts();
 	disable_interrupts();
+#endif
 
 
 	/*
 	/*
 	 * Turn off I-cache and invalidate it
 	 * Turn off I-cache and invalidate it

+ 3 - 2
arch/arm/lib/Makefile

@@ -39,8 +39,6 @@ GLCOBJS	+= div0.o
 
 
 COBJS-y	+= board.o
 COBJS-y	+= board.o
 COBJS-y	+= bootm.o
 COBJS-y	+= bootm.o
-COBJS-y	+= cache.o
-COBJS-y	+= cache-cp15.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 COBJS-y	+= interrupts.o
 COBJS-y	+= interrupts.o
 COBJS-y	+= reset.o
 COBJS-y	+= reset.o
@@ -48,6 +46,9 @@ SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 endif
 endif
 
 
+COBJS-y	+= cache.o
+COBJS-y	+= cache-cp15.o
+
 SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
 SRCS	:= $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
 	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 	   $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))