diff options
author | Frank Li <frank.li@freescale.com> | 2010-11-03 09:31:52 +0800 |
---|---|---|
committer | Frank Li <frank.li@freescale.com> | 2010-11-09 19:13:11 +0800 |
commit | 2cbb0e33bd31c9a34fcf3313329c005ae4ad44d6 (patch) | |
tree | 0071cb88ff429969530a8ed77099f7e2cd46ade0 | |
parent | 8916b65502796a48c3422c0e867fe6edfa67037a (diff) | |
download | u-boot-imx-2cbb0e33bd31c9a34fcf3313329c005ae4ad44d6.zip u-boot-imx-2cbb0e33bd31c9a34fcf3313329c005ae4ad44d6.tar.gz u-boot-imx-2cbb0e33bd31c9a34fcf3313329c005ae4ad44d6.tar.bz2 |
ENGR00133530 plug-in support mfgtools and sb_loader
mfgtools and sb_loader can download plug-in and run plug-in
to initilize DRAM.
Signed-off-by: Frank Li <frank.li@freescale.com>
-rw-r--r-- | board/freescale/mx50_rdp/flash_header.S | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/board/freescale/mx50_rdp/flash_header.S b/board/freescale/mx50_rdp/flash_header.S index 38161ba..38ad560 100644 --- a/board/freescale/mx50_rdp/flash_header.S +++ b/board/freescale/mx50_rdp/flash_header.S @@ -61,7 +61,25 @@ plugin2: .long 0x0 plugin_start: /* Save the return address and the function arguments */ - push {r0-r2, lr} + push {r0-r4, lr} + +/* To return to ROM from plugin, we need to fill in these argument. + * Here is what need to do: + * Need to construct the paramters for this function before return to ROM: + * plugin_download(void **start, size_t *bytes, UINT32 *ivt_offset) + */ + /* Check r0 if valid address + * Mfgtools or sb_loader run-plug maybe pass down invalidate data + */ + cmp r0, #0xf8000000 + mov r4, r0 + ldr r3, DDR_DEST_ADDR + strhi r3, [r0] + ldr r3, COPY_SIZE + strhi r3, [r1] + mov r3, #0x400 /* Point to the second IVT table at offset 0x42C */ + add r3, r3, #0x2C + strhi r3, [r2] /*============================================================================= *init script for codex LPDDR1-200MHz CPU board @@ -563,25 +581,13 @@ delay1: adr r2, BOOT_DATA before_calling_rom___pu_irom_hwcnfg_setup: - mov r4, #0x2a00 - add r4, r4, #0x19 - blx r4 // This address might change in future ROM versions + mov r3, #0x2a00 + add r3, r3, #0x19 + cmp r4, #0xF8000000 + blxhi r3 // This address might change in future ROM versions after_calling_rom___pu_irom_hwcnfg_setup: - -/* To return to ROM from plugin, we need to fill in these argument. - * Here is what need to do: - * Need to construct the paramters for this function before return to ROM: - * plugin_download(void **start, size_t *bytes, UINT32 *ivt_offset) - */ - pop {r0-r2, lr} - ldr r3, DDR_DEST_ADDR - str r3, [r0] - ldr r3, COPY_SIZE - str r3, [r1] - mov r3, #0x400 /* Point to the second IVT table at offset 0x42C */ - add r3, r3, #0x2C - str r3, [r2] + pop {r0-r4, lr} mov r0, #1 bx lr /* return back to ROM code */ |