
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