smdkv310: use spl framework for mmc spl
smdkv310 board was using mmc_spl framework for mmc spl support.
This patch migrates the framework from mmc_spl to spl.
Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
diff --git a/board/samsung/smdkv310/Makefile b/board/samsung/smdkv310/Makefile
index d168abd..56e0c16 100644
--- a/board/samsung/smdkv310/Makefile
+++ b/board/samsung/smdkv310/Makefile
@@ -26,16 +26,33 @@
SOBJS := mem_setup.o
SOBJS += lowlevel_init.o
+ifndef CONFIG_SPL_BUILD
COBJS += smdkv310.o
+endif
+
+ifdef CONFIG_SPL_BUILD
+COBJS += mmc_boot.o
+endif
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
-all: $(obj).depend $(LIB)
+ALL := $(obj).depend $(LIB)
+
+ifdef CONFIG_SPL_BUILD
+ALL += $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
+all: $(ALL)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+ifdef CONFIG_SPL_BUILD
+$(OBJTREE)/tools/mk$(BOARD)spl: tools/mkv310_image.c
+ $(HOSTCC) tools/mkv310_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
#########################################################################
# defines $(obj).depend target