summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-11-18 14:55:51 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-11-18 14:55:51 +0000
commite16ebf1a50b9692e93f44633138903418ef93526 (patch)
tree3f55d96658b38cc3d74f6231f71238562d3bd507
parentbd0d12c43e8e4d8f5732b4651f714551f08d8a5c (diff)
downloadrockbox-e16ebf1a50b9692e93f44633138903418ef93526.zip
rockbox-e16ebf1a50b9692e93f44633138903418ef93526.tar.gz
rockbox-e16ebf1a50b9692e93f44633138903418ef93526.tar.bz2
rockbox-e16ebf1a50b9692e93f44633138903418ef93526.tar.xz
Moved the power_init() call to main(), removed unfinished inits for the H300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7964 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main.c14
-rw-r--r--firmware/powermgmt.c2
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/main.c b/apps/main.c
index d84aa25..43ce9f4 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -186,7 +186,9 @@ void init(void)
buffer_init();
settings_reset();
-
+
+ power_init();
+
lcd_init();
#ifdef HAVE_REMOTE_LCD
lcd_remote_init();
@@ -205,7 +207,10 @@ void init(void)
#endif
#endif
+#ifndef IRIVER_H300_SERIES
+ /* Not yet done on H300 */
i2c_init();
+#endif
#ifdef HAVE_RTC
rtc_init();
@@ -214,8 +219,10 @@ void init(void)
adc_init();
+#ifndef IRIVER_H300_SERIES
usb_init();
-
+#endif
+
backlight_init();
button_init();
@@ -258,6 +265,7 @@ void init(void)
panicf("ata: %d", rc);
}
+#ifndef IRIVER_H300_SERIES
usb_start_monitoring();
while (usb_detect())
{ /* enter USB mode early, before trying to mount */
@@ -274,7 +282,7 @@ void init(void)
break;
#endif
}
-
+#endif
if (!mounted)
{
rc = disk_mount_all();
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 6d6aba5..dd2fc9f 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -873,8 +873,6 @@ static void power_thread(void)
void powermgmt_init(void)
{
- power_init();
-
/* init history to 0 */
memset(power_history, 0x00, sizeof(power_history));