Scott Wood <scottw...@freescale.com> wrote on 2010/11/23 21:17:12: > > On Tue, 23 Nov 2010 21:08:37 +0100 > Joakim Tjernlund <joakim.tjernl...@transmode.se> wrote: > > > Scott Wood <scottw...@freescale.com> wrote on 2010/11/23 20:32:32: > > > On Tue, 23 Nov 2010 19:48:48 +0100 > > > Joakim Tjernlund <joakim.tjernl...@transmode.se> wrote: > > > > > > > diff --git a/include/common.h b/include/common.h > > > > index 8bca04f..f257ea4 100644 > > > > --- a/include/common.h > > > > +++ b/include/common.h > > > > @@ -94,6 +94,9 @@ typedef volatile unsigned char vu_char; > > > > #ifdef CONFIG_MPC83xx > > > > #include <mpc83xx.h> > > > > #include <asm/immap_83xx.h> > > > > +const void * link_off(const void *); > > > > +#else > > > > +#define link_off(x) ((const void *)(x)) > > > > #endif > > > > > > What is special about 83xx? > > > > Nothing, just it is the first one. > > > > > > If it's just that 83xx is the only one that this type of relocation has > > > been enabled on so far, define a symbol for that. > > > > there is a > > #define LINK_OFF(x) ((__typeof__(x))link_off(x)) > > already but I am guessing you mean something else. > > Perhaps a dummy link_off for other targets? Don't think > > that is any better. > > I mean instead of this: > > #ifdef CONFIG_MPC83xx > ...unrelated stuff... > const void *link_off(const void *ptr); > #else > #define link_off(x) ((const void *)(x)); > #endif > > do something like this: > > #ifdef CONFIG_RELOC_PIC > const void *link_off(const void *ptr); > #else > #define link_off(x) ((const void *)(x)); > #endif > > ...with CONFIG_RELOC_PIC defined in a board config file and also > controlling whether this mechanism is enabled at all. Boards could > enable it as they verify that they have the proper manual relocations > (or just leave it off, if they don't think it's worth it) -- including > non-83xx targets if they provide link_off() and do whatever else is > required.
Ah yes, will be in my cleanup later on. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot