All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code
@ 2022-09-11 16:10 Ovidiu Panait
  2022-09-11 16:10 ` [PATCH 2/4] common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c Ovidiu Panait
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Ovidiu Panait @ 2022-09-11 16:10 UTC (permalink / raw)
  To: u-boot
  Cc: Ovidiu Panait, Holger Brunck, Marek Vasut, Michal Simek,
	Rick Chen, Simon Glass, Wolfgang Denk

The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently
commented out, so there are no users for this macro:
  #if 1
    #define DECLARE_GLOBAL_DATA_PTR   register volatile gd_t *gd asm ("r2")
  #else
    #define XTRN_DECLARE_GLOBAL_DATA_PTR   extern
    #define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \
                                        gd_t *gd
  #endif

Remove all references.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
---

 arch/powerpc/include/asm/global_data.h |  6 ------
 common/board_f.c                       | 11 -----------
 2 files changed, 17 deletions(-)

diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index 6709e692e6..6ed21c781f 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -92,12 +92,6 @@ struct arch_global_data {
 
 #include <asm-generic/global_data.h>
 
-#if 1
 #define DECLARE_GLOBAL_DATA_PTR     register volatile gd_t *gd asm ("r2")
-#else /* We could use plain global data, but the resulting code is bigger */
-#define XTRN_DECLARE_GLOBAL_DATA_PTR	extern
-#define DECLARE_GLOBAL_DATA_PTR     XTRN_DECLARE_GLOBAL_DATA_PTR \
-				    gd_t *gd
-#endif
 
 #endif /* __ASM_GBL_DATA_H */
diff --git a/common/board_f.c b/common/board_f.c
index 18e2246733..f4238d4c90 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -57,18 +57,7 @@
 #include <dm/root.h>
 #include <linux/errno.h>
 
-/*
- * Pointer to initial global data area
- *
- * Here we initialize it if needed.
- */
-#ifdef XTRN_DECLARE_GLOBAL_DATA_PTR
-#undef	XTRN_DECLARE_GLOBAL_DATA_PTR
-#define XTRN_DECLARE_GLOBAL_DATA_PTR	/* empty = allocate here */
-DECLARE_GLOBAL_DATA_PTR = (gd_t *)(CONFIG_SYS_INIT_GD_ADDR);
-#else
 DECLARE_GLOBAL_DATA_PTR;
-#endif
 
 /*
  * TODO(sjg@chromium.org): IMO this code should be
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-12 16:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-11 16:10 [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Ovidiu Panait
2022-09-11 16:10 ` [PATCH 2/4] common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c Ovidiu Panait
2022-09-12 13:34   ` Simon Glass
2022-09-11 16:10 ` [PATCH 3/4] common/board_f: introduce arch_setup_dest_addr() Ovidiu Panait
2022-09-12 13:34   ` Simon Glass
2022-09-11 16:10 ` [PATCH 4/4] common/board_f: drop ifdefs around header includes Ovidiu Panait
2022-09-12 13:34   ` Simon Glass
2022-09-12  9:22 ` [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Wolfgang Denk
2022-09-12 16:30   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.