]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - spl/Makefile
mx53loco: Remove unneeded gpio_set_value()
[karo-tx-uboot.git] / spl / Makefile
index 6ac42a2d6752ce85a21a5814d1ad6eb00b4ab415..ea7d4750fbebc5b91fa853d3e2043f7013c3adff 100644 (file)
@@ -58,13 +58,7 @@ LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/libonenand.o
 LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/libdma.o
 LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o
 
-ifeq ($(SOC),omap3)
-LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
-endif
-ifeq ($(SOC),omap4)
-LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
-endif
-ifeq ($(SOC),omap5)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
@@ -86,6 +80,9 @@ endif
 ifeq ($(wildcard $(LDSCRIPT)),)
        LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds
 endif
+ifeq ($(wildcard $(LDSCRIPT)),)
+       LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds
+endif
 ifeq ($(wildcard $(LDSCRIPT)),)
 $(error could not find linker script)
 endif
@@ -96,6 +93,7 @@ endif
 LDPPFLAGS += \
        -include $(TOPDIR)/include/u-boot/u-boot.lds.h \
        -include $(OBJTREE)/include/config.h \
+       -DCPUDIR=$(CPUDIR) \
        $(shell $(LD) --version | \
          sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
 
@@ -104,6 +102,11 @@ $(OBJTREE)/MLO:    $(obj)u-boot-spl.bin
        $(OBJTREE)/tools/mkimage -T omapimage \
                -a $(CONFIG_SPL_TEXT_BASE) -d $< $@
 endif
+ifdef CONFIG_AM33XX
+$(OBJTREE)/MLO:        $(obj)u-boot-spl.bin
+       $(OBJTREE)/tools/mkimage -T omapimage \
+               -a $(CONFIG_SPL_TEXT_BASE) -d $< $@
+endif
 
 ALL-y  += $(obj)u-boot-spl.bin