public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] common: add ifdefs around bouncebuf.c body
@ 2012-11-05 23:04 Stephen Warren
  2012-11-05 23:04 ` [U-Boot] [PATCH 2/3] common: rework bouncebuf implementation Stephen Warren
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Stephen Warren @ 2012-11-05 23:04 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@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@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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-11-08  1:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 23:04 [U-Boot] [PATCH 1/3] common: add ifdefs around bouncebuf.c body Stephen Warren
2012-11-05 23:04 ` [U-Boot] [PATCH 2/3] common: rework bouncebuf implementation Stephen Warren
2012-11-05 23:54   ` Simon Glass
2012-11-06 18:44     ` Stephen Warren
2012-11-06 19:30     ` Stephen Warren
2012-11-05 23:04 ` [U-Boot] [PATCH 3/3] mmc: tegra: use bounce buffer APIs Stephen Warren
2012-11-06  0:00   ` Simon Glass
2012-11-06 18:50     ` Stephen Warren
2012-11-06 19:03       ` Simon Glass
2012-11-05 23:47 ` [U-Boot] [PATCH 1/3] common: add ifdefs around bouncebuf.c body Simon Glass
2012-11-06 18:04   ` Stephen Warren
2012-11-06  0:54 ` Marek Vasut
2012-11-06 18:07   ` Stephen Warren
2012-11-06 22:43     ` Marek Vasut
2012-11-06 22:49       ` Stephen Warren
2012-11-06 22:57         ` Marek Vasut
2012-11-06 23:13           ` Stephen Warren
2012-11-07 13:21             ` Marek Vasut
2012-11-07 17:00               ` Stephen Warren
2012-11-08  1:20                 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox