summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-10-22 12:11:58 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-10-22 12:11:58 +0000
commit38edf679f2e64e9c2730b50d8fde15401a14449b (patch)
tree9e0b1a5b6ac697c458dc24fe16a83ac6749178b3
parentc8dfe0508e176b87594f12a67467d51715f53a54 (diff)
downloadrockbox-38edf679f2e64e9c2730b50d8fde15401a14449b.tar.gz
rockbox-38edf679f2e64e9c2730b50d8fde15401a14449b.tar.bz2
rockbox-38edf679f2e64e9c2730b50d8fde15401a14449b.zip
MPIO HD200 - squash long standing bug in bootloader which prevented booting OF if doing coldstart on battery only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28324 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--bootloader/mpio_hd200.c9
-rw-r--r--firmware/target/coldfire/mpio/hd200/adc-hd200.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/bootloader/mpio_hd200.c b/bootloader/mpio_hd200.c
index 6f32d6b87c..31d9ee4018 100644
--- a/bootloader/mpio_hd200.c
+++ b/bootloader/mpio_hd200.c
@@ -319,15 +319,18 @@ void main(void)
/* this is default mode after power_init() */
bool high_current_charging = true;
+ /* setup GPIOs related to power functions */
power_init();
system_init();
kernel_init();
+ /* run at 45MHz */
set_cpu_frequency(CPUFREQ_NORMAL);
- coldfire_set_pllcr_audio_bits(DEFAULT_PLLCR_AUDIO_BITS);
+ /* IRQs are needed by button driver */
enable_irq();
+
lcd_init();
/* only lowlevel functions no queue init */
@@ -337,8 +340,8 @@ void main(void)
/* setup font system*/
font_init();
lcd_setfont(FONT_SYSFIXED);
-
- /* buttons reading */
+
+ /* buttons reading init*/
adc_init();
button_init();
diff --git a/firmware/target/coldfire/mpio/hd200/adc-hd200.c b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
index 01b6f531e2..dd160ae0de 100644
--- a/firmware/target/coldfire/mpio/hd200/adc-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/adc-hd200.c
@@ -91,4 +91,7 @@ void adc_init(void)
/* create tick task which enables ADC interrupt */
tick_add_task(adc_tick);
+
+ /* let the interrupt handler fill readout array */
+ sleep(2);
}