mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Onda VX747: clean up bootloader a bit and make sure storage doesn't get init'd twice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21593 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
898475bf4f
commit
c468273e6d
2 changed files with 19 additions and 28 deletions
|
@ -40,8 +40,7 @@
|
||||||
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
|
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
|
||||||
|| defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
|
|| defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
|
||||||
|| defined(PHILIPS_SA9200) || (CONFIG_CPU == AS3525) || defined(COWON_D2) \
|
|| defined(PHILIPS_SA9200) || (CONFIG_CPU == AS3525) || defined(COWON_D2) \
|
||||||
|| defined(MROBE_100) || defined(PHILIPS_HDD1630) || defined(ONDA_VX747) \
|
|| defined(MROBE_100) || defined(PHILIPS_HDD1630) || defined(MROBE_500)
|
||||||
|| defined(MROBE_500)
|
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
#else
|
#else
|
||||||
bool verbose = true;
|
bool verbose = true;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "jz4740.h"
|
#include "jz4740.h"
|
||||||
#include "backlight.h"
|
#include "backlight.h"
|
||||||
|
#include "backlight-target.h"
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
|
@ -47,9 +48,6 @@ static void usb_mode(void)
|
||||||
{
|
{
|
||||||
int button;
|
int button;
|
||||||
|
|
||||||
/* Init backlight */
|
|
||||||
backlight_init();
|
|
||||||
|
|
||||||
/* Init USB */
|
/* Init USB */
|
||||||
usb_init();
|
usb_init();
|
||||||
usb_start_monitoring();
|
usb_start_monitoring();
|
||||||
|
@ -88,8 +86,7 @@ static void usb_mode(void)
|
||||||
|
|
||||||
static void boot_of(void)
|
static void boot_of(void)
|
||||||
{
|
{
|
||||||
/* Init backlight */
|
/* Do nothing atm */
|
||||||
backlight_init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
|
@ -106,8 +103,15 @@ int main(void)
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
button_init();
|
button_init();
|
||||||
adc_init();
|
adc_init();
|
||||||
|
backlight_init();
|
||||||
|
|
||||||
reset_screen();
|
reset_screen();
|
||||||
|
printf(MODEL_NAME" Rockbox Bootloader");
|
||||||
|
printf("Version "APPSVERSION);
|
||||||
|
|
||||||
|
rc = storage_init();
|
||||||
|
if(rc)
|
||||||
|
error(EATA, rc);
|
||||||
|
|
||||||
#ifdef HAVE_TOUCHSCREEN
|
#ifdef HAVE_TOUCHSCREEN
|
||||||
rc = button_read_device(&dummy);
|
rc = button_read_device(&dummy);
|
||||||
|
@ -119,20 +123,6 @@ int main(void)
|
||||||
usb_mode();
|
usb_mode();
|
||||||
else if(button_hold())
|
else if(button_hold())
|
||||||
boot_of();
|
boot_of();
|
||||||
else if(rc)
|
|
||||||
verbose = true;
|
|
||||||
|
|
||||||
/* Only enable backlight when button is pressed */
|
|
||||||
if(verbose)
|
|
||||||
{
|
|
||||||
backlight_init();
|
|
||||||
printf(MODEL_NAME" Rockbox Bootloader");
|
|
||||||
printf("Version "APPSVERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
rc = storage_init();
|
|
||||||
if(rc)
|
|
||||||
error(EATA, rc);
|
|
||||||
|
|
||||||
rc = disk_mount_all();
|
rc = disk_mount_all();
|
||||||
if (rc <= 0)
|
if (rc <= 0)
|
||||||
|
@ -147,6 +137,8 @@ int main(void)
|
||||||
{
|
{
|
||||||
printf("Starting Rockbox...");
|
printf("Starting Rockbox...");
|
||||||
adc_close(); /* Disable SADC */
|
adc_close(); /* Disable SADC */
|
||||||
|
_backlight_off(); /* Force backlight off to prevent LCD 'flicker' */
|
||||||
|
|
||||||
disable_interrupt();
|
disable_interrupt();
|
||||||
kernel_entry = (void*) CONFIG_SDRAM_START;
|
kernel_entry = (void*) CONFIG_SDRAM_START;
|
||||||
kernel_entry();
|
kernel_entry();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue