]> git.sur5r.net Git - u-boot/commitdiff
On-chip ROM boot: MPC8536DS support
authorMingkai Hu <Mingkai.hu@freescale.com>
Wed, 23 Sep 2009 07:20:38 +0000 (15:20 +0800)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 30 Sep 2009 13:42:11 +0000 (08:42 -0500)
The MPC8536E is capable of booting from the on-chip ROM - boot from
eSDHC and boot from eSPI. When power on, the porcessor excutes the
ROM code to initialize the eSPI/eSDHC controller, and loads the mian
U-Boot image from the memory device that interfaced to the controller,
such as the SDCard or SPI EEPROM, to the target memory, e.g. SDRAM or
L2SRAM, then boot from it.

The memory device should contain a specific data structure with control
word and config word at the fixed address. The config word direct the
process how to config the memory device, and the control word direct
the processor where to find the image on the memory device, or where
copy the main image to. The user can use any method to store the data
structure to the memory device, only if store it on the assigned address.

The on-chip ROM code will map the whole 4GB address space by setting
entry0 in the TLB1, so the main image need to switch to Address space 1
to disable this mapping and map the address space again.

This patch implements loading the mian U-Boot image into L2SRAM, so
the image can configure the system memory by using SPD EEPROM.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
MAKEALL
Makefile
board/freescale/mpc8536ds/config.mk
include/configs/MPC8536DS.h

diff --git a/MAKEALL b/MAKEALL
index 0249058bfcd7fa9daa57193f0c6c009f3876ec5c..8ff6987a2c1898d5b0d794c7c8a4bcf8b0b0f47b 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -388,6 +388,8 @@ LIST_85xx="         \
        ATUM8548        \
        MPC8536DS       \
        MPC8536DS_NAND  \
+       MPC8536DS_SDCARD        \
+       MPC8536DS_SPIFLASH      \
        MPC8540ADS      \
        MPC8540EVAL     \
        MPC8541CDS      \
index 781db22aaecbb7ed0aaf93a1902fd06144b0dedf..c8a883cf086a6e617766cabc631b2b30f501b991 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2447,6 +2447,8 @@ ATUM8548_config:  unconfig
        @$(MKCONFIG) $(@:_config=) ppc mpc85xx atum8548
 
 MPC8536DS_NAND_config \
+MPC8536DS_SDCARD_config \
+MPC8536DS_SPIFLASH_config \
 MPC8536DS_36BIT_config \
 MPC8536DS_config:       unconfig
        @$(MKCONFIG) -t $(@:_config=) MPC8536DS ppc mpc85xx mpc8536ds freescale
index d6490b59ca318817ce87f2bc28955bc2af73280b..e38af731bed519855f53c59119454c68de0056f0 100644 (file)
@@ -30,8 +30,20 @@ LDSCRIPT := $(TOPDIR)/cpu/$(CPU)/u-boot-nand.lds
 endif
 endif
 
+ifeq ($(CONFIG_MK_SDCARD), y)
+TEXT_BASE = $(CONFIG_RAMBOOT_TEXT_BASE)
+RESET_VECTOR_ADDRESS = 0xf8fffffc
+endif
+
+ifeq ($(CONFIG_MK_SPIFLASH), y)
+TEXT_BASE = $(CONFIG_RAMBOOT_TEXT_BASE)
+RESET_VECTOR_ADDRESS = 0xf8fffffc
+endif
+
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
 
+ifndef RESET_VECTOR_ADDRESS
 RESET_VECTOR_ADDRESS = 0xeffffffc
+endif
index af369867b95052870f86fef738d9366811734ff0..a8472754622fd20d45224bd0a674544f8c466a7b 100644 (file)
 #define CONFIG_RAMBOOT_TEXT_BASE       0xf8f82000
 #endif
 
+#ifdef CONFIG_MK_SDCARD
+#define CONFIG_RAMBOOT_SDCARD          1
+#define CONFIG_RAMBOOT_TEXT_BASE       0xf8f80000
+#endif
+
+#ifdef CONFIG_MK_SPIFLASH
+#define CONFIG_RAMBOOT_SPIFLASH                1
+#define CONFIG_RAMBOOT_TEXT_BASE       0xf8f80000
+#endif
+
 /* High Level Configuration Options */
 #define CONFIG_BOOKE           1       /* BOOKE */
 #define CONFIG_E500            1       /* BOOKE e500 family */
@@ -236,7 +246,8 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 
 #define CONFIG_SYS_MONITOR_BASE        TEXT_BASE       /* start of monitor */
 
-#if defined(CONFIG_SYS_SPL) || defined(CONFIG_RAMBOOT_NAND)
+#if defined(CONFIG_SYS_SPL) || defined(CONFIG_RAMBOOT_NAND) \
+       || defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH)
 #define CONFIG_SYS_RAMBOOT
 #else
 #undef CONFIG_SYS_RAMBOOT
@@ -635,6 +646,10 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
        #define CONFIG_ENV_IS_IN_NAND   1
        #define CONFIG_ENV_SIZE         CONFIG_SYS_NAND_BLOCK_SIZE
        #define CONFIG_ENV_OFFSET ((512 * 1024) + CONFIG_SYS_NAND_BLOCK_SIZE)
+#elif defined(CONFIG_RAMBOOT_SDCARD) || defined(CONFIG_RAMBOOT_SPIFLASH)
+       #define CONFIG_ENV_IS_NOWHERE   1       /* Store ENV in memory only */
+       #define CONFIG_ENV_ADDR         (CONFIG_SYS_MONITOR_BASE - 0x1000)
+       #define CONFIG_ENV_SIZE         0x2000
 #endif
 #else
        #define CONFIG_ENV_IS_IN_FLASH  1