From: Tom Rini <trini@konsulko.com>
Date: Sat, 7 Oct 2023 19:36:58 +0000 (-0400)
Subject: cmd/ti: Update Kconfig logic and Makefile recursion logic
X-Git-Tag: v2025.01-rc5-pxa1908~822^2
X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=1b377a9ffeb5bf5716f75d6f52bc3fe6a00adc8c;p=u-boot.git

cmd/ti: Update Kconfig logic and Makefile recursion logic

- Add some dependencies to CMD_DDR3 as this is only valid on some
  platforms (which tend to select it as well).
- The proper gate for going in to cmd/ti is not
  CONFIG_TI_COMMON_CMD_OPTIONS as nothing under there is controlled by
  that symbol but the general TI architecture options.

Signed-off-by: Tom Rini <trini@konsulko.com>
---

diff --git a/cmd/Makefile b/cmd/Makefile
index 83a4481cc9..44db5f2286 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -235,6 +235,11 @@ obj-$(CONFIG_X86) += x86/
 obj-$(CONFIG_CMD_MESON) += meson/
 
 obj-$(CONFIG_ARCH_MVEBU) += mvebu/
+
+# TI
+obj-$(CONFIG_ARCH_KEYSTONE) += ti/
+obj-$(CONFIG_ARCH_K3) += ti/
+obj-$(CONFIG_ARCH_OMAP2PLUS) += ti/
 endif # !CONFIG_SPL_BUILD
 
 obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o
@@ -244,8 +249,6 @@ obj-y += nvedit.o
 
 obj-$(CONFIG_CMD_BCM_EXT_UTILS) += broadcom/
 
-obj-$(CONFIG_TI_COMMON_CMD_OPTIONS) += ti/
-
 filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";")
 
 filechk_data_size = \
diff --git a/cmd/ti/Kconfig b/cmd/ti/Kconfig
index db557445a8..9442c9993c 100644
--- a/cmd/ti/Kconfig
+++ b/cmd/ti/Kconfig
@@ -2,6 +2,7 @@ menu "TI specific command line interface"
 
 config CMD_DDR3
 	bool "command for verifying DDR features"
+	depends on ARCH_KEYSTONE || DRA7XX
 	help
 	   Support for testing ddr3 on TI platforms. This command
 	   supports memory verification, memory comapre and ecc
diff --git a/cmd/ti/Makefile b/cmd/ti/Makefile
index 045593396b..87f85b2c23 100644
--- a/cmd/ti/Makefile
+++ b/cmd/ti/Makefile
@@ -1,9 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0+
 # Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
 
-obj- += dummy.o
-
-ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_CMD_DDR3) += ddr3.o
 obj-$(CONFIG_CMD_PD) += pd.o
-endif