public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Macpaul Lin <macpaul@andestech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] config.mk: add drivers as default include PATH
Date: Wed, 15 Dec 2010 15:27:29 +0800	[thread overview]
Message-ID: <1292398049-3606-1-git-send-email-macpaul@andestech.com> (raw)

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

             reply	other threads:[~2010-12-15  7:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15  7:27 Macpaul Lin [this message]
2010-12-15 10:53 ` [U-Boot] [PATCH] config.mk: add drivers as default include PATH 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292398049-3606-1-git-send-email-macpaul@andestech.com \
    --to=macpaul@andestech.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox