summaryrefslogtreecommitdiff
path: root/bootloader/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/main.c')
-rw-r--r--bootloader/main.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/bootloader/main.c b/bootloader/main.c
index c2e3cce302..27e3a8b303 100644
--- a/bootloader/main.c
+++ b/bootloader/main.c
@@ -370,70 +370,8 @@ void main(void)
370 bool rec_button = false; 370 bool rec_button = false;
371 bool hold_status = false; 371 bool hold_status = false;
372 int data; 372 int data;
373
374#ifdef IAUDIO_X5
375 (void)rc_on_button;
376 (void)on_button;
377 (void)rec_button;
378 (void)hold_status;
379 (void)data;
380 power_init();
381
382 system_init();
383 kernel_init();
384
385 set_cpu_frequency(CPUFREQ_NORMAL);
386 coldfire_set_pllcr_audio_bits(DEFAULT_PLLCR_AUDIO_BITS);
387
388 set_irq_level(0);
389 lcd_init();
390#ifdef HAVE_REMOTE_LCD
391 lcd_remote_init();
392#endif
393 backlight_init();
394 font_init();
395 adc_init();
396 button_init();
397
398 printf("Rockbox boot loader");
399 printf("Version %s", version);
400
401 check_battery();
402
403 rc = ata_init();
404 if(rc)
405 {
406 printf("ATA error: %d", rc);
407 sleep(HZ*5);
408 power_off();
409 }
410
411 disk_init();
412
413 rc = disk_mount_all();
414 if (rc<=0)
415 {
416 printf("No partition found");
417 sleep(HZ*5);
418 power_off();
419 }
420
421 printf("Loading firmware");
422 i = load_firmware((unsigned char *)DRAM_START, BOOTFILE, MAX_LOADSIZE);
423 printf("Result: %s", strerror(i));
424
425 if (i < EOK) {
426 printf("Error!");
427 printf("Can't load rockbox.ipod:");
428 printf(strerror(rc));
429 sleep(HZ*3);
430 power_off();
431 } else {
432 start_firmware();
433 }
434
435#else
436 extern int line; 373 extern int line;
374
437 /* We want to read the buttons as early as possible, before the user 375 /* We want to read the buttons as early as possible, before the user
438 releases the ON button */ 376 releases the ON button */
439 377
@@ -644,7 +582,6 @@ void main(void)
644 } 582 }
645 else 583 else
646 start_iriver_fw(); 584 start_iriver_fw();
647#endif /* IAUDIO_X5 */
648} 585}
649 586
650/* These functions are present in the firmware library, but we reimplement 587/* These functions are present in the firmware library, but we reimplement