[U-Boot] [PATCH 1/3] common: add ifdefs around bouncebuf.c body
Stephen Warren
swarren at wwwdotorg.org
Tue Nov 6 00:04:00 CET 2012
From: Stephen Warren <swarren at nvidia.com>
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 <swarren at nvidia.com>
---
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
More information about the U-Boot
mailing list