[U-Boot] [PATCH 4/4] powerpc: Add LINK_OFF calls in early C-code.
Joakim Tjernlund
joakim.tjernlund at transmode.se
Sun Jan 9 21:48:47 CET 2011
Wolfgang Denk <wd at denx.de> wrote on 2011/01/09 21:29:04:
>
> Dear Joakim Tjernlund,
>
> In message <1292838435-14958-4-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> > Only these 2 call sites depends on fixups for my mpc8321 based
> > board.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > ---
> > arch/powerpc/cpu/mpc83xx/cpu_init.c | 2 +-
> > arch/powerpc/lib/board.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > index 7a1cae7..88d9dd8 100644
> > --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > @@ -507,7 +507,7 @@ int prt_83xx_rsr(void)
> > sep = " ";
> > for (i = 0; i < n; i++)
> > if (rsr & bits[i].mask) {
> > - printf("%s%s", sep, bits[i].desc);
> > + printf("%s%s", sep, LINK_OFF(bits[i].desc));
> > sep = ", ";
> > }
>
>
> Is my understanding correct that these changes are sufficient only for
> your board, and only for your current configuration? And that your
> code would break (resp. require more LINK_OFF fixups) if you would -
> for example - decide to enable CONFIG_DISPLAY_AER_FULL in your board
> configuration (cf. print_83xx_arb_event() above in the same source
> file) ?
It would break only if link address != load address. That is, if you
want to use my new CONFIG_SYS_TRUE_PIC feature and be able to load
u-boot at any address regardless of link address you would
have to add LINK_OFF calls into print_83xx_arb_event() too if
you want to use it.
>
> I object against such a fragile and insular approach.
Considering you were tempted to add my previous approach which
had LINK_OFF calls all over I don't see were this objection comes
from. Have you changed your mind?
Jocke
More information about the U-Boot
mailing list