]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: use CONFIG_SUPPORT_PASSING_ATAGS
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 3 Sep 2021 08:24:39 +0000 (10:24 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 24 Sep 2021 18:30:46 +0000 (14:30 -0400)
Simplify the bootm and the spl code by using the new config
CONFIG_SUPPORT_PASSING_ATAGS.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/include/asm/bootm.h
arch/nds32/include/asm/bootm.h
arch/nds32/lib/bootm.c
cmd/spl.c

index 27f183b93d6b13c9ca639804c711b6768becadfa..439e43c2d01773dc7a210eac6376f5d17d23fd9c 100644 (file)
 
 extern void udc_disconnect(void);
 
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-               defined(CONFIG_CMDLINE_TAG) || \
-               defined(CONFIG_INITRD_TAG) || \
-               defined(CONFIG_SERIAL_TAG) || \
-               defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
 # define BOOTM_ENABLE_TAGS             1
 #else
 # define BOOTM_ENABLE_TAGS             0
index 804f8581b6e7c9dc0a2967abd4406b166e0a2f9e..c956fdd49c94272468d4a90aaaebfc63cfdcd792 100644 (file)
 
 extern void udc_disconnect(void);
 
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-               defined(CONFIG_CMDLINE_TAG) || \
-               defined(CONFIG_INITRD_TAG) || \
-               defined(CONFIG_SERIAL_TAG) || \
-               defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
 # define BOOTM_ENABLE_TAGS             1
 #else
 # define BOOTM_ENABLE_TAGS             0
index a7c8978f23114f47fe0cfdc5af9caaf42a4a12ed..1c7f78569991990bf25f0b1a553273240822d0e0 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-       defined(CONFIG_CMDLINE_TAG) || \
-       defined(CONFIG_INITRD_TAG) || \
-       defined(CONFIG_SERIAL_TAG) || \
-       defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
 static void setup_start_tag(struct bd_info *bd);
 
 # ifdef CONFIG_SETUP_MEMORY_TAGS
@@ -38,7 +34,7 @@ static void setup_initrd_tag(struct bd_info *bd, ulong initrd_start,
 static void setup_end_tag(struct bd_info *bd);
 
 static struct tag *params;
-#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
+#endif /* CONFIG_SUPPORT_PASSING_ATAGS */
 
 int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
 {
@@ -82,11 +78,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
                }
 #endif
        } else if (BOOTM_ENABLE_TAGS) {
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-       defined(CONFIG_CMDLINE_TAG) || \
-       defined(CONFIG_INITRD_TAG) || \
-       defined(CONFIG_SERIAL_TAG) || \
-       defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
        setup_start_tag(bd);
 #ifdef CONFIG_SERIAL_TAG
        setup_serial_tag(&params);
@@ -127,11 +119,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
        return 1;
 }
 
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-       defined(CONFIG_CMDLINE_TAG) || \
-       defined(CONFIG_INITRD_TAG) || \
-       defined(CONFIG_SERIAL_TAG) || \
-       defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
 static void setup_start_tag(struct bd_info *bd)
 {
        params = (struct tag *)bd->bi_boot_params;
@@ -244,7 +232,7 @@ static void setup_end_tag(struct bd_info *bd)
        params->hdr.size = 0;
 }
 
-#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
+#endif /* CONFIG_SUPPORT_PASSING_ATAGS */
 
 static ulong get_sp(void)
 {
index 472703f8fe1542bf1215f852d927a78072ffadb0..8a2ded72be9ff7703426cc6df1bf66cf8933b465 100644 (file)
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -32,11 +32,7 @@ static const char **subcmd_list[] = {
                NULL,
        },
        [SPL_EXPORT_ATAGS] = (const char * []) {
-#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
-       defined(CONFIG_CMDLINE_TAG) || \
-       defined(CONFIG_INITRD_TAG) || \
-       defined(CONFIG_SERIAL_TAG) || \
-       defined(CONFIG_REVISION_TAG)
+#ifdef CONFIG_SUPPORT_PASSING_ATAGS
                "start",
                "loados",
 #ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH