From: Wolfgang Denk Date: Wed, 15 Dec 2010 11:53:53 +0100 Subject: [U-Boot] [PATCH] config.mk: add drivers as default include PATH In-Reply-To: <1292398049-3606-1-git-send-email-macpaul@andestech.com> References: <1292398049-3606-1-git-send-email-macpaul@andestech.com> Message-ID: <20101215105353.06D13D172D3@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Macpaul Lin, In message <1292398049-3606-1-git-send-email-macpaul@andestech.com> you wrote: > 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. I don't understand what you mean. Do you have a specific example where anything like this actually happens? > 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. If this happens, these header files should be at some sufficiently common location? > Add this > CPPFLAGS += -I$(TOPDIR)/drivers > into the default include PATH will avoid such code > "#include "../../../../../drivers/mtd/flash.h" You should always stop, lean back and start thinking where you went wrong whenever you encounter something that starts like this: #include "../../../../../xxx This simply does not make sense. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Our way is peace. -- Septimus, the Son Worshiper, "Bread and Circuses", stardate 4040.7.