aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini2016-11-07 21:34:54 -0500
committerTom Rini2016-11-21 14:07:29 -0500
commit983e37007da506e8145f9b3a9e1dce5c11116fb0 (patch)
treec1d5449e1c56e17f22bb4f75b6f11336abca41a4
parent272686eb7576c02df4616bcf893fde993e7ba57e (diff)
arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
This moves what was in arch/arm/cpu/armv7/omap-common in to arch/arm/mach-omap2 and moves arch/arm/cpu/armv7/{am33xx,omap3,omap4,omap5} in to arch/arm/mach-omap2 as subdirectories. All refernces to the former locations are updated to the current locations. For the logic to decide what our outputs are, consolidate the tests into a single config.mk rather than including 4. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--arch/arm/Kconfig5
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/cpu/armv7/Makefile5
-rw-r--r--arch/arm/cpu/armv7/omap3/config.mk15
-rw-r--r--arch/arm/cpu/armv7/omap4/config.mk15
-rw-r--r--arch/arm/cpu/armv7/omap5/config.mk22
-rw-r--r--arch/arm/mach-omap2/Kconfig (renamed from arch/arm/cpu/armv7/omap-common/Kconfig)8
-rw-r--r--arch/arm/mach-omap2/Makefile (renamed from arch/arm/cpu/armv7/omap-common/Makefile)7
-rw-r--r--arch/arm/mach-omap2/abb.c (renamed from arch/arm/cpu/armv7/omap-common/abb.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/Kconfig (renamed from arch/arm/cpu/armv7/am33xx/Kconfig)0
-rw-r--r--arch/arm/mach-omap2/am33xx/Makefile (renamed from arch/arm/cpu/armv7/am33xx/Makefile)0
-rw-r--r--arch/arm/mach-omap2/am33xx/board.c (renamed from arch/arm/cpu/armv7/am33xx/board.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clk_synthesizer.c (renamed from arch/arm/cpu/armv7/am33xx/clk_synthesizer.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clock.c (renamed from arch/arm/cpu/armv7/am33xx/clock.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_am33xx.c (renamed from arch/arm/cpu/armv7/am33xx/clock_am33xx.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_am43xx.c (renamed from arch/arm/cpu/armv7/am33xx/clock_am43xx.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_ti814x.c (renamed from arch/arm/cpu/armv7/am33xx/clock_ti814x.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/clock_ti816x.c (renamed from arch/arm/cpu/armv7/am33xx/clock_ti816x.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/ddr.c (renamed from arch/arm/cpu/armv7/am33xx/ddr.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/emif4.c (renamed from arch/arm/cpu/armv7/am33xx/emif4.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/mux.c (renamed from arch/arm/cpu/armv7/am33xx/mux.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/sys_info.c (renamed from arch/arm/cpu/armv7/am33xx/sys_info.c)0
-rw-r--r--arch/arm/mach-omap2/am33xx/u-boot-spl.lds (renamed from arch/arm/cpu/armv7/am33xx/u-boot-spl.lds)0
-rw-r--r--arch/arm/mach-omap2/boot-common.c (renamed from arch/arm/cpu/armv7/omap-common/boot-common.c)0
-rw-r--r--arch/arm/mach-omap2/clocks-common.c (renamed from arch/arm/cpu/armv7/omap-common/clocks-common.c)0
-rw-r--r--arch/arm/mach-omap2/config.mk (renamed from arch/arm/cpu/armv7/am33xx/config.mk)19
-rw-r--r--arch/arm/mach-omap2/config_secure.mk (renamed from arch/arm/cpu/armv7/omap-common/config_secure.mk)0
-rw-r--r--arch/arm/mach-omap2/emif-common.c (renamed from arch/arm/cpu/armv7/omap-common/emif-common.c)0
-rw-r--r--arch/arm/mach-omap2/hwinit-common.c (renamed from arch/arm/cpu/armv7/omap-common/hwinit-common.c)0
-rw-r--r--arch/arm/mach-omap2/lowlevel_init.S (renamed from arch/arm/cpu/armv7/omap-common/lowlevel_init.S)0
-rw-r--r--arch/arm/mach-omap2/mem-common.c (renamed from arch/arm/cpu/armv7/omap-common/mem-common.c)0
-rw-r--r--arch/arm/mach-omap2/omap-cache.c (renamed from arch/arm/cpu/armv7/omap-common/omap-cache.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/Kconfig (renamed from arch/arm/cpu/armv7/omap3/Kconfig)0
-rw-r--r--arch/arm/mach-omap2/omap3/Makefile (renamed from arch/arm/cpu/armv7/omap3/Makefile)0
-rw-r--r--arch/arm/mach-omap2/omap3/am35x_musb.c (renamed from arch/arm/cpu/armv7/omap3/am35x_musb.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/board.c (renamed from arch/arm/cpu/armv7/omap3/board.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/boot.c (renamed from arch/arm/cpu/armv7/omap3/boot.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/clock.c (renamed from arch/arm/cpu/armv7/omap3/clock.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/emac.c (renamed from arch/arm/cpu/armv7/omap3/emac.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/emif4.c (renamed from arch/arm/cpu/armv7/omap3/emif4.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/lowlevel_init.S (renamed from arch/arm/cpu/armv7/omap3/lowlevel_init.S)0
-rw-r--r--arch/arm/mach-omap2/omap3/sdrc.c (renamed from arch/arm/cpu/armv7/omap3/sdrc.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/spl_id_nand.c (renamed from arch/arm/cpu/armv7/omap3/spl_id_nand.c)0
-rw-r--r--arch/arm/mach-omap2/omap3/sys_info.c (renamed from arch/arm/cpu/armv7/omap3/sys_info.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/Kconfig (renamed from arch/arm/cpu/armv7/omap4/Kconfig)0
-rw-r--r--arch/arm/mach-omap2/omap4/Makefile (renamed from arch/arm/cpu/armv7/omap4/Makefile)0
-rw-r--r--arch/arm/mach-omap2/omap4/boot.c (renamed from arch/arm/cpu/armv7/omap4/boot.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/emif.c (renamed from arch/arm/cpu/armv7/omap4/emif.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/hw_data.c (renamed from arch/arm/cpu/armv7/omap4/hw_data.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/hwinit.c (renamed from arch/arm/cpu/armv7/omap4/hwinit.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/prcm-regs.c (renamed from arch/arm/cpu/armv7/omap4/prcm-regs.c)0
-rw-r--r--arch/arm/mach-omap2/omap4/sdram_elpida.c (renamed from arch/arm/cpu/armv7/omap4/sdram_elpida.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/Kconfig (renamed from arch/arm/cpu/armv7/omap5/Kconfig)0
-rw-r--r--arch/arm/mach-omap2/omap5/Makefile (renamed from arch/arm/cpu/armv7/omap5/Makefile)0
-rw-r--r--arch/arm/mach-omap2/omap5/abb.c (renamed from arch/arm/cpu/armv7/omap5/abb.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/boot.c (renamed from arch/arm/cpu/armv7/omap5/boot.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/dra7xx_iodelay.c (renamed from arch/arm/cpu/armv7/omap5/dra7xx_iodelay.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/emif.c (renamed from arch/arm/cpu/armv7/omap5/emif.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/fdt.c (renamed from arch/arm/cpu/armv7/omap5/fdt.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/hw_data.c (renamed from arch/arm/cpu/armv7/omap5/hw_data.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/hwinit.c (renamed from arch/arm/cpu/armv7/omap5/hwinit.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/prcm-regs.c (renamed from arch/arm/cpu/armv7/omap5/prcm-regs.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/sdram.c (renamed from arch/arm/cpu/armv7/omap5/sdram.c)0
-rw-r--r--arch/arm/mach-omap2/omap5/sec-fxns.c (renamed from arch/arm/cpu/armv7/omap5/sec-fxns.c)0
-rw-r--r--arch/arm/mach-omap2/pipe3-phy.c (renamed from arch/arm/cpu/armv7/omap-common/pipe3-phy.c)0
-rw-r--r--arch/arm/mach-omap2/pipe3-phy.h (renamed from arch/arm/cpu/armv7/omap-common/pipe3-phy.h)0
-rw-r--r--arch/arm/mach-omap2/reset.c (renamed from arch/arm/cpu/armv7/omap-common/reset.c)0
-rw-r--r--arch/arm/mach-omap2/sata.c (renamed from arch/arm/cpu/armv7/omap-common/sata.c)0
-rw-r--r--arch/arm/mach-omap2/sec-common.c (renamed from arch/arm/cpu/armv7/omap-common/sec-common.c)0
-rw-r--r--arch/arm/mach-omap2/timer.c (renamed from arch/arm/cpu/armv7/omap-common/timer.c)0
-rw-r--r--arch/arm/mach-omap2/u-boot-spl.lds (renamed from arch/arm/cpu/armv7/omap-common/u-boot-spl.lds)0
-rw-r--r--arch/arm/mach-omap2/utils.c (renamed from arch/arm/cpu/armv7/omap-common/utils.c)0
-rw-r--r--arch/arm/mach-omap2/vc.c (renamed from arch/arm/cpu/armv7/omap-common/vc.c)0
-rw-r--r--include/configs/am335x_evm.h2
-rw-r--r--include/configs/am335x_igep0033.h2
-rw-r--r--include/configs/am335x_shc.h2
-rw-r--r--include/configs/am335x_sl50.h2
-rw-r--r--include/configs/am3517_crane.h2
-rw-r--r--include/configs/am3517_evm.h2
-rw-r--r--include/configs/am43xx_evm.h2
-rw-r--r--include/configs/baltos.h2
-rw-r--r--include/configs/bav335x.h2
-rw-r--r--include/configs/bur_am335x_common.h2
-rw-r--r--include/configs/cm_t335.h2
-rw-r--r--include/configs/cm_t35.h2
-rw-r--r--include/configs/cm_t43.h2
-rw-r--r--include/configs/imx6_spl.h2
-rw-r--r--include/configs/kc1.h2
-rw-r--r--include/configs/mcx.h2
-rw-r--r--include/configs/omap3_evm.h2
-rw-r--r--include/configs/pcm051.h2
-rw-r--r--include/configs/pengwyn.h2
-rw-r--r--include/configs/pepper.h2
-rw-r--r--include/configs/siemens-am33x-common.h2
-rw-r--r--include/configs/sniper.h2
-rw-r--r--include/configs/tam3517-common.h2
-rw-r--r--include/configs/tao3530.h2
-rw-r--r--include/configs/ti814x_evm.h2
-rw-r--r--include/configs/ti816x_evm.h2
-rw-r--r--include/configs/ti_omap3_common.h2
-rw-r--r--include/configs/ti_omap4_common.h2
-rw-r--r--include/configs/ti_omap5_common.h2
-rw-r--r--include/configs/tricorder.h2
103 files changed, 55 insertions, 102 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 308245185b8..acd689beccc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -544,8 +544,7 @@ config ARCH_SOCFPGA
config TARGET_CM_T43
bool "Support cm_t43"
- select CPU_V7
- select SUPPORT_SPL
+ select ARCH_OMAP2
config ARCH_SUNXI
bool "Support sunxi (Allwinner) SoCs"
@@ -891,7 +890,7 @@ source "arch/arm/cpu/armv7/mx6/Kconfig"
source "arch/arm/cpu/armv7/mx5/Kconfig"
-source "arch/arm/cpu/armv7/omap-common/Kconfig"
+source "arch/arm/mach-omap2/Kconfig"
source "arch/arm/cpu/armv8/fsl-layerscape/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 42093c2b5e2..236debb4528 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -63,6 +63,7 @@ machine-$(CONFIG_ARCH_MVEBU) += mvebu
# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA
# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X
machine-$(CONFIG_ORION5X) += orion5x
+machine-$(CONFIG_ARCH_OMAP2) += omap2
machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx
machine-$(CONFIG_ARCH_SUNXI) += sunxi
machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index 4d3bc9440fa..0e515a4603d 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -23,14 +23,12 @@ obj-$(CONFIG_ARMV7_PSCI) += psci.o psci-common.o
obj-$(CONFIG_IPROC) += iproc-common/
obj-$(CONFIG_KONA) += kona-common/
-obj-$(CONFIG_OMAP_COMMON) += omap-common/
obj-$(CONFIG_SYS_ARCH_TIMER) += arch_timer.o
ifneq (,$(filter s5pc1xx exynos,$(SOC)))
obj-y += s5p-common/
endif
-obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
obj-$(if $(filter bcm235xx,$(SOC)),y) += bcm235xx/
obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
@@ -39,9 +37,6 @@ obj-$(if $(filter ls102xa,$(SOC)),y) += ls102xa/
obj-$(if $(filter mx5,$(SOC)),y) += mx5/
obj-$(CONFIG_MX6) += mx6/
obj-$(CONFIG_MX7) += mx7/
-obj-$(CONFIG_OMAP34XX) += omap3/
-obj-$(CONFIG_OMAP44XX) += omap4/
-obj-$(CONFIG_OMAP54XX) += omap5/
obj-$(CONFIG_RMOBILE) += rmobile/
obj-$(if $(filter stv0991,$(SOC)),y) += stv0991/
obj-$(CONFIG_ARCH_SUNXI) += sunxi/
diff --git a/arch/arm/cpu/armv7/omap3/config.mk b/arch/arm/cpu/armv7/omap3/config.mk
deleted file mode 100644
index ad44d638401..00000000000
--- a/arch/arm/cpu/armv7/omap3/config.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright 2011 Linaro Limited
-#
-# (C) Copyright 2010
-# Texas Instruments, <www.ti.com>
-#
-# Aneesh V <aneesh@ti.com>
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-ifdef CONFIG_SPL_BUILD
-ALL-y += MLO
-else
-ALL-y += u-boot.img
-endif
diff --git a/arch/arm/cpu/armv7/omap4/config.mk b/arch/arm/cpu/armv7/omap4/config.mk
deleted file mode 100644
index ad44d638401..00000000000
--- a/arch/arm/cpu/armv7/omap4/config.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright 2011 Linaro Limited
-#
-# (C) Copyright 2010
-# Texas Instruments, <www.ti.com>
-#
-# Aneesh V <aneesh@ti.com>
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-ifdef CONFIG_SPL_BUILD
-ALL-y += MLO
-else
-ALL-y += u-boot.img
-endif
diff --git a/arch/arm/cpu/armv7/omap5/config.mk b/arch/arm/cpu/armv7/omap5/config.mk
deleted file mode 100644
index 286ca8688d7..00000000000
--- a/arch/arm/cpu/armv7/omap5/config.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright 2011 Linaro Limited
-#
-# Aneesh V <annesh@ti.com>
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-include $(srctree)/$(CPUDIR)/omap-common/config_secure.mk
-
-ifdef CONFIG_SPL_BUILD
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ALL-y += u-boot-spl_HS_MLO u-boot-spl_HS_X-LOADER
-else
-ALL-y += MLO
-endif
-else
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
-ALL-$(CONFIG_SPL_LOAD_FIT) += u-boot_HS.img
-endif
-ALL-y += u-boot.img
-endif
diff --git a/arch/arm/cpu/armv7/omap-common/Kconfig b/arch/arm/mach-omap2/Kconfig
index 4daccd93ffc..24bc4851958 100644
--- a/arch/arm/cpu/armv7/omap-common/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -8,10 +8,10 @@ config TI_SECURE_DEVICE
authenticated) and the code. See the doc/README.ti-secure
file for further details.
-source "arch/arm/cpu/armv7/omap3/Kconfig"
+source "arch/arm/mach-omap2/omap3/Kconfig"
-source "arch/arm/cpu/armv7/omap4/Kconfig"
+source "arch/arm/mach-omap2/omap4/Kconfig"
-source "arch/arm/cpu/armv7/omap5/Kconfig"
+source "arch/arm/mach-omap2/omap5/Kconfig"
-source "arch/arm/cpu/armv7/am33xx/Kconfig"
+source "arch/arm/mach-omap2/am33xx/Kconfig"
diff --git a/arch/arm/cpu/armv7/omap-common/Makefile b/arch/arm/mach-omap2/Makefile
index 3172bae105b..e814eb008e4 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -5,7 +5,12 @@
# SPDX-License-Identifier: GPL-2.0+
#
-obj-y := reset.o
+obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
+obj-$(CONFIG_OMAP34XX) += omap3/
+obj-$(CONFIG_OMAP44XX) += omap4/
+obj-$(CONFIG_OMAP54XX) += omap5/
+
+obj-y += reset.o
ifeq ($(CONFIG_TIMER),)
obj-y += timer.o
else
diff --git a/arch/arm/cpu/armv7/omap-common/abb.c b/arch/arm/mach-omap2/abb.c
index a0add6643e1..a0add6643e1 100644
--- a/arch/arm/cpu/armv7/omap-common/abb.c
+++ b/arch/arm/mach-omap2/abb.c
diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig
index 8fd32c2a46d..8fd32c2a46d 100644
--- a/arch/arm/cpu/armv7/am33xx/Kconfig
+++ b/arch/arm/mach-omap2/am33xx/Kconfig
diff --git a/arch/arm/cpu/armv7/am33xx/Makefile b/arch/arm/mach-omap2/am33xx/Makefile
index 6fda4825fce..6fda4825fce 100644
--- a/arch/arm/cpu/armv7/am33xx/Makefile
+++ b/arch/arm/mach-omap2/am33xx/Makefile
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index 5ebeac0ee1e..5ebeac0ee1e 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
diff --git a/arch/arm/cpu/armv7/am33xx/clk_synthesizer.c b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
index 316e677c65c..316e677c65c 100644
--- a/arch/arm/cpu/armv7/am33xx/clk_synthesizer.c
+++ b/arch/arm/mach-omap2/am33xx/clk_synthesizer.c
diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/mach-omap2/am33xx/clock.c
index 3d17698e186..3d17698e186 100644
--- a/arch/arm/cpu/armv7/am33xx/clock.c
+++ b/arch/arm/mach-omap2/am33xx/clock.c
diff --git a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
index 7b841b2d556..7b841b2d556 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_am33xx.c
+++ b/arch/arm/mach-omap2/am33xx/clock_am33xx.c
diff --git a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c b/arch/arm/mach-omap2/am33xx/clock_am43xx.c
index 73ea955a6cf..73ea955a6cf 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_am43xx.c
+++ b/arch/arm/mach-omap2/am33xx/clock_am43xx.c
diff --git a/arch/arm/cpu/armv7/am33xx/clock_ti814x.c b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
index 50bd631cf6b..50bd631cf6b 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_ti814x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti814x.c
diff --git a/arch/arm/cpu/armv7/am33xx/clock_ti816x.c b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
index 079ddd7eb9f..079ddd7eb9f 100644
--- a/arch/arm/cpu/armv7/am33xx/clock_ti816x.c
+++ b/arch/arm/mach-omap2/am33xx/clock_ti816x.c
diff --git a/arch/arm/cpu/armv7/am33xx/ddr.c b/arch/arm/mach-omap2/am33xx/ddr.c
index 6acf30c5db0..6acf30c5db0 100644
--- a/arch/arm/cpu/armv7/am33xx/ddr.c
+++ b/arch/arm/mach-omap2/am33xx/ddr.c
diff --git a/arch/arm/cpu/armv7/am33xx/emif4.c b/arch/arm/mach-omap2/am33xx/emif4.c
index 27fa3fb4628..27fa3fb4628 100644
--- a/arch/arm/cpu/armv7/am33xx/emif4.c
+++ b/arch/arm/mach-omap2/am33xx/emif4.c
diff --git a/arch/arm/cpu/armv7/am33xx/mux.c b/arch/arm/mach-omap2/am33xx/mux.c
index 2ded47228d6..2ded47228d6 100644
--- a/arch/arm/cpu/armv7/am33xx/mux.c
+++ b/arch/arm/mach-omap2/am33xx/mux.c
diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/mach-omap2/am33xx/sys_info.c
index f0f72fa6d4d..f0f72fa6d4d 100644
--- a/arch/arm/cpu/armv7/am33xx/sys_info.c
+++ b/arch/arm/mach-omap2/am33xx/sys_info.c
diff --git a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds b/arch/arm/mach-omap2/am33xx/u-boot-spl.lds
index 07cf2678782..07cf2678782 100644
--- a/arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
+++ b/arch/arm/mach-omap2/am33xx/u-boot-spl.lds
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 385310ba1ec..385310ba1ec 100644
--- a/arch/arm/cpu/armv7/omap-common/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/mach-omap2/clocks-common.c
index 9b975831046..9b975831046 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/mach-omap2/clocks-common.c
diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/mach-omap2/config.mk
index 87b76d96a83..5368f6b2d72 100644
--- a/arch/arm/cpu/armv7/am33xx/config.mk
+++ b/arch/arm/mach-omap2/config.mk
@@ -1,13 +1,12 @@
#
# Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
#
-# SPDX-License-Identifier: GPL-2.0+
-#
+# SPDX-License-Identifier: GPL-2.0+
-include $(srctree)/$(CPUDIR)/omap-common/config_secure.mk
+include $(srctree)/arch/arm/mach-omap2/config_secure.mk
ifdef CONFIG_SPL_BUILD
-ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
+ifeq ($(CONFIG_AM33XX)$(CONFIG_TI_SECURE_DEVICE),yy)
#
# For booting from SPI use
# u-boot-spl_HS_SPI_X-LOADER to program flash
@@ -30,19 +29,25 @@ ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
#
# Refer to README.ti-secure for more info
#
-ALL-y += u-boot-spl_HS_ISSW
+ALL-y += u-boot-spl_HS_ISSW
ALL-y += u-boot-spl_HS_SPI_X-LOADER
ALL-y += u-boot-spl_HS_X-LOADER
ALL-y += u-boot-spl_HS_MLO
ALL-y += u-boot-spl_HS_2ND
else
-ALL-y += MLO
+ifeq ($(CONFIG_OMAP54XX)$(CONFIG_TI_SECURE_DEVICE),yy)
+ALL-y += u-boot-spl_HS_MLO u-boot-spl_HS_X-LOADER
+else
+ALL-y += MLO
+ifeq ($(CONFIG_AM33XX),y)
ALL-y += MLO.byteswap
endif
+endif
+endif
else
ifeq ($(CONFIG_TI_SECURE_DEVICE),y)
ALL-$(CONFIG_QSPI_BOOT) += u-boot_HS_XIP_X-LOADER
ALL-$(CONFIG_SPL_LOAD_FIT) += u-boot_HS.img
endif
-ALL-y += u-boot.img
+ALL-y += u-boot.img
endif
diff --git a/arch/arm/cpu/armv7/omap-common/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk
index 1122439e38b..1122439e38b 100644
--- a/arch/arm/cpu/armv7/omap-common/config_secure.mk
+++ b/arch/arm/mach-omap2/config_secure.mk
diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/mach-omap2/emif-common.c
index b26984e26c5..b26984e26c5 100644
--- a/arch/arm/cpu/armv7/omap-common/emif-common.c
+++ b/arch/arm/mach-omap2/emif-common.c
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index f3172939889..f3172939889 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
diff --git a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S b/arch/arm/mach-omap2/lowlevel_init.S
index 8ce12c8e9ae..8ce12c8e9ae 100644
--- a/arch/arm/cpu/armv7/omap-common/lowlevel_init.S
+++ b/arch/arm/mach-omap2/lowlevel_init.S
diff --git a/arch/arm/cpu/armv7/omap-common/mem-common.c b/arch/arm/mach-omap2/mem-common.c
index d72e82e0283..d72e82e0283 100644
--- a/arch/arm/cpu/armv7/omap-common/mem-common.c
+++ b/arch/arm/mach-omap2/mem-common.c
diff --git a/arch/arm/cpu/armv7/omap-common/omap-cache.c b/arch/arm/mach-omap2/omap-cache.c
index b37163a4f3e..b37163a4f3e 100644
--- a/arch/arm/cpu/armv7/omap-common/omap-cache.c
+++ b/arch/arm/mach-omap2/omap-cache.c
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig
index 7d884a237bb..7d884a237bb 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/mach-omap2/omap3/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/mach-omap2/omap3/Makefile
index b2fce966d9a..b2fce966d9a 100644
--- a/arch/arm/cpu/armv7/omap3/Makefile
+++ b/arch/arm/mach-omap2/omap3/Makefile
diff --git a/arch/arm/cpu/armv7/omap3/am35x_musb.c b/arch/arm/mach-omap2/omap3/am35x_musb.c
index 74dd105eb6f..74dd105eb6f 100644
--- a/arch/arm/cpu/armv7/omap3/am35x_musb.c
+++ b/arch/arm/mach-omap2/omap3/am35x_musb.c
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c
index 5f5597772b6..5f5597772b6 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/mach-omap2/omap3/board.c
diff --git a/arch/arm/cpu/armv7/omap3/boot.c b/arch/arm/mach-omap2/omap3/boot.c
index 64b242b752b..64b242b752b 100644
--- a/arch/arm/cpu/armv7/omap3/boot.c
+++ b/arch/arm/mach-omap2/omap3/boot.c
diff --git a/arch/arm/cpu/armv7/omap3/clock.c b/arch/arm/mach-omap2/omap3/clock.c
index 006969e780b..006969e780b 100644
--- a/arch/arm/cpu/armv7/omap3/clock.c
+++ b/arch/arm/mach-omap2/omap3/clock.c
diff --git a/arch/arm/cpu/armv7/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c
index 37f4b8b4901..37f4b8b4901 100644
--- a/arch/arm/cpu/armv7/omap3/emac.c
+++ b/arch/arm/mach-omap2/omap3/emac.c
diff --git a/arch/arm/cpu/armv7/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c
index a2aadc98169..a2aadc98169 100644
--- a/arch/arm/cpu/armv7/omap3/emif4.c
+++ b/arch/arm/mach-omap2/omap3/emif4.c
diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S b/arch/arm/mach-omap2/omap3/lowlevel_init.S
index 1e587723cec..1e587723cec 100644
--- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
+++ b/arch/arm/mach-omap2/omap3/lowlevel_init.S
diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/mach-omap2/omap3/sdrc.c
index 4f15ac9cb55..4f15ac9cb55 100644
--- a/arch/arm/cpu/armv7/omap3/sdrc.c
+++ b/arch/arm/mach-omap2/omap3/sdrc.c
diff --git a/arch/arm/cpu/armv7/omap3/spl_id_nand.c b/arch/arm/mach-omap2/omap3/spl_id_nand.c
index 0e2f0a2f6d6..0e2f0a2f6d6 100644
--- a/arch/arm/cpu/armv7/omap3/spl_id_nand.c
+++ b/arch/arm/mach-omap2/omap3/spl_id_nand.c
diff --git a/arch/arm/cpu/armv7/omap3/sys_info.c b/arch/arm/mach-omap2/omap3/sys_info.c
index 6818fab253c..6818fab253c 100644
--- a/arch/arm/cpu/armv7/omap3/sys_info.c
+++ b/arch/arm/mach-omap2/omap3/sys_info.c
diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/mach-omap2/omap4/Kconfig
index 2091dd78151..2091dd78151 100644
--- a/arch/arm/cpu/armv7/omap4/Kconfig
+++ b/arch/arm/mach-omap2/omap4/Kconfig
diff --git a/arch/arm/cpu/armv7/omap4/Makefile b/arch/arm/mach-omap2/omap4/Makefile
index 564f1f632f3..564f1f632f3 100644
--- a/arch/arm/cpu/armv7/omap4/Makefile
+++ b/arch/arm/mach-omap2/omap4/Makefile
diff --git a/arch/arm/cpu/armv7/omap4/boot.c b/arch/arm/mach-omap2/omap4/boot.c
index 7f5791e9ed6..7f5791e9ed6 100644
--- a/arch/arm/cpu/armv7/omap4/boot.c
+++ b/arch/arm/mach-omap2/omap4/boot.c
diff --git a/arch/arm/cpu/armv7/omap4/emif.c b/arch/arm/mach-omap2/omap4/emif.c
index 403c3c6146e..403c3c6146e 100644
--- a/arch/arm/cpu/armv7/omap4/emif.c
+++ b/arch/arm/mach-omap2/omap4/emif.c
diff --git a/arch/arm/cpu/armv7/omap4/hw_data.c b/arch/arm/mach-omap2/omap4/hw_data.c
index 02c06c15776..02c06c15776 100644
--- a/arch/arm/cpu/armv7/omap4/hw_data.c
+++ b/arch/arm/mach-omap2/omap4/hw_data.c
diff --git a/arch/arm/cpu/armv7/omap4/hwinit.c b/arch/arm/mach-omap2/omap4/hwinit.c
index 7c6638ca80d..7c6638ca80d 100644
--- a/arch/arm/cpu/armv7/omap4/hwinit.c
+++ b/arch/arm/mach-omap2/omap4/hwinit.c
diff --git a/arch/arm/cpu/armv7/omap4/prcm-regs.c b/arch/arm/mach-omap2/omap4/prcm-regs.c
index 2f0e1e851ac..2f0e1e851ac 100644
--- a/arch/arm/cpu/armv7/omap4/prcm-regs.c
+++ b/arch/arm/mach-omap2/omap4/prcm-regs.c
diff --git a/arch/arm/cpu/armv7/omap4/sdram_elpida.c b/arch/arm/mach-omap2/omap4/sdram_elpida.c
index 78b4f09ce24..78b4f09ce24 100644
--- a/arch/arm/cpu/armv7/omap4/sdram_elpida.c
+++ b/arch/arm/mach-omap2/omap4/sdram_elpida.c
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/mach-omap2/omap5/Kconfig
index 22259dcc5cf..22259dcc5cf 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/mach-omap2/omap5/Kconfig
diff --git a/arch/arm/cpu/armv7/omap5/Makefile b/arch/arm/mach-omap2/omap5/Makefile
index 0212df73c15..0212df73c15 100644
--- a/arch/arm/cpu/armv7/omap5/Makefile
+++ b/arch/arm/mach-omap2/omap5/Makefile
diff --git a/arch/arm/cpu/armv7/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c
index 3bf88979e5d..3bf88979e5d 100644
--- a/arch/arm/cpu/armv7/omap5/abb.c
+++ b/arch/arm/mach-omap2/omap5/abb.c
diff --git a/arch/arm/cpu/armv7/omap5/boot.c b/arch/arm/mach-omap2/omap5/boot.c
index 583beccad5a..583beccad5a 100644
--- a/arch/arm/cpu/armv7/omap5/boot.c
+++ b/arch/arm/mach-omap2/omap5/boot.c
diff --git a/arch/arm/cpu/armv7/omap5/dra7xx_iodelay.c b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
index 87987308ace..87987308ace 100644
--- a/arch/arm/cpu/armv7/omap5/dra7xx_iodelay.c
+++ b/arch/arm/mach-omap2/omap5/dra7xx_iodelay.c
diff --git a/arch/arm/cpu/armv7/omap5/emif.c b/arch/arm/mach-omap2/omap5/emif.c
index b1203a37afc..b1203a37afc 100644
--- a/arch/arm/cpu/armv7/omap5/emif.c
+++ b/arch/arm/mach-omap2/omap5/emif.c
diff --git a/arch/arm/cpu/armv7/omap5/fdt.c b/arch/arm/mach-omap2/omap5/fdt.c
index da8d59bb59f..da8d59bb59f 100644
--- a/arch/arm/cpu/armv7/omap5/fdt.c
+++ b/arch/arm/mach-omap2/omap5/fdt.c
diff --git a/arch/arm/cpu/armv7/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c
index fc991358248..fc991358248 100644
--- a/arch/arm/cpu/armv7/omap5/hw_data.c
+++ b/arch/arm/mach-omap2/omap5/hw_data.c
diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/mach-omap2/omap5/hwinit.c
index e3ac8bbe952..e3ac8bbe952 100644
--- a/arch/arm/cpu/armv7/omap5/hwinit.c
+++ b/arch/arm/mach-omap2/omap5/hwinit.c
diff --git a/arch/arm/cpu/armv7/omap5/prcm-regs.c b/arch/arm/mach-omap2/omap5/prcm-regs.c
index b5f1d700fd8..b5f1d700fd8 100644
--- a/arch/arm/cpu/armv7/omap5/prcm-regs.c
+++ b/arch/arm/mach-omap2/omap5/prcm-regs.c
diff --git a/arch/arm/cpu/armv7/omap5/sdram.c b/arch/arm/mach-omap2/omap5/sdram.c
index 7712923d857..7712923d857 100644
--- a/arch/arm/cpu/armv7/omap5/sdram.c
+++ b/arch/arm/mach-omap2/omap5/sdram.c
diff --git a/arch/arm/cpu/armv7/omap5/sec-fxns.c b/arch/arm/mach-omap2/omap5/sec-fxns.c
index 33d4ea4eaca..33d4ea4eaca 100644
--- a/arch/arm/cpu/armv7/omap5/sec-fxns.c
+++ b/arch/arm/mach-omap2/omap5/sec-fxns.c
diff --git a/arch/arm/cpu/armv7/omap-common/pipe3-phy.c b/arch/arm/mach-omap2/pipe3-phy.c
index e02e3ec23ee..e02e3ec23ee 100644
--- a/arch/arm/cpu/armv7/omap-common/pipe3-phy.c
+++ b/arch/arm/mach-omap2/pipe3-phy.c
diff --git a/arch/arm/cpu/armv7/omap-common/pipe3-phy.h b/arch/arm/mach-omap2/pipe3-phy.h
index 441f49a3f97..441f49a3f97 100644
--- a/arch/arm/cpu/armv7/omap-common/pipe3-phy.h
+++ b/arch/arm/mach-omap2/pipe3-phy.h
diff --git a/arch/arm/cpu/armv7/omap-common/reset.c b/arch/arm/mach-omap2/reset.c
index 91ad031ddd3..91ad031ddd3 100644
--- a/arch/arm/cpu/armv7/omap-common/reset.c
+++ b/arch/arm/mach-omap2/reset.c
diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/mach-omap2/sata.c
index 2c2d1bce363..2c2d1bce363 100644
--- a/arch/arm/cpu/armv7/omap-common/sata.c
+++ b/arch/arm/mach-omap2/sata.c
diff --git a/arch/arm/cpu/armv7/omap-common/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index 246a2393dab..246a2393dab 100644
--- a/arch/arm/cpu/armv7/omap-common/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
diff --git a/arch/arm/cpu/armv7/omap-common/timer.c b/arch/arm/mach-omap2/timer.c
index 49e3a971d96..49e3a971d96 100644
--- a/arch/arm/cpu/armv7/omap-common/timer.c
+++ b/arch/arm/mach-omap2/timer.c
diff --git a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds b/arch/arm/mach-omap2/u-boot-spl.lds
index 8fec715ca56..8fec715ca56 100644
--- a/arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
+++ b/arch/arm/mach-omap2/u-boot-spl.lds
diff --git a/arch/arm/cpu/armv7/omap-common/utils.c b/arch/arm/mach-omap2/utils.c
index 2d03ebfbd3d..2d03ebfbd3d 100644
--- a/arch/arm/cpu/armv7/omap-common/utils.c
+++ b/arch/arm/mach-omap2/utils.c
diff --git a/arch/arm/cpu/armv7/omap-common/vc.c b/arch/arm/mach-omap2/vc.c
index a68f1d145dc..a68f1d145dc 100644
--- a/arch/arm/cpu/armv7/omap-common/vc.c
+++ b/arch/arm/mach-omap2/vc.c
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ec70b72970e..8fa8e39f71e 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -213,7 +213,7 @@
/* USB gadget RNDIS */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#endif
#ifdef CONFIG_NAND
diff --git a/include/configs/am335x_igep0033.h b/include/configs/am335x_igep0033.h
index 32aa392e8b4..16fb1ae8aa6 100644
--- a/include/configs/am335x_igep0033.h
+++ b/include/configs/am335x_igep0033.h
@@ -123,7 +123,7 @@
#undef CONFIG_USE_IRQ
/* SPL */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index 553aaa38a8c..48353e9d3d3 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -280,7 +280,7 @@
/* SPL */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#ifndef CONFIG_SPL_USBETH_SUPPORT
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
diff --git a/include/configs/am335x_sl50.h b/include/configs/am335x_sl50.h
index 9795d4112ba..ca5bb1a77da 100644
--- a/include/configs/am335x_sl50.h
+++ b/include/configs/am335x_sl50.h
@@ -86,7 +86,7 @@
#define CONFIG_BOOTCOUNT_AM33XX
#define CONFIG_SYS_BOOTCOUNT_BE
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#ifndef CONFIG_SPL_USBETH_SUPPORT
#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 2f20e10eff9..2dbbd7a7757 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -281,7 +281,7 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/* NAND boot config */
#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index a4ae5453b2f..2178c8a68f4 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -341,6 +341,6 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#endif /* __CONFIG_H */
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 20f207c3f3a..0a6c06a4bba 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -82,7 +82,7 @@
#define FAT_ENV_FILE "uboot.env"
#define CONFIG_FAT_WRITE
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/* SPL USB Support */
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index e69c1b63c14..8efd513f324 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -224,7 +224,7 @@
/* General network SPL, both CPSW and USB gadget RNDIS */
#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL"*/
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#ifdef CONFIG_NAND
#define CONFIG_NAND_OMAP_GPMC
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index ac47decb638..2f51e2cd5ae 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -357,7 +357,7 @@ DEFAULT_LINUX_BOOT_ENV \
/* USB gadget RNDIS */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#endif
#ifdef CONFIG_NAND
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index e425cb91930..90698614d9a 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -113,6 +113,6 @@
/* General parts of the framework, required. */
#define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#endif /* ! __BUR_AM335X_COMMON_H__ */
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index 7eed776f62f..ae4f287e4d4 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -104,7 +104,7 @@
#define CONFIG_SYS_I2C_EEPROM_BUS 0
/* SPL */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
/* Network. */
#define CONFIG_PHY_GIGE
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 201711d987f..cbb0d0b8f33 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -300,7 +300,7 @@
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
#define CONFIG_SPL_OMAP3_ID_NAND
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/* NAND boot config */
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 5ec4926dd8e..9c24ba99654 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -103,7 +103,7 @@
#define CONFIG_ENV_OFFSET (768 * 1024)
#define CONFIG_ENV_SPI_MAX_HZ 48000000
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/* Enhance our eMMC support / experience. */
#define CONFIG_CMD_GPT
diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
index 0662053f859..dce44387979 100644
--- a/include/configs/imx6_spl.h
+++ b/include/configs/imx6_spl.h
@@ -25,7 +25,7 @@
* or 64KB
*/
#define CONFIG_SYS_THUMB_BUILD
-#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_TEXT_BASE 0x00908000
#define CONFIG_SPL_MAX_SIZE 0x10000
#define CONFIG_SPL_STACK 0x0091FFB8
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index f8078eff942..a66d462706b 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -126,7 +126,7 @@
#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
#define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024)
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 2
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 7db9e5a1dd6..d5b7dfb391d 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -316,7 +316,7 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/
#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index f4f4e4917a5..a5065e209d7 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -340,7 +340,7 @@
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_OMAP3_ID_NAND
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/*
* 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index ef081b259be..aff4635e90e 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -120,7 +120,7 @@
/* CPU */
#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#ifdef CONFIG_SPI_BOOT
#define CONFIG_SPL_SPI_LOAD
diff --git a/include/configs/pengwyn.h b/include/configs/pengwyn.h
index 4130f535823..f1db204910d 100644
--- a/include/configs/pengwyn.h
+++ b/include/configs/pengwyn.h
@@ -207,6 +207,6 @@
/* CPSW support */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#endif /* ! __CONFIG_PENGWYN_H */
diff --git a/include/configs/pepper.h b/include/configs/pepper.h
index e99188fc43e..d9c84f27ea9 100644
--- a/include/configs/pepper.h
+++ b/include/configs/pepper.h
@@ -90,6 +90,6 @@
#define CONFIG_PHY_RESET_DELAY 1000
/* SPL */
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#endif /* __CONFIG_PEPPER_H */
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 31fcc947dde..066c24136c4 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -136,7 +136,7 @@
#define CONFIG_SPL_SPI_LOAD
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/am33xx/u-boot-spl.lds"
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SPL_NAND_AM33XX_BCH
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 7fada3fec0a..264279fc424 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -134,7 +134,7 @@
#define CONFIG_SYS_SPL_MALLOC_SIZE (1024 * 1024)
#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_BOARD_INIT
#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 2
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 098c9bcc6c2..6f58a97d33d 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -198,7 +198,7 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/
#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 861e5027754..6219a44595e 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -284,7 +284,7 @@
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
#define CONFIG_SPL_OMAP3_ID_NAND
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
/* NAND boot config */
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index a5dc91b3bae..9a9faebc608 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -166,7 +166,7 @@
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 381e9a37175..14c254296f2 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -130,7 +130,7 @@
#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000
#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_BOARD_INIT
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index d607f407fdf..0ad32353bae 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -68,7 +68,7 @@
/* SPL */
#define CONFIG_SPL_TEXT_BASE 0x40200800
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
(64 << 20))
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 3d2992f737d..aa17c09ce96 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -148,7 +148,7 @@
* So moving TEXT_BASE down to non-HS limit.
*/
#define CONFIG_SPL_TEXT_BASE 0x40300000
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
(128 << 20))
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index b85fae39bcc..8322f645fe9 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -158,7 +158,7 @@
#define CONFIG_SPL_TEXT_BASE 0x40300000
#endif
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
(128 << 20))
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index fbef1f0e410..9a3d224e39e 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -315,7 +315,7 @@
#define CONFIG_SPL_NAND_BASE
#define CONFIG_SPL_NAND_DRIVERS
#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+#define CONFIG_SPL_LDSCRIPT "arch/arm/mach-omap2/u-boot-spl.lds"
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1