summaryrefslogtreecommitdiff
path: root/board/freescale/mx6sl_arm2
diff options
context:
space:
mode:
authorEric Sun <jian.sun@freescale.com>2012-12-03 18:47:47 +0800
committerEric Sun <jian.sun@freescale.com>2012-12-03 18:55:19 +0800
commit2ff6f45780995b06faab268f6130d68565e96ba5 (patch)
tree52e69c6ea084d4db3eb8d1d516a2c32a3fed3dd6 /board/freescale/mx6sl_arm2
parent5d743e40a0164b71edeeed8260c74cbea3484282 (diff)
downloadu-boot-imx-2ff6f45780995b06faab268f6130d68565e96ba5.zip
u-boot-imx-2ff6f45780995b06faab268f6130d68565e96ba5.tar.gz
u-boot-imx-2ff6f45780995b06faab268f6130d68565e96ba5.tar.bz2
ENGR00235564: i.mx6 u-boot: change plugin to use ROM API table for code jump
The original plugin code uses hard coded assembly address for the code jump to "pu_irom_hwcnfg_setup", it can only works for specific chip version, for a new TO, the assembly address will change, and the plugin code simply fails. In fact there is an API entry table in a fixed ROM location, it contains the entry to the "pu_irom_hwcnfg_setup". This patch retrieve the jump address from this API table, thus avoid the limitation for current implementation. Apply to all plugin enabled platforms, MX6Q/DL ARM2, MX6SL ARM2/EVK Signed-off-by: Eric Sun <jian.sun@freescale.com>
Diffstat (limited to 'board/freescale/mx6sl_arm2')
-rw-r--r--board/freescale/mx6sl_arm2/flash_header.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/board/freescale/mx6sl_arm2/flash_header.S b/board/freescale/mx6sl_arm2/flash_header.S
index 4c2475e..c034beb 100644
--- a/board/freescale/mx6sl_arm2/flash_header.S
+++ b/board/freescale/mx6sl_arm2/flash_header.S
@@ -375,6 +375,9 @@ MXC_DCD_ITEM(72, MMDC_P0_BASE_ADDR + 0x01c, 0x00000000)
#else
+#define ROM_API_TABLE_BASE_ADDR (0x000000C0)
+#define ROM_API_HWCNFG_SETUP_OFFSET (0x08)
+
.section ".text.flasheader", "x"
origin:
b _start
@@ -672,9 +675,9 @@ plugin_start:
* pu_irom_hwcnfg_setup is in 0x1f20
*/
before_calling_rom___pu_irom_hwcnfg_setup:
- mov r4, #0x1f00
- add r4, r4, #0x21
- blx r4 /* This address might change in future ROM versions */
+ ldr r3, =ROM_API_TABLE_BASE_ADDR
+ ldr r4, [r3, #ROM_API_HWCNFG_SETUP_OFFSET]
+ blx r4
after_calling_rom___pu_irom_hwcnfg_setup:
/* To return to ROM from plugin, we need to fill in these argument.