summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2013-10-29 11:19:19 +0800
committerJason Liu <r64343@freescale.com>2013-11-05 12:49:39 +0800
commit6bcfb0da7e2eb72cf3d312821f7f68f88d9070d7 (patch)
tree038fda02dfc3dc9b0fe01c1f72443dc9d6e34c59
parentfca3686b5760dc069e165b7b6b94a1c9a42f4fe8 (diff)
downloadu-boot-imx-6bcfb0da7e2eb72cf3d312821f7f68f88d9070d7.zip
u-boot-imx-6bcfb0da7e2eb72cf3d312821f7f68f88d9070d7.tar.gz
u-boot-imx-6bcfb0da7e2eb72cf3d312821f7f68f88d9070d7.tar.bz2
ENGR00285890 imx6:plugin: update the ROM_API_TABLE_BASE_ADDR for plugin code
i.MX6DQ TO1.5 and i.MX6DL/SOLO change the ROM_API_TABLE_BASE_ADDR from 0xc0 to 0xc4.Need update the plugin code to sync with this change. The change as the following for the new TO with i.MX6DQ, i.MX6DL/SOLO: For i.MX6DQ, if the TO >=1.5, will use the new ROM_API_TABLE_BASE_ADDR=0xc4 For i.MX6DL/S, if the TO >=1.2, will use the new ROM_API_TABLE_BASE_ADDR=0xc4 For the old TO, we will still use the 0xc0 to keep compatible. Signed-off-by: Jason Liu <r64343@freescale.com>
-rw-r--r--arch/arm/include/asm/arch-mx6/mx6_plugin.S25
1 files changed, 22 insertions, 3 deletions
diff --git a/arch/arm/include/asm/arch-mx6/mx6_plugin.S b/arch/arm/include/asm/arch-mx6/mx6_plugin.S
index b5c27fd..6ee5645 100644
--- a/arch/arm/include/asm/arch-mx6/mx6_plugin.S
+++ b/arch/arm/include/asm/arch-mx6/mx6_plugin.S
@@ -17,8 +17,13 @@
#include <config.h>
-#define ROM_API_TABLE_BASE_ADDR 0xC0
-#define ROM_API_HWCNFG_SETUP_OFFSET 0x08
+#define ROM_API_TABLE_BASE_ADDR_LEGACY 0xC0
+#define ROM_API_TABLE_BASE_ADDR_MX6DQ_TO15 0xC4
+#define ROM_API_TABLE_BASE_ADDR_MX6DL_TO12 0xC4
+#define ROM_API_HWCNFG_SETUP_OFFSET 0x08
+#define ROM_VERSION_OFFSET 0x48
+#define ROM_VERSION_TO12 0x12
+#define ROM_VERSION_TO15 0x15
plugin_start:
@@ -52,7 +57,21 @@ plugin_start:
* check the _pu_irom_api_table for the address
*/
before_calling_rom___pu_irom_hwcnfg_setup:
- ldr r3, =ROM_API_TABLE_BASE_ADDR
+ ldr r3, =ROM_VERSION_OFFSET
+ ldr r4, [r3]
+#if defined(CONFIG_MX6SOLO) || defined(CONFIG_MX6DL)
+ ldr r3, =ROM_VERSION_TO12
+ cmp r4, r3
+ ldrge r3, =ROM_API_TABLE_BASE_ADDR_MX6DL_TO12
+ ldrlt r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
+#elif defined(CONFIG_MX6Q)
+ ldr r3, =ROM_VERSION_TO15
+ cmp r4, r3
+ ldrge r3, =ROM_API_TABLE_BASE_ADDR_MX6DQ_TO15
+ ldrlt r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
+#else
+ ldr r3, =ROM_API_TABLE_BASE_ADDR_LEGACY
+#endif
ldr r4, [r3, #ROM_API_HWCNFG_SETUP_OFFSET]
blx r4
after_calling_rom___pu_irom_hwcnfg_setup: