summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2008-11-25 15:43:38 +0000
committerRafaël Carré <rafael.carre@gmail.com>2008-11-25 15:43:38 +0000
commit2b39cb4b77f2ac8ce7601e8e0673e598f8fffbe8 (patch)
treeabd3aea82fa5f8c42a717ffe8cf91ab8b6258e6c /bootloader
parentf10446aff7c8bd9ac8abf9f5716788230513f7b8 (diff)
downloadrockbox-2b39cb4b77f2ac8ce7601e8e0673e598f8fffbe8.tar.gz
rockbox-2b39cb4b77f2ac8ce7601e8e0673e598f8fffbe8.tar.bz2
rockbox-2b39cb4b77f2ac8ce7601e8e0673e598f8fffbe8.zip
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
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/sansa_as3525.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index d59e7e7183..6da546fcac 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -52,22 +52,17 @@ void main(void)
ascodec_init(); /* Required for backlight on e200v2 */
_backlight_on();
-#if 0 /* remove me when the bootloader can be considered finished */
+ button_init_device();
int btn = button_read_device();
/* Enable bootloader messages if any button is pressed */
if (btn)
-#endif
{
lcd_clear_display();
verbose = true;
}
- asm volatile(
- "mrs r0, cpsr \n"
- "bic r0, r0, #0x80 \n" /* enable interrupts */
- "msr cpsr, r0 \n"
- : : : "r0" );
+ enable_irq();
ret = storage_init();
if(ret < 0)
@@ -90,11 +85,7 @@ void main(void)
if(ret < 0)
error(EBOOTFILE, ret);
- asm volatile(
- "mrs r0, cpsr \n"
- "orr r0, r0, #0x80 \n" /* disable interrupts */
- "msr cpsr, r0 \n"
- : : : "r0" );
+ disable_irq(); /* disable irq until we have copied the new vectors */
if (ret == EOK)
{