[U-Boot] PLATFORM_CPPFLAGS ?

Why do we define the same macros in config.mk and in the board header file?
config.mk: PLATFORM_CPPFLAGS += -DCONFIG_E500=1 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1 PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
MPC8572DS.h: #define CONFIG_BOOKE 1 /* BOOKE */ #define CONFIG_E500 1 /* BOOKE e500 family */ #define CONFIG_MPC85xx 1 /* MPC8540/60/55/41/48 */ #define CONFIG_MPC8572 1
Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.

Dear Timur Tabi,
In message 4A7B1CFB.3030905@freescale.com you wrote:
Why do we define the same macros in config.mk and in the board header file?
We == Freescale here? I agree - I never understood this either.
Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.
Yes, this is redundant, and IMHO bogus. I always thought it was a local pastime at Freescale...
Best regards,
Wolfgang Denk

On Aug 6, 2009, at 2:40 PM, Wolfgang Denk wrote:
Dear Timur Tabi,
In message 4A7B1CFB.3030905@freescale.com you wrote:
Why do we define the same macros in config.mk and in the board header file?
We == Freescale here? I agree - I never understood this either.
Isn't it redundant to have these entries in config.mk? We seem to be doing this more and more, but config.mk is always board-specific, just like MPC8572DS.h.
Yes, this is redundant, and IMHO bogus. I always thought it was a local pastime at Freescale...
I think its a copy/paste thing that's just propagated w/o anyone asking why.
We probably based the first 85xx port on a 440 seeing as the 440's seem to do the following:
board/amcc/ebony/config.mk:PLATFORM_CPPFLAGS += -DCONFIG_440=1
any reason the 440's platforms do this?
- k

Dear Kumar Gala,
In message AD67FA15-854B-4862-B4C6-6D4D11059C84@kernel.crashing.org you wrote:
I think its a copy/paste thing that's just propagated w/o anyone asking why.
The Wisdom of Crowds in action ;-)
We probably based the first 85xx port on a 440 seeing as the 440's seem to do the following:
board/amcc/ebony/config.mk:PLATFORM_CPPFLAGS += -DCONFIG_440=1
any reason the 440's platforms do this?
There is probably a reason. Most probably not a good one, though ;-)
Best regards,
Wolfgang Denk
participants (3)
-
Kumar Gala
-
Timur Tabi
-
Wolfgang Denk