
Hi Dave Liu,
The following patch adds a configuration to do "low boot" (HRCW.BMS = 0) as well as "high boot" (HRCW.BMS = 1).
Many people, myself included :o) prefer to boot out of low memory. It has an added benefit that, if you screw up the image of of u-boot in low memory, you can switch SW9.3 FCFG and boot using the BCSR, which "high boots" (assuming you smart enough to keep a valid u-boot image at 0xFFF00000).
The patch is against the top of the denx.de repository (thanks, Wolfgang, for pulling the fsl patches).
gvb
Add a configuration option to "low boot" (boot memory space 0x00000000) as well as the default "high boot" (0xFFF00000).
Signed-off-by: Jerry Van Baren vanbaren@cideas.com --- Makefile | 18 +++++++++++++----- board/mpc8360emds/config.mk | 7 ++++++- include/configs/MPC8360EMDS.h | 14 ++++++++++++-- 3 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile index d2534ab..684b862 100644 --- a/Makefile +++ b/Makefile @@ -1595,27 +1595,35 @@ MPC8349EMDS_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349emds
MPC8360EMDS_config \ +MPC8360EMDS_lowboot_config \ MPC8360EMDS_HOST_33_config \ +MPC8360EMDS_HOST_33_lowboot_config \ MPC8360EMDS_HOST_66_config \ +MPC8360EMDS_HOST_66_lowboot_config \ +MPC8360EMDS_SLAVE_lowboot_config \ MPC8360EMDS_SLAVE_config: unconfig @echo "" >include/config.h ; \ if [ "$(findstring _HOST_,$@)" ] ; then \ - echo -n "... PCI HOST " ; \ + echo -n "...PCI HOST" ; \ echo "#define CONFIG_PCI" >>include/config.h ; \ fi ; \ if [ "$(findstring _SLAVE_,$@)" ] ; then \ - echo "...PCI SLAVE 66M" ; \ + echo "...PCI SLAVE 66M..." ; \ echo "#define CONFIG_PCI" >>include/config.h ; \ echo "#define CONFIG_PCISLAVE" >>include/config.h ; \ fi ; \ if [ "$(findstring _33_,$@)" ] ; then \ - echo -n "...33M ..." ; \ + echo -n " 33M..." ; \ echo "#define PCI_33M" >>include/config.h ; \ fi ; \ if [ "$(findstring _66_,$@)" ] ; then \ - echo -n "...66M..." ; \ + echo -n " 66M..." ; \ echo "#define PCI_66M" >>include/config.h ; \ - fi ; + fi ; \ + if [ "$(findstring lowboot_,$@)" ] ; then \ + echo -n " (lowboot) " ; \ + echo "TEXT_BASE = 0xFE000000" >$(obj)board/mpc8360emds/config.tmp ; \ + fi @$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds
MPC8349ITX_config: unconfig diff --git a/board/mpc8360emds/config.mk b/board/mpc8360emds/config.mk index 9ace886..dd560cc 100644 --- a/board/mpc8360emds/config.mk +++ b/board/mpc8360emds/config.mk @@ -25,4 +25,9 @@ # MPC8360EMDS #
-TEXT_BASE = 0xFE000000 +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE +## Default: boot high +TEXT_BASE = 0xFFF00000 +endif diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h index 8ad6551..c4fff07 100644 --- a/include/configs/MPC8360EMDS.h +++ b/include/configs/MPC8360EMDS.h @@ -47,6 +47,16 @@ #endif
/* + * Figure out if we are booting low or high. Flash and I2C can boot either + * low or high, the BCSR is hardwired to boot high. + */ +#if (TEXT_BASE != 0xFFF00000) /* Boot low (flash HRCW) */ +# define BOOT_MEMORY_SPACE HRCWH_FROM_0X00000100 +#else +# define BOOT_MEMORY_SPACE HRCWH_FROM_0XFFF00100 +#endif + +/* * Hardware Reset Configuration Word */ #define CFG_HRCW_LOW (\ @@ -65,7 +75,7 @@ HRCWH_PCI1_ARBITER_DISABLE |\ HRCWH_PCICKDRV_DISABLE |\ HRCWH_CORE_ENABLE |\ - HRCWH_FROM_0XFFF00100 |\ + BOOT_MEMORY_SPACE |\ HRCWH_BOOTSEQ_DISABLE |\ HRCWH_SW_WATCHDOG_DISABLE |\ HRCWH_ROM_LOC_LOCAL_16BIT) @@ -75,7 +85,7 @@ HRCWH_PCI1_ARBITER_ENABLE |\ HRCWH_PCICKDRV_ENABLE |\ HRCWH_CORE_ENABLE |\ - HRCWH_FROM_0X00000100 |\ + BOOT_MEMORY_SPACE |\ HRCWH_BOOTSEQ_DISABLE |\ HRCWH_SW_WATCHDOG_DISABLE |\ HRCWH_ROM_LOC_LOCAL_16BIT)