* [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS
@ 2021-09-03 8:24 Patrick Delaunay
2021-09-03 21:29 ` Tom Rini
2021-09-25 0:37 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2021-09-03 8:24 UTC (permalink / raw)
To: u-boot; +Cc: Patrick Delaunay, Rick Chen, Simon Glass, Tom Rini, U-Boot STM32
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>
---
This patch depends of Tom Rini patch [1] for CONFIG_SUPPORT_PASSING_ATAGS
addition.
[1] "arm: Disable ATAGs support"
https://patchwork.ozlabs.org/project/uboot/patch/20210830131632.18780-3-trini@konsulko.com/
sent in the patch-set
https://patchwork.ozlabs.org/project/uboot/list/?series=260161&state=*
Patrick
arch/arm/include/asm/bootm.h | 6 +-----
arch/nds32/include/asm/bootm.h | 6 +-----
arch/nds32/lib/bootm.c | 22 +++++-----------------
cmd/spl.c | 6 +-----
4 files changed, 8 insertions(+), 32 deletions(-)
diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h
index 27f183b93d..439e43c2d0 100644
--- a/arch/arm/include/asm/bootm.h
+++ b/arch/arm/include/asm/bootm.h
@@ -10,11 +10,7 @@
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
diff --git a/arch/nds32/include/asm/bootm.h b/arch/nds32/include/asm/bootm.h
index 804f8581b6..c956fdd49c 100644
--- a/arch/nds32/include/asm/bootm.h
+++ b/arch/nds32/include/asm/bootm.h
@@ -12,11 +12,7 @@
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
diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c
index 4cb0f530ae..ee0c2bc1a3 100644
--- a/arch/nds32/lib/bootm.c
+++ b/arch/nds32/lib/bootm.c
@@ -19,11 +19,7 @@
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(¶ms);
@@ -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,4 +232,4 @@ 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 */
diff --git a/cmd/spl.c b/cmd/spl.c
index 472703f8fe..8a2ded72be 100644
--- 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
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS
2021-09-03 8:24 [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS Patrick Delaunay
@ 2021-09-03 21:29 ` Tom Rini
2021-09-25 0:37 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-09-03 21:29 UTC (permalink / raw)
To: Patrick Delaunay; +Cc: u-boot, Rick Chen, Simon Glass, U-Boot STM32
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
On Fri, Sep 03, 2021 at 10:24:39AM +0200, Patrick Delaunay wrote:
> 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>
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS
2021-09-03 8:24 [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS Patrick Delaunay
2021-09-03 21:29 ` Tom Rini
@ 2021-09-25 0:37 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-09-25 0:37 UTC (permalink / raw)
To: Patrick Delaunay; +Cc: u-boot, Rick Chen, Simon Glass, U-Boot STM32
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
On Fri, Sep 03, 2021 at 10:24:39AM +0200, Patrick Delaunay wrote:
> 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>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-25 0:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 8:24 [PATCH] arm: use CONFIG_SUPPORT_PASSING_ATAGS Patrick Delaunay
2021-09-03 21:29 ` Tom Rini
2021-09-25 0:37 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).