public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] arm: Move TI/omap related code to arch/arm/mach-omap2
@ 2016-11-08  2:34 Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2 Tom Rini
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tom Rini @ 2016-11-08  2:34 UTC (permalink / raw)
  To: u-boot

The following series moves the contents of arch/arm/cpu/armv7/omap-common to
arch/arm/mach-omap2/ and arch/arm/cpu/armv7{omap[345],am33xx} over to
sub-directories ofarch/arm/mach-omap2/.  I thought about moving them all to the
top level but I don't think that will add clarity to the situation.  I've also
consolidated the config.mk files into a single one in
arch/arm/mach-omap2/config.mk.  These changes have been boot tested on various
omap3/4/5 and am33xx platforms and built for all of ARM.  There are a few cases
where the sizes change slightly but it looks most likely to be due to strings
and filling.  I've examined a few of the cases in-depth and there's no "real"
changes that I can see.

-- 
Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2
  2016-11-08  2:34 [U-Boot] [PATCH 0/3] arm: Move TI/omap related code to arch/arm/mach-omap2 Tom Rini
@ 2016-11-08  2:34 ` Tom Rini
  2016-11-22  2:51   ` [U-Boot] [U-Boot,1/3] " Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2 Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2016-11-08  2:34 UTC (permalink / raw)
  To: u-boot

To start consolidating various TI-related code, introduce the ARCH_OMAP2
symbol.  While we have removed omap2-specific boards some time ago,
matching up with the kernel naming here will help overall.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/Kconfig | 50 ++++++++++++++++++++------------------------------
 1 file changed, 20 insertions(+), 30 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d7a9b11c766a..308245185b83 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -126,6 +126,11 @@ config ENABLE_ARM_SOC_BOOT0_HOOK
 	  ARM_SOC_BOOT0_HOOK which contains the required assembler
 	  preprocessor code.
 
+config ARCH_OMAP2
+	bool
+	select CPU_V7
+	select SUPPORT_SPL
+
 choice
 	prompt "Target select"
 	default TARGET_HIKEY
@@ -327,71 +332,61 @@ config TARGET_VEXPRESS_CA9X4
 
 config TARGET_BRXRE1
 	bool "Support BRXRE1"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 
 config TARGET_BRPPT1
 	bool "Support BRPPT1"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 
 config TARGET_DRACO
 	bool "Support draco"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_THUBAN
 	bool "Support thuban"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_RASTABAN
 	bool "Support rastaban"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_ETAMIN
 	bool "Support etamin"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_PXM2
 	bool "Support pxm2"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_RUT
 	bool "Support rut"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select DM
 	select DM_SERIAL
 	select DM_GPIO
 
 config TARGET_TI814X_EVM
 	bool "Support ti814x_evm"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 
 config TARGET_TI816X_EVM
 	bool "Support ti816x_evm"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 
 config TARGET_BCM23550_W1D
 	bool "Support bcm23550_w1d"
@@ -486,25 +481,21 @@ config TARGET_MX53SMD
 
 config OMAP34XX
 	bool "OMAP34XX SoC"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select USE_TINY_PRINTF
 
 config OMAP44XX
 	bool "OMAP44XX SoC"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	select USE_TINY_PRINTF
 
 config OMAP54XX
 	bool "OMAP54XX SoC"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 
 config AM43XX
 	bool "AM43XX SoC"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	help
 	  Support for AM43xx SOC from Texas Instruments.
 	  The AM43xx high performance SOC features a Cortex-A9
@@ -514,8 +505,7 @@ config AM43XX
 
 config AM33XX
 	bool "AM33XX SoC"
-	select CPU_V7
-	select SUPPORT_SPL
+	select ARCH_OMAP2
 	help
 	  Support for AM335x SOC from Texas Instruments.
 	  The AM335x high performance SOC features a Cortex-A8
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
  2016-11-08  2:34 [U-Boot] [PATCH 0/3] arm: Move TI/omap related code to arch/arm/mach-omap2 Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2 Tom Rini
@ 2016-11-08  2:34 ` Tom Rini
  2016-11-22  2:53   ` [U-Boot] [U-Boot, " Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2 Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2016-11-08  2:34 UTC (permalink / raw)
  To: u-boot

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>
---
 arch/arm/Kconfig                                   |  5 ++---
 arch/arm/Makefile                                  |  1 +
 arch/arm/cpu/armv7/Makefile                        |  5 -----
 arch/arm/cpu/armv7/omap3/config.mk                 | 15 ---------------
 arch/arm/cpu/armv7/omap4/config.mk                 | 15 ---------------
 arch/arm/cpu/armv7/omap5/config.mk                 | 22 ----------------------
 .../{cpu/armv7/omap-common => mach-omap2}/Kconfig  |  8 ++++----
 .../{cpu/armv7/omap-common => mach-omap2}/Makefile |  7 ++++++-
 .../{cpu/armv7/omap-common => mach-omap2}/abb.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/Kconfig  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/Makefile |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/board.c  |  0
 .../armv7 => mach-omap2}/am33xx/clk_synthesizer.c  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock.c  |  0
 .../armv7 => mach-omap2}/am33xx/clock_am33xx.c     |  0
 .../armv7 => mach-omap2}/am33xx/clock_am43xx.c     |  0
 .../armv7 => mach-omap2}/am33xx/clock_ti814x.c     |  0
 .../armv7 => mach-omap2}/am33xx/clock_ti816x.c     |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/ddr.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/emif4.c  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/am33xx/mux.c    |  0
 .../{cpu/armv7 => mach-omap2}/am33xx/sys_info.c    |  0
 .../armv7 => mach-omap2}/am33xx/u-boot-spl.lds     |  0
 .../armv7/omap-common => mach-omap2}/boot-common.c |  0
 .../omap-common => mach-omap2}/clocks-common.c     |  0
 .../arm/{cpu/armv7/am33xx => mach-omap2}/config.mk | 19 ++++++++++++-------
 .../omap-common => mach-omap2}/config_secure.mk    |  0
 .../armv7/omap-common => mach-omap2}/emif-common.c |  0
 .../omap-common => mach-omap2}/hwinit-common.c     |  0
 .../omap-common => mach-omap2}/lowlevel_init.S     |  0
 .../armv7/omap-common => mach-omap2}/mem-common.c  |  0
 .../armv7/omap-common => mach-omap2}/omap-cache.c  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/Kconfig   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/Makefile  |  0
 .../{cpu/armv7 => mach-omap2}/omap3/am35x_musb.c   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/board.c   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/boot.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/clock.c   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/emac.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/emif4.c   |  0
 .../armv7 => mach-omap2}/omap3/lowlevel_init.S     |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap3/sdrc.c    |  0
 .../{cpu/armv7 => mach-omap2}/omap3/spl_id_nand.c  |  0
 .../arm/{cpu/armv7 => mach-omap2}/omap3/sys_info.c |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/Kconfig   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/Makefile  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/boot.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/emif.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/hw_data.c |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap4/hwinit.c  |  0
 .../{cpu/armv7 => mach-omap2}/omap4/prcm-regs.c    |  0
 .../{cpu/armv7 => mach-omap2}/omap4/sdram_elpida.c |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/Kconfig   |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/Makefile  |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/abb.c     |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/boot.c    |  0
 .../armv7 => mach-omap2}/omap5/dra7xx_iodelay.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/emif.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/fdt.c     |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/hw_data.c |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/hwinit.c  |  0
 .../{cpu/armv7 => mach-omap2}/omap5/prcm-regs.c    |  0
 arch/arm/{cpu/armv7 => mach-omap2}/omap5/sdram.c   |  0
 .../arm/{cpu/armv7 => mach-omap2}/omap5/sec-fxns.c |  0
 .../armv7/omap-common => mach-omap2}/pipe3-phy.c   |  0
 .../armv7/omap-common => mach-omap2}/pipe3-phy.h   |  0
 .../{cpu/armv7/omap-common => mach-omap2}/reset.c  |  0
 .../{cpu/armv7/omap-common => mach-omap2}/sata.c   |  0
 .../armv7/omap-common => mach-omap2}/sec-common.c  |  0
 .../{cpu/armv7/omap-common => mach-omap2}/timer.c  |  0
 .../omap-common => mach-omap2}/u-boot-spl.lds      |  0
 .../{cpu/armv7/omap-common => mach-omap2}/utils.c  |  0
 .../arm/{cpu/armv7/omap-common => mach-omap2}/vc.c |  0
 include/configs/am335x_evm.h                       |  2 +-
 include/configs/am335x_igep0033.h                  |  2 +-
 include/configs/am335x_shc.h                       |  2 +-
 include/configs/am335x_sl50.h                      |  2 +-
 include/configs/am3517_crane.h                     |  2 +-
 include/configs/am3517_evm.h                       |  2 +-
 include/configs/am43xx_evm.h                       |  2 +-
 include/configs/baltos.h                           |  2 +-
 include/configs/bav335x.h                          |  2 +-
 include/configs/bur_am335x_common.h                |  2 +-
 include/configs/cm_t335.h                          |  2 +-
 include/configs/cm_t35.h                           |  2 +-
 include/configs/cm_t43.h                           |  2 +-
 include/configs/imx6_spl.h                         |  2 +-
 include/configs/kc1.h                              |  2 +-
 include/configs/mcx.h                              |  2 +-
 include/configs/omap3_evm.h                        |  2 +-
 include/configs/pcm051.h                           |  2 +-
 include/configs/pengwyn.h                          |  2 +-
 include/configs/pepper.h                           |  2 +-
 include/configs/siemens-am33x-common.h             |  2 +-
 include/configs/sniper.h                           |  2 +-
 include/configs/tam3517-common.h                   |  2 +-
 include/configs/tao3530.h                          |  2 +-
 include/configs/ti814x_evm.h                       |  2 +-
 include/configs/ti816x_evm.h                       |  2 +-
 include/configs/ti_omap3_common.h                  |  2 +-
 include/configs/ti_omap4_common.h                  |  2 +-
 include/configs/ti_omap5_common.h                  |  2 +-
 include/configs/tricorder.h                        |  2 +-
 103 files changed, 55 insertions(+), 102 deletions(-)
 delete mode 100644 arch/arm/cpu/armv7/omap3/config.mk
 delete mode 100644 arch/arm/cpu/armv7/omap4/config.mk
 delete mode 100644 arch/arm/cpu/armv7/omap5/config.mk
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/Kconfig (68%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/Makefile (80%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/abb.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/Kconfig (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/Makefile (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/board.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clk_synthesizer.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock_am33xx.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock_am43xx.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock_ti814x.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/clock_ti816x.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/ddr.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/emif4.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/mux.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/sys_info.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/am33xx/u-boot-spl.lds (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/boot-common.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/clocks-common.c (100%)
 rename arch/arm/{cpu/armv7/am33xx => mach-omap2}/config.mk (69%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/config_secure.mk (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/emif-common.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/hwinit-common.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/lowlevel_init.S (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/mem-common.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/omap-cache.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/Kconfig (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/Makefile (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/am35x_musb.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/board.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/boot.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/clock.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/emac.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/emif4.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/lowlevel_init.S (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/sdrc.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/spl_id_nand.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap3/sys_info.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/Kconfig (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/Makefile (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/boot.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/emif.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/hw_data.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/hwinit.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/prcm-regs.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap4/sdram_elpida.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/Kconfig (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/Makefile (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/abb.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/boot.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/dra7xx_iodelay.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/emif.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/fdt.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/hw_data.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/hwinit.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/prcm-regs.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/sdram.c (100%)
 rename arch/arm/{cpu/armv7 => mach-omap2}/omap5/sec-fxns.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/pipe3-phy.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/pipe3-phy.h (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/reset.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/sata.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/sec-common.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/timer.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/u-boot-spl.lds (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/utils.c (100%)
 rename arch/arm/{cpu/armv7/omap-common => mach-omap2}/vc.c (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 308245185b83..acd689beccc7 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 42093c2b5e29..236debb45286 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 4d3bc9440fa7..0e515a4603da 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 ad44d6384014..000000000000
--- 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 ad44d6384014..000000000000
--- 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 286ca8688d76..000000000000
--- 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
similarity index 68%
rename from arch/arm/cpu/armv7/omap-common/Kconfig
rename to arch/arm/mach-omap2/Kconfig
index 4daccd93ffc7..24bc48519583 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
similarity index 80%
rename from arch/arm/cpu/armv7/omap-common/Makefile
rename to arch/arm/mach-omap2/Makefile
index 3172bae105bb..e814eb008e44 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/abb.c
rename to arch/arm/mach-omap2/abb.c
diff --git a/arch/arm/cpu/armv7/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/Kconfig
rename to arch/arm/mach-omap2/am33xx/Kconfig
diff --git a/arch/arm/cpu/armv7/am33xx/Makefile b/arch/arm/mach-omap2/am33xx/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/Makefile
rename to arch/arm/mach-omap2/am33xx/Makefile
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/board.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clk_synthesizer.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clock.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clock_am33xx.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clock_am43xx.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clock_ti814x.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/clock_ti816x.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/ddr.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/emif4.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/mux.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/sys_info.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/boot-common.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/clocks-common.c
rename to arch/arm/mach-omap2/clocks-common.c
diff --git a/arch/arm/cpu/armv7/am33xx/config.mk b/arch/arm/mach-omap2/config.mk
similarity index 69%
rename from arch/arm/cpu/armv7/am33xx/config.mk
rename to arch/arm/mach-omap2/config.mk
index 87b76d96a839..5368f6b2d72e 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/config_secure.mk
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/emif-common.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/hwinit-common.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/lowlevel_init.S
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/mem-common.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/omap-cache.c
rename to arch/arm/mach-omap2/omap-cache.c
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/Kconfig
rename to arch/arm/mach-omap2/omap3/Kconfig
diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/mach-omap2/omap3/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/Makefile
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/am35x_musb.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/board.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/boot.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/clock.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/emac.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/emif4.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/lowlevel_init.S
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/sdrc.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/spl_id_nand.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap3/sys_info.c
rename to arch/arm/mach-omap2/omap3/sys_info.c
diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/mach-omap2/omap4/Kconfig
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/Kconfig
rename to arch/arm/mach-omap2/omap4/Kconfig
diff --git a/arch/arm/cpu/armv7/omap4/Makefile b/arch/arm/mach-omap2/omap4/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/Makefile
rename to arch/arm/mach-omap2/omap4/Makefile
diff --git a/arch/arm/cpu/armv7/omap4/boot.c b/arch/arm/mach-omap2/omap4/boot.c
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/boot.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/emif.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/hw_data.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/hwinit.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/prcm-regs.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap4/sdram_elpida.c
rename to arch/arm/mach-omap2/omap4/sdram_elpida.c
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/mach-omap2/omap5/Kconfig
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/Kconfig
rename to arch/arm/mach-omap2/omap5/Kconfig
diff --git a/arch/arm/cpu/armv7/omap5/Makefile b/arch/arm/mach-omap2/omap5/Makefile
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/Makefile
rename to arch/arm/mach-omap2/omap5/Makefile
diff --git a/arch/arm/cpu/armv7/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/abb.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/boot.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/dra7xx_iodelay.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/emif.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/fdt.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/hw_data.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/hwinit.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/prcm-regs.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/sdram.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap5/sec-fxns.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/pipe3-phy.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/pipe3-phy.h
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/reset.c
rename to arch/arm/mach-omap2/reset.c
diff --git a/arch/arm/cpu/armv7/omap-common/sata.c b/arch/arm/mach-omap2/sata.c
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/sata.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/sec-common.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/timer.c
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
rename to 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
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/utils.c
rename to arch/arm/mach-omap2/utils.c
diff --git a/arch/arm/cpu/armv7/omap-common/vc.c b/arch/arm/mach-omap2/vc.c
similarity index 100%
rename from arch/arm/cpu/armv7/omap-common/vc.c
rename to arch/arm/mach-omap2/vc.c
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ec70b72970e3..8fa8e39f71e4 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 32aa392e8b4d..16fb1ae8aa6a 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 553aaa38a8cc..48353e9d3d3d 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 9795d4112baa..ca5bb1a77dac 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 6d271100c73e..7f0c0cfa32e7 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -283,7 +283,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 cc89a160db4b..ab6d5f105191 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -343,6 +343,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 20f207c3f3a7..0a6c06a4bba2 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 e69c1b63c144..8efd513f3247 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 ac47decb6387..2f51e2cd5ae4 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 e425cb919304..90698614d9a9 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 7eed776f62fa..ae4f287e4d48 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 6caac1dfcacc..2de170fb56b7 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -302,7 +302,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 3a605f7504b8..9ab47d343a05 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -104,7 +104,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 76d1ca088d66..9022915c0fab 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 f8078eff942d..a66d462706b2 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 b9a2ad352127..3d147bfa9aac 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 b2a84125b6ba..05001108ffb5 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -342,7 +342,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 ef081b259be5..aff4635e90e6 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 4130f5358238..f1db204910d2 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 e99188fc43e3..d9c84f27ea9b 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 7de3cf6d9ae6..67c79fd6cfd9 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -137,7 +137,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 7fada3fec0a7..264279fc4241 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 1527d90afd71..60e014d11b7a 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 9e85b1da0238..7d97d63c4c88 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -286,7 +286,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 e7f4fba132d5..285208b81429 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -168,7 +168,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 390c5aee26ef..08033e2d8774 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -132,7 +132,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 d607f407fdf9..0ad32353bae2 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 3d2992f737dc..aa17c09ce968 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 29b7d96d9622..55bc7bac1760 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -157,7 +157,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 6cd3ca5328c6..28c34551564e 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
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2
  2016-11-08  2:34 [U-Boot] [PATCH 0/3] arm: Move TI/omap related code to arch/arm/mach-omap2 Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2 Tom Rini
  2016-11-08  2:34 ` [U-Boot] [PATCH 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms Tom Rini
@ 2016-11-08  2:34 ` Tom Rini
  2016-11-22  2:53   ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2016-11-08  2:34 UTC (permalink / raw)
  To: u-boot

With the move to arch/arm/mach-omap2 there are now very few uses of
CONFIG_OMAP_COMMON and further they can all be replaced with
CONFIG_ARCH_OMAP2, so do so.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/config.mk                         | 2 +-
 arch/arm/include/asm/global_data.h         | 2 +-
 arch/arm/include/asm/ti-common/sys_proto.h | 2 +-
 include/configs/am3517_crane.h             | 1 -
 include/configs/am3517_evm.h               | 1 -
 include/configs/bur_am335x_common.h        | 1 -
 include/configs/cm_t335.h                  | 2 --
 include/configs/cm_t35.h                   | 1 -
 include/configs/cm_t3517.h                 | 1 -
 include/configs/kc1.h                      | 1 -
 include/configs/mcx.h                      | 1 -
 include/configs/nokia_rx51.h               | 1 -
 include/configs/omap3_evm.h                | 1 -
 include/configs/siemens-am33x-common.h     | 1 -
 include/configs/sniper.h                   | 1 -
 include/configs/tam3517-common.h           | 1 -
 include/configs/tao3530.h                  | 1 -
 include/configs/ti814x_evm.h               | 1 -
 include/configs/ti816x_evm.h               | 1 -
 include/configs/ti_armv7_omap.h            | 1 -
 include/configs/tricorder.h                | 1 -
 21 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 542b897c31e0..d1be266d8886 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -6,7 +6,7 @@
 #
 
 ifndef CONFIG_STANDALONE_LOAD_ADDR
-ifneq ($(CONFIG_OMAP_COMMON),)
+ifneq ($(CONFIG_ARCH_OMAP2),)
 CONFIG_STANDALONE_LOAD_ADDR = 0x80300000
 else
 CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index 10550174df4b..aee87cdcbf9e 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -60,7 +60,7 @@ struct arch_global_data {
 	unsigned long tlb_allocated;
 #endif
 
-#ifdef CONFIG_OMAP_COMMON
+#ifdef CONFIG_ARCH_OMAP2
 	u32 omap_boot_device;
 	u32 omap_boot_mode;
 	u8 omap_ch_flags;
diff --git a/arch/arm/include/asm/ti-common/sys_proto.h b/arch/arm/include/asm/ti-common/sys_proto.h
index 2bdb71cfe8e5..60d1160459bb 100644
--- a/arch/arm/include/asm/ti-common/sys_proto.h
+++ b/arch/arm/include/asm/ti-common/sys_proto.h
@@ -9,7 +9,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_OMAP_COMMON
+#ifdef CONFIG_ARCH_OMAP2
 #define TI_ARMV7_DRAM_ADDR_SPACE_START	0x80000000
 #define TI_ARMV7_DRAM_ADDR_SPACE_END	0xFFFFFFFF
 
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 7f0c0cfa32e7..d63f5f8943dd 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -18,7 +18,6 @@
  */
 #define CONFIG_OMAP		1	/* in a TI OMAP core */
 #define CONFIG_OMAP3_AM3517CRANE	1	/* working with CRANEBOARD */
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index ab6d5f105191..5dcd120ba064 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -16,7 +16,6 @@
 /* High Level Configuration Options */
 
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 #define CONFIG_SYS_NO_FLASH
 
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index 90698614d9a9..7afffa2ec647 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -14,7 +14,6 @@
 /* ------------------------------------------------------------------------- */
 #define CONFIG_AM33XX
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 #define CONFIG_MAX_RAM_BANK_SIZE	(1024 << 20)	/* 1GB */
 
 /* Timer information */
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index ae4f287e4d48..8f24174a21e7 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -25,8 +25,6 @@
 #undef CONFIG_MAX_RAM_BANK_SIZE
 #define CONFIG_MAX_RAM_BANK_SIZE	(512 << 20)	/* 512MB */
 
-#define CONFIG_OMAP_COMMON
-
 #define MACH_TYPE_CM_T335		4586	/* Until the next sync */
 #define CONFIG_MACH_TYPE		MACH_TYPE_CM_T335
 
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 2de170fb56b7..73f6f1f9925c 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -25,7 +25,6 @@
 #define CONFIG_OMAP	/* in a TI OMAP core */
 #define CONFIG_OMAP_GPIO
 #define CONFIG_CM_T3X	/* working with CM-T35 and CM-T3730 */
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h
index edb52be5a83c..1e2a47702756 100644
--- a/include/configs/cm_t3517.h
+++ b/include/configs/cm_t3517.h
@@ -15,7 +15,6 @@
  */
 #define CONFIG_OMAP	/* in a TI OMAP core */
 #define CONFIG_CM_T3517	/* working with CM-T3517 */
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index a66d462706b2..76f2b8b7b4a0 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -31,7 +31,6 @@
 
 #define CONFIG_OMAP
 #define CONFIG_OMAP4430
-#define CONFIG_OMAP_COMMON
 
 /*
  * Board
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 3d147bfa9aac..155a77c9433d 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -15,7 +15,6 @@
 #define CONFIG_OMAP			/* in a TI OMAP core */
 #define CONFIG_OMAP3_MCX		/* working with mcx */
 #define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index d1230a56f41b..4d5265f5409a 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -27,7 +27,6 @@
 #define CONFIG_OMAP3430			/* which is in a 3430 */
 #define CONFIG_OMAP3_RX51		/* working with RX51 */
 #define CONFIG_SYS_L2CACHE_OFF		/* pretend there is no L2 CACHE */
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 05001108ffb5..d3658fef3f1f 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -94,7 +94,6 @@
  */
 #define CONFIG_OMAP			/* This is TI OMAP core */
 #define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 67c79fd6cfd9..51297b8b483a 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -16,7 +16,6 @@
 
 #define CONFIG_AM33XX
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 264279fc4241..e12b10133392 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -26,7 +26,6 @@
  */
 
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 /*
  * Board
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 60e014d11b7a..9b309d8abb39 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -15,7 +15,6 @@
  */
 #define CONFIG_OMAP		/* in a TI OMAP core */
 #define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 7d97d63c4c88..eb03183bb087 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -19,7 +19,6 @@
 #define CONFIG_OMAP			/* in a TI OMAP core */
 
 #define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index 285208b81429..ad5bbd4d78aa 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -20,7 +20,6 @@
 #define CONFIG_TI814X
 #define CONFIG_SYS_NO_FLASH
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 #include <asm/arch/omap.h>
 
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 08033e2d8774..e4f548736a21 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -14,7 +14,6 @@
 #define CONFIG_TI816X
 #define CONFIG_SYS_NO_FLASH
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 #define CONFIG_ARCH_CPU_INIT
 
diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h
index 7548170afcf7..6d9d4b2d97ab 100644
--- a/include/configs/ti_armv7_omap.h
+++ b/include/configs/ti_armv7_omap.h
@@ -14,7 +14,6 @@
 
 /* Common defines for all OMAP architecture based SoCs */
 #define CONFIG_OMAP
-#define CONFIG_OMAP_COMMON
 
 /* I2C IP block */
 #define CONFIG_SYS_OMAP24_I2C_SPEED	100000
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 28c34551564e..0a003e352fce 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -19,7 +19,6 @@
 /* High Level Configuration Options */
 #define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_OMAP			/* in a TI OMAP core */
-#define CONFIG_OMAP_COMMON
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
 #define CONFIG_ARM_ERRATA_430973
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot,1/3] arm: Introduce ARCH_OMAP2
  2016-11-08  2:34 ` [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2 Tom Rini
@ 2016-11-22  2:51   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-11-22  2:51 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 07, 2016 at 09:34:53PM -0500, Tom Rini wrote:

> To start consolidating various TI-related code, introduce the ARCH_OMAP2
> symbol.  While we have removed omap2-specific boards some time ago,
> matching up with the kernel naming here will help overall.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161121/d4d4e88c/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms
  2016-11-08  2:34 ` [U-Boot] [PATCH 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms Tom Rini
@ 2016-11-22  2:53   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-11-22  2:53 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 07, 2016 at 09:34:54PM -0500, Tom Rini wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161121/8b9205ef/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [U-Boot, 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2
  2016-11-08  2:34 ` [U-Boot] [PATCH 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2 Tom Rini
@ 2016-11-22  2:53   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2016-11-22  2:53 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 07, 2016 at 09:34:55PM -0500, Tom Rini wrote:

> With the move to arch/arm/mach-omap2 there are now very few uses of
> CONFIG_OMAP_COMMON and further they can all be replaced with
> CONFIG_ARCH_OMAP2, so do so.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161121/0e06180e/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-11-22  2:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08  2:34 [U-Boot] [PATCH 0/3] arm: Move TI/omap related code to arch/arm/mach-omap2 Tom Rini
2016-11-08  2:34 ` [U-Boot] [PATCH 1/3] arm: Introduce ARCH_OMAP2 Tom Rini
2016-11-22  2:51   ` [U-Boot] [U-Boot,1/3] " Tom Rini
2016-11-08  2:34 ` [U-Boot] [PATCH 2/3] arm: Introduce arch/arm/mach-omap2 for OMAP2 derivative platforms Tom Rini
2016-11-22  2:53   ` [U-Boot] [U-Boot, " Tom Rini
2016-11-08  2:34 ` [U-Boot] [PATCH 3/3] TI: Remove CONFIG_OMAP_COMMON in favor of CONFIG_ARCH_OMAP2 Tom Rini
2016-11-22  2:53   ` [U-Boot] [U-Boot, " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox