public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] config.mk: add drivers as default include PATH
@ 2010-12-15  7:27 Macpaul Lin
  2010-12-15 10:53 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Macpaul Lin @ 2010-12-15  7:27 UTC (permalink / raw)
  To: u-boot

Some device drivers and their header files will
invoke some definitions for assembly code. If a
device is required to be initilized in board.S
or in lowlevel_init.S, such memory controller,
flash controller, power control units. Sometimes
we both need to access these devices in bootstrap
process and later in normal operation period.

Hence the definitions of these drivers in the
header files is required to be found in cpu and
board folders. Moreover, these devices is usually
built into multiple different SoC with different
architectures. So the header files should be able
to be shared among the SoCs.

Add this
	CPPFLAGS += -I$(TOPDIR)/drivers
into the default include PATH will avoid such code
	"#include "../../../../../drivers/mtd/flash.h"

So this patch is suggested.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
---
 config.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 19e0a6e..52f2280 100644
--- a/config.mk
+++ b/config.mk
@@ -178,6 +178,7 @@ ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif
 
+CPPFLAGS += -I$(TOPDIR)/drivers
 CPPFLAGS += -I$(TOPDIR)/include
 CPPFLAGS += -fno-builtin -ffreestanding -nostdinc	\
 	-isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS)
-- 
1.7.3.2

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

end of thread, other threads:[~2010-12-16 13:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-15  7:27 [U-Boot] [PATCH] config.mk: add drivers as default include PATH Macpaul Lin
2010-12-15 10:53 ` Wolfgang Denk
2010-12-16 10:10   ` Macpaul Lin
2010-12-16 12:18     ` Wolfgang Denk
2010-12-16 12:52       ` Macpaul Lin
2010-12-16 13:10       ` Albert ARIBAUD

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