forked from len0rd/rockbox
Sansa AMS bootloader: consider the bootloader finished
Be verbose only if a keypress has been detected. Use enable/disable_irq() instead of inline assembly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19213 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f10446aff7
commit
2b39cb4b77
1 changed files with 3 additions and 12 deletions
|
|
@ -52,22 +52,17 @@ void main(void)
|
||||||
ascodec_init(); /* Required for backlight on e200v2 */
|
ascodec_init(); /* Required for backlight on e200v2 */
|
||||||
_backlight_on();
|
_backlight_on();
|
||||||
|
|
||||||
#if 0 /* remove me when the bootloader can be considered finished */
|
button_init_device();
|
||||||
int btn = button_read_device();
|
int btn = button_read_device();
|
||||||
|
|
||||||
/* Enable bootloader messages if any button is pressed */
|
/* Enable bootloader messages if any button is pressed */
|
||||||
if (btn)
|
if (btn)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
lcd_clear_display();
|
lcd_clear_display();
|
||||||
verbose = true;
|
verbose = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
asm volatile(
|
enable_irq();
|
||||||
"mrs r0, cpsr \n"
|
|
||||||
"bic r0, r0, #0x80 \n" /* enable interrupts */
|
|
||||||
"msr cpsr, r0 \n"
|
|
||||||
: : : "r0" );
|
|
||||||
|
|
||||||
ret = storage_init();
|
ret = storage_init();
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
|
|
@ -90,11 +85,7 @@ void main(void)
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
error(EBOOTFILE, ret);
|
error(EBOOTFILE, ret);
|
||||||
|
|
||||||
asm volatile(
|
disable_irq(); /* disable irq until we have copied the new vectors */
|
||||||
"mrs r0, cpsr \n"
|
|
||||||
"orr r0, r0, #0x80 \n" /* disable interrupts */
|
|
||||||
"msr cpsr, r0 \n"
|
|
||||||
: : : "r0" );
|
|
||||||
|
|
||||||
if (ret == EOK)
|
if (ret == EOK)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue