Hi Stephen, On Mon, Nov 5, 2012 at 3:04 PM, Stephen Warren <[email protected]> wrote: > From: Stephen Warren <[email protected]> > > If a U-Boot config file enables CONFIG_BOUNCE_BUFFER only for the main > U-Boot build and not for the SPL, then config.mk will contain > CONFIG_BOUNCE_BUFFER=y, so common/Makefile will build bouncebuf.c for > both the SPL and main U-Boot, but config.h won't set CONFIG_BOUNCE_BUFFER > for the SPL, so bouncebuf.h will provide static inline functions, which > will conflict with the compiled bouncebuf.c. Solve this by guarding the > body of bouncebuf.c with the ifdef to avoid conflicts. > > Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]> This seems like a problem that might come up in other areas. I wonder if SPL should have its own autoconf.mk? > --- > This series is based on u-boot/master. I've CC'd the MMC and Tegra > maintainers since they'll presumably need to ack the changes in order for > these patches to all be applied in one place. Marek seems to be the main > MXS MMC maintainer as far as I can tell. > > common/bouncebuf.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/common/bouncebuf.c b/common/bouncebuf.c > index 4f827f8..ffd3c90 100644 > --- a/common/bouncebuf.c > +++ b/common/bouncebuf.c > @@ -27,6 +27,7 @@ > #include <errno.h> > #include <bouncebuf.h> > > +#ifdef CONFIG_BOUNCE_BUFFER > static int addr_aligned(void *data, size_t len) > { > const ulong align_mask = ARCH_DMA_MINALIGN - 1; > @@ -90,3 +91,4 @@ int bounce_buffer_stop(void **data, size_t len, void > **backup, uint8_t flags) > > return 0; > } > +#endif > -- > 1.7.0.4 > Regards, Simon _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

