]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
omap4: make omap4 code common for future reuse
authorSricharan <r.sricharan@ti.com>
Tue, 15 Nov 2011 14:49:50 +0000 (09:49 -0500)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 15 Nov 2011 21:25:50 +0000 (22:25 +0100)
Much of omap4 soc support code can be reused for omap5.
Move them to the omap-common directory to facilitate
this.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
arch/arm/cpu/armv7/omap-common/Makefile
arch/arm/cpu/armv7/omap-common/clocks-common.c [moved from arch/arm/cpu/armv7/omap4/clocks.c with 100% similarity]
arch/arm/cpu/armv7/omap-common/emif-common.c [moved from arch/arm/cpu/armv7/omap4/emif.c with 99% similarity]
arch/arm/cpu/armv7/omap-common/hwinit-common.c [moved from arch/arm/cpu/armv7/omap4/board.c with 99% similarity]
arch/arm/cpu/armv7/omap-common/lowlevel_init.S [moved from arch/arm/cpu/armv7/omap4/lowlevel_init.S with 100% similarity]
arch/arm/cpu/armv7/omap-common/mem-common.c [moved from arch/arm/cpu/armv7/omap4/mem.c with 100% similarity]
arch/arm/cpu/armv7/omap4/Makefile

index 1dee81f22ae02ef315420900bc96aa126a72205a..ea2545dca8f530dffa9ce2842015be3b6bb91598 100644 (file)
@@ -33,6 +33,13 @@ ifdef CONFIG_OMAP
 COBJS  += gpio.o
 endif
 
+ifdef CONFIG_OMAP44XX
+COBJS  += hwinit-common.o
+COBJS  += clocks-common.o
+COBJS  += emif-common.o
+SOBJS  += lowlevel_init.o
+endif
+
 ifdef CONFIG_SPL_BUILD
 COBJS  += spl.o
 ifdef CONFIG_SPL_NAND_SUPPORT
@@ -43,6 +50,12 @@ COBJS        += spl_mmc.o
 endif
 endif
 
+ifndef CONFIG_SPL_BUILD
+ifdef CONFIG_OMAP44XX
+COBJS  += mem-common.o
+endif
+endif
+
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
 
similarity index 99%
rename from arch/arm/cpu/armv7/omap4/emif.c
rename to arch/arm/cpu/armv7/omap-common/emif-common.c
index 988b2050fa833f8cf6cb9cc59aeeff7acf8bea8b..94c8bed24ea1d7ba1746dbb4ed2811a099b57bbf 100644 (file)
@@ -1218,9 +1218,9 @@ void sdram_init(void)
        in_sdram = running_from_sdram();
        debug("in_sdram = %d\n", in_sdram);
 
-       if (!in_sdram) {
+       if (!in_sdram)
                bypass_dpll(&prcm->cm_clkmode_dpll_core);
-       }
+
 
        do_sdram_init(OMAP44XX_EMIF1);
        do_sdram_init(OMAP44XX_EMIF2);
similarity index 99%
rename from arch/arm/cpu/armv7/omap4/board.c
rename to arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 2497e3e729374dd1cda847b5488f88328836b936..8e765cfe7f2b2a9f9854f5dd6a6dfaeece294fad 100644 (file)
@@ -34,7 +34,7 @@
 #include <asm/sizes.h>
 #include <asm/arch/emif.h>
 #include <asm/arch/gpio.h>
-#include "omap4_mux_data.h"
+#include "../omap4/omap4_mux_data.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
index e7ee0b8c0ab838d2c21843376359a492d0bd714c..d91272958f1379b57109308f1618d7c6d1f0a5e5 100644 (file)
@@ -25,15 +25,9 @@ include $(TOPDIR)/config.mk
 
 LIB    =  $(obj)lib$(SOC).o
 
-SOBJS  += lowlevel_init.o
-
-COBJS  += board.o
-COBJS  += clocks.o
-COBJS  += emif.o
 COBJS  += sdram_elpida.o
 
 ifndef CONFIG_SPL_BUILD
-COBJS  += mem.o
 COBJS  += sys_info.o
 endif