ORIGEN: Add MMC SPL support

Adds mmc boot support.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
diff --git a/board/samsung/origen/Makefile b/board/samsung/origen/Makefile
index 65eff91..f5c6507 100644
--- a/board/samsung/origen/Makefile
+++ b/board/samsung/origen/Makefile
@@ -26,16 +26,34 @@
 
 SOBJS	:= mem_setup.o
 SOBJS	+= lowlevel_init.o
+
+ifndef CONFIG_SPL_BUILD
 COBJS	+= origen.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	+= tools/mk$(BOARD)spl.exe
+endif
+
+all:	$(ALL)
 
 $(LIB):	$(OBJS)
 	$(AR) $(ARFLAGS) $@ $(OBJS)
 
+ifdef CONFIG_SPL_BUILD
+tools/mk$(BOARD)spl.exe:	tools/mkv310_image.c
+	$(HOSTCC) tools/mkv310_image.c -o tools/mk$(BOARD)spl.exe
+endif
+
 #########################################################################
 
 # defines $(obj).depend target