From: Andrew Davis <afd@ti.com>
To: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
<u-boot@lists.denx.de>
Cc: Andrew Davis <afd@ti.com>
Subject: [PATCH 1/2] arm: mach-k3: Only build init files for SPL
Date: Fri, 15 Jul 2022 10:25:26 -0500 [thread overview]
Message-ID: <20220715152527.14205-1-afd@ti.com> (raw)
The content of these files are only used in SPL builds. The contents are
already ifdef for the same, remove that and only include the whole file
in the build when building for SPL.
Signed-off-by: Andrew Davis <afd@ti.com>
---
arch/arm/mach-k3/Makefile | 13 ++++++++-----
arch/arm/mach-k3/am625_init.c | 4 ----
arch/arm/mach-k3/am642_init.c | 2 --
arch/arm/mach-k3/am6_init.c | 2 --
arch/arm/mach-k3/j721e_init.c | 2 --
arch/arm/mach-k3/j721s2_init.c | 3 ---
6 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/arch/arm/mach-k3/Makefile b/arch/arm/mach-k3/Makefile
index 8459bef93b..e17ad22141 100644
--- a/arch/arm/mach-k3/Makefile
+++ b/arch/arm/mach-k3/Makefile
@@ -3,16 +3,19 @@
# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
# Lokesh Vutla <lokeshvutla@ti.com>
-obj-$(CONFIG_SOC_K3_AM6) += am6_init.o
-obj-$(CONFIG_SOC_K3_J721E) += j721e_init.o j721e/ j7200/
-obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o j721s2/
-obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
-obj-$(CONFIG_SOC_K3_AM625) += am625_init.o am62x/
+obj-$(CONFIG_SOC_K3_J721E) += j721e/ j7200/
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
+obj-$(CONFIG_SOC_K3_AM625) += am62x/
obj-$(CONFIG_ARM64) += arm64-mmu.o
obj-$(CONFIG_CPU_V7R) += r5_mpu.o lowlevel_init.o
obj-$(CONFIG_TI_SECURE_DEVICE) += security.o
obj-$(CONFIG_ARM64) += cache.o
ifeq ($(CONFIG_SPL_BUILD),y)
+obj-$(CONFIG_SOC_K3_AM6) += am6_init.o
+obj-$(CONFIG_SOC_K3_J721E) += j721e_init.o
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o
+obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
+obj-$(CONFIG_SOC_K3_AM625) += am625_init.o
obj-$(CONFIG_K3_LOAD_SYSFW) += sysfw-loader.o
endif
obj-y += common.o
diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
index 0d9525992b..25b68e057f 100644
--- a/arch/arm/mach-k3/am625_init.c
+++ b/arch/arm/mach-k3/am625_init.c
@@ -15,8 +15,6 @@
#include <dm/uclass-internal.h>
#include <dm/pinctrl.h>
-#if defined(CONFIG_SPL_BUILD)
-
/*
* This uninitialized global variable would normal end up in the .bss section,
* but the .bss is cleared between writing and reading this variable, so move
@@ -267,5 +265,3 @@ u32 spl_boot_device(void)
return bootmedia;
}
-
-#endif /* CONFIG_SPL_BUILD */
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index b16de9c9f0..8428322ed9 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -23,7 +23,6 @@
#include <mmc.h>
#include <dm/root.h>
-#if defined(CONFIG_SPL_BUILD)
#define MCU_CTRL_MMR0_BASE 0x04500000
#define CTRLMMR_MCU_RST_CTRL 0x04518170
@@ -348,7 +347,6 @@ u32 spl_boot_device(void)
else
return __get_backup_bootmedia(devstat);
}
-#endif
#if defined(CONFIG_SYS_K3_SPL_ATF)
diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index 7992918adc..6e833a6641 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -26,7 +26,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifdef CONFIG_SPL_BUILD
#ifdef CONFIG_K3_LOAD_SYSFW
#ifdef CONFIG_TI_SECURE_DEVICE
struct fwl_data main_cbass_fwls[] = {
@@ -359,7 +358,6 @@ u32 spl_boot_device(void)
else
return __get_backup_bootmedia(devstat);
}
-#endif
#ifdef CONFIG_SYS_K3_SPL_ATF
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index e56ca6d0f5..cb9f7eebec 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -24,7 +24,6 @@
#include <mmc.h>
#include <remoteproc.h>
-#ifdef CONFIG_SPL_BUILD
#ifdef CONFIG_K3_LOAD_SYSFW
#ifdef CONFIG_TI_SECURE_DEVICE
struct fwl_data cbass_hc_cfg0_fwls[] = {
@@ -384,7 +383,6 @@ u32 spl_boot_device(void)
else
return __get_backup_bootmedia(main_devstat);
}
-#endif
#ifdef CONFIG_SYS_K3_SPL_ATF
diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c
index 2e64e44a80..12da8136f9 100644
--- a/arch/arm/mach-k3/j721s2_init.c
+++ b/arch/arm/mach-k3/j721s2_init.c
@@ -22,8 +22,6 @@
#include <mmc.h>
#include <remoteproc.h>
-#ifdef CONFIG_SPL_BUILD
-
static void ctrl_mmr_unlock(void)
{
/* Unlock all WKUP_CTRL_MMR0 module registers */
@@ -255,7 +253,6 @@ u32 spl_boot_device(void)
else
return __get_backup_bootmedia(main_devstat);
}
-#endif
#define J721S2_DEV_MCU_RTI0 295
#define J721S2_DEV_MCU_RTI1 296
--
2.36.1
next reply other threads:[~2022-07-15 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 15:25 Andrew Davis [this message]
2022-07-15 15:25 ` [PATCH 2/2] arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654 Andrew Davis
2022-07-18 12:08 ` Tom Rini
2022-07-25 21:22 ` Tom Rini
2022-07-18 12:07 ` [PATCH 1/2] arm: mach-k3: Only build init files for SPL Tom Rini
2022-07-25 21:22 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220715152527.14205-1-afd@ti.com \
--to=afd@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox