summaryrefslogtreecommitdiff
path: root/bootloader/fiiom3k.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-07-06 21:02:37 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-07-08 16:01:38 +0000
commit0e1a90ea1da0c1737363e9412781f734f39048d4 (patch)
treebef444477385a5eb8e8766ec75391ba48d63c613 /bootloader/fiiom3k.c
parent65aa9ce57067f810d6a8f9417ec7d0a5741b404a (diff)
downloadrockbox-0e1a90ea1da0c1737363e9412781f734f39048d4.tar.gz
rockbox-0e1a90ea1da0c1737363e9412781f734f39048d4.zip
x1000: SPL refactoring
This streamlines the boot code a bit and reduces target specific boilerplate. The clock init hack used by the bootloader has been "standardized" and works for the main Rockbox binary now, so you can boot rockbox.bin over USB without special hacks. Change-Id: I7c1fac37df5a45873583ce6818eaedb9f71a782b
Diffstat (limited to 'bootloader/fiiom3k.c')
-rw-r--r--bootloader/fiiom3k.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/bootloader/fiiom3k.c b/bootloader/fiiom3k.c
index 3d42ba7314..42b3260e07 100644
--- a/bootloader/fiiom3k.c
+++ b/bootloader/fiiom3k.c
@@ -37,7 +37,7 @@
37#include "loader_strerror.h" 37#include "loader_strerror.h"
38#include "version.h" 38#include "version.h"
39#include "installer-fiiom3k.h" 39#include "installer-fiiom3k.h"
40#include "spl-x1000.h" 40#include "boot-x1000.h"
41#include "x1000/cpm.h" 41#include "x1000/cpm.h"
42 42
43/* Load address where the binary needs to be placed */ 43/* Load address where the binary needs to be placed */
@@ -331,17 +331,8 @@ void main(void)
331{ 331{
332 bool recovery_mode = false; 332 bool recovery_mode = false;
333 333
334 /* This hack is needed because when USB booting, we cannot initialize 334 if(get_boot_flag(BOOT_FLAG_USB_BOOT))
335 * clocks in the SPL -- it may break the mask ROM's USB code. So if the
336 * SPL has not already initialized the clocks, we need to do that now.
337 *
338 * Also use this as a sign that we should enter the recovery menu since
339 * this is probably the expected result if the user is USB booting...
340 */
341 if(jz_readf(CPM_MPCR, ENABLE)) {
342 spl_handle_pre_boot(0);
343 recovery_mode = true; 335 recovery_mode = true;
344 }
345 336
346 system_init(); 337 system_init();
347 core_allocator_init(); 338 core_allocator_init();