diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-28 19:25:34 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-28 20:58:26 +0100 |
commit | d09fb6bb6b92782ba763219ca19d3125159ec848 (patch) | |
tree | ce367eafa778d22a82a450ff952b516cfdd449c1 | |
parent | 744ea2ff431a2b19e3fc2074525ce5953ad56609 (diff) | |
download | rockbox-d09fb6bb6b92782ba763219ca19d3125159ec848.tar.gz rockbox-d09fb6bb6b92782ba763219ca19d3125159ec848.zip |
x1000: Pass CPM scratch register to the bootloader
Change-Id: Iaef4606dc6f3cb9904d87ee92db69fb9ef48bcb0
-rw-r--r-- | firmware/target/mips/ingenic_x1000/spl-x1000.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/mips/ingenic_x1000/spl-x1000.c b/firmware/target/mips/ingenic_x1000/spl-x1000.c index b9ee6cc1c1..08f88f506c 100644 --- a/firmware/target/mips/ingenic_x1000/spl-x1000.c +++ b/firmware/target/mips/ingenic_x1000/spl-x1000.c | |||
@@ -317,6 +317,9 @@ void spl_main(void) | |||
317 | REG_CPM_PSWC2ST = 0x18; | 317 | REG_CPM_PSWC2ST = 0x18; |
318 | REG_CPM_PSWC3ST = 0x08; | 318 | REG_CPM_PSWC3ST = 0x08; |
319 | 319 | ||
320 | /* Save this, it's needed on some targets */ | ||
321 | uint32_t saved_cpm_scratch = REG_CPM_SCRATCH; | ||
322 | |||
320 | /* set up boot flags */ | 323 | /* set up boot flags */ |
321 | init_boot_flags(); | 324 | init_boot_flags(); |
322 | 325 | ||
@@ -361,8 +364,8 @@ void spl_main(void) | |||
361 | spl_storage_close(); | 364 | spl_storage_close(); |
362 | 365 | ||
363 | /* jump to the entry point */ | 366 | /* jump to the entry point */ |
364 | typedef void(*entry_fn)(void); | 367 | typedef void(*entry_fn)(uint32_t); |
365 | entry_fn fn = (entry_fn)BOOT_EXEC_ADDR; | 368 | entry_fn fn = (entry_fn)BOOT_EXEC_ADDR; |
366 | commit_discard_idcache(); | 369 | commit_discard_idcache(); |
367 | fn(); | 370 | fn(saved_cpm_scratch); |
368 | } | 371 | } |