[PATCH v2 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code

Simon Glass sjg at chromium.org
Wed Sep 14 19:09:59 CEST 2022


On Tue, 13 Sept 2022 at 12:31, Ovidiu Panait <ovpanait at gmail.com> wrote:
>
> 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 /* 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
>
> Remove all references to this macro, but add a documentation note regarding
> the possibility of using plain global data for the GD pointer.
>
> Signed-off-by: Ovidiu Panait <ovpanait at gmail.com>
> ---
>
> Changes in v2:
> - update global data documentation with the info provided by Wolfgang
>
>  arch/powerpc/include/asm/global_data.h |  6 ------
>  common/board_f.c                       | 11 -----------
>  doc/develop/global_data.rst            |  5 +++++
>  3 files changed, 5 insertions(+), 17 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list