diff mbox series

[U-Boot,v2,04/13] arm: keystone: Move cmd_ddr3 to a common place

Message ID 20171229061758.17983-5-lokeshvutla@ti.com
State Accepted
Delegated to: Tom Rini
Headers show
Series arm: am57xx: Add support for am574-idk | expand

Commit Message

Lokesh Vutla Dec. 29, 2017, 6:17 a.m. UTC
Move cmd_ddr3 to cmd/ti in order to make
it build for non-keystone TI platforms.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-keystone/Kconfig                |  4 ++++
 arch/arm/mach-keystone/Makefile               |  1 -
 cmd/Kconfig                                   |  2 ++
 cmd/Makefile                                  |  1 +
 cmd/ti/Kconfig                                | 10 ++++++++++
 cmd/ti/Makefile                               | 10 ++++++++++
 {arch/arm/mach-keystone => cmd/ti}/cmd_ddr3.c |  5 ++---
 7 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 cmd/ti/Kconfig
 create mode 100644 cmd/ti/Makefile
 rename {arch/arm/mach-keystone => cmd/ti}/cmd_ddr3.c (98%)

Comments

Tom Rini Jan. 19, 2018, 9:12 p.m. UTC | #1
On Fri, Dec 29, 2017 at 11:47:49AM +0530, Lokesh Vutla wrote:

> Move cmd_ddr3 to cmd/ti in order to make
> it build for non-keystone TI platforms.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

After re-renaming to cmd/ti/ddr3.c, applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index cababdba52..d24596eccb 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -7,16 +7,19 @@  choice
 config TARGET_K2HK_EVM
 	bool "TI Keystone 2 Kepler/Hawking EVM"
 	select SPL_BOARD_INIT if SPL
+	select CMD_DDR3
 	imply DM_I2C
 
 config TARGET_K2E_EVM
 	bool "TI Keystone 2 Edison EVM"
 	select SPL_BOARD_INIT if SPL
+	select CMD_DDR3
 	imply DM_I2C
 
 config TARGET_K2L_EVM
 	bool "TI Keystone 2 Lamar EVM"
 	select SPL_BOARD_INIT if SPL
+	select CMD_DDR3
 	imply DM_I2C
 
 config TARGET_K2G_EVM
@@ -24,6 +27,7 @@  config TARGET_K2G_EVM
         select BOARD_LATE_INIT
 	select SPL_BOARD_INIT if SPL
         select TI_I2C_BOARD_DETECT
+	select CMD_DDR3
 	imply DM_I2C
 
 endchoice
diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile
index 8253a3bcc1..3e076e12ec 100644
--- a/arch/arm/mach-keystone/Makefile
+++ b/arch/arm/mach-keystone/Makefile
@@ -13,7 +13,6 @@  ifndef CONFIG_SPL_BUILD
 obj-y	+= cmd_clock.o
 obj-y	+= cmd_mon.o
 obj-y	+= cmd_poweroff.o
-obj-y	+= cmd_ddr3.o
 endif
 obj-y	+= msmc.o
 obj-y	+= ddr3.o
diff --git a/cmd/Kconfig b/cmd/Kconfig
index c033223526..d2fae4bc0b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1176,6 +1176,8 @@  config CMD_UUID
 
 endmenu
 
+source "cmd/ti/Kconfig"
+
 config CMD_BOOTSTAGE
 	bool "Enable the 'bootstage' command"
 	depends on BOOTSTAGE
diff --git a/cmd/Makefile b/cmd/Makefile
index 00e38696da..8b34535995 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -156,6 +156,7 @@  endif # !CONFIG_SPL_BUILD
 obj-y += nvedit.o
 
 obj-$(CONFIG_ARCH_MVEBU) += mvebu/
+obj-$(CONFIG_TI_COMMON_CMD_OPTIONS) += ti/
 
 filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";")
 
diff --git a/cmd/ti/Kconfig b/cmd/ti/Kconfig
new file mode 100644
index 0000000000..efeff0d482
--- /dev/null
+++ b/cmd/ti/Kconfig
@@ -0,0 +1,10 @@ 
+menu "TI specific command line interface"
+
+config CMD_DDR3
+	bool "command for verifying DDR features"
+	help
+	   Support for testing ddr3 on TI platforms. This command
+	   supports memory verification, memory comapre and ecc
+	   verification if supported.
+
+endmenu
diff --git a/cmd/ti/Makefile b/cmd/ti/Makefile
new file mode 100644
index 0000000000..d1c647d0b3
--- /dev/null
+++ b/cmd/ti/Makefile
@@ -0,0 +1,10 @@ 
+# Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj- += dummy.o
+
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_CMD_DDR3) += cmd_ddr3.o
+endif
diff --git a/arch/arm/mach-keystone/cmd_ddr3.c b/cmd/ti/cmd_ddr3.c
similarity index 98%
rename from arch/arm/mach-keystone/cmd_ddr3.c
rename to cmd/ti/cmd_ddr3.c
index d3eab0711c..b6435a43f4 100644
--- a/arch/arm/mach-keystone/cmd_ddr3.c
+++ b/cmd/ti/cmd_ddr3.c
@@ -1,8 +1,7 @@ 
 /*
- * Keystone2: DDR3 test commands
+ * EMIF: DDR3 test commands
  *
- * (C) Copyright 2012-2014
- *     Texas Instruments Incorporated, <www.ti.com>
+ * Copyright (C) 2012-2017 Texas Instruments Incorporated, <www.ti.com>
  *
  * SPDX-License-Identifier:     GPL-2.0+
  */