
On Aug 4, 2011, at 6:03 PM, Timur Tabi wrote:
Introduce the CONFIG_SYS_CCSRBAR_PHYS_HIGH and CONFIG_SYS_CCSRBAR_PHYS_LOW macros, which contain the high and low portions of CONFIG_SYS_CCSRBAR_PHYS. This is necessary for the assembly-language code that relocates CCSR, since the assembler does not understand 64-bit constants.
CONFIG_SYS_CCSRBAR_PHYS is automatically defined from the CONFIG_SYS_CCSRBAR_PHYS_HIGH and CONFIG_SYS_CCSRBAR_PHYS_LOW macros, so it should not be defined in a board header file. Similarly, CONFIG_SYS_CCSRBAR_DEFAULT is defined for each SOC in config_mpc85xx.h, so it should also not be defined in the board header file.
CONFIG_SYS_CCSR_DO_NOT_RELOCATE is a "short-cut" macro that guarantees that CONFIG_SYS_CCSRBAR_PHYS is set to the same value as CONFIG_SYS_CCSRBAR_DEFAULT, and so CCSR will not be relocated.
Since CONFIG_SYS_CCSRBAR_DEFAULT is locked to a fixed value, multi-stage U-Boot builds (e.g. NAND) are required to relocate CCSR only during the last stage (i.e. the "real" U-Boot). All other stages should define CONFIG_SYS_CCSR_DO_NOT_RELOCATE to ensure that CCSR is not relocated.
README is updated with descriptions of all the CONFIG_SYS_CCSRBAR_xxx macros.
Signed-off-by: Timur Tabi timur@freescale.com
v3: fixed default CCSR address for the P1012.
README | 37 +++++++++++++++++++++++++ arch/powerpc/include/asm/config_mpc85xx.h | 39 ++++++++++++++++++++++++++ include/configs/MPC8536DS.h | 17 ++--------- include/configs/MPC8540ADS.h | 11 +------ include/configs/MPC8541CDS.h | 10 +----- include/configs/MPC8544DS.h | 10 +----- include/configs/MPC8548CDS.h | 10 +----- include/configs/MPC8555CDS.h | 10 +----- include/configs/MPC8560ADS.h | 11 +------ include/configs/MPC8568MDS.h | 10 +----- include/configs/MPC8569MDS.h | 15 ++-------- include/configs/MPC8572DS.h | 17 ++--------- include/configs/P1022DS.h | 14 +-------- include/configs/P1023RDS.h | 9 ------ include/configs/P1_P2_RDB.h | 19 ++----------- include/configs/P2020DS.h | 14 +-------- include/configs/P2041RDB.h | 14 --------- include/configs/SBC8540.h | 14 --------- include/configs/TQM85xx.h | 16 +++------- include/configs/corenet_ds.h | 13 --------- include/configs/mpq101.h | 16 +--------- include/configs/sbc8548.h | 10 +----- include/configs/sbc8560.h | 14 --------- include/configs/socrates.h | 10 +----- include/configs/stxgp3.h | 7 +--- include/configs/stxssa.h | 8 ++--- include/configs/xpedite520x.h | 10 +----- include/configs/xpedite537x.h | 10 +----- include/configs/xpedite550x.h | 10 +----- include/mpc85xx.h | 42 +++++++++++++++++++++++++++++ 30 files changed, 170 insertions(+), 277 deletions(-)
Why didn't we do in include/mpc85xx.h:
#ifndef CONFIG_SYS_CCSRBAR_PHYS_LOW #define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR #endif
Thus removing that line from every board file?
- k