From 8448d3b6be5756a2141bc77474bc0de0225248b9 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 2 Mar 2007 13:04:57 +0000 Subject: H300 bootloader: init the ISP1362 chip, and set the CPU to idle mode while charging, to save power git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12547 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/iriver_h300.c | 7 +++++++ firmware/SOURCES | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bootloader/iriver_h300.c b/bootloader/iriver_h300.c index b2a667c..00408cb 100644 --- a/bootloader/iriver_h300.c +++ b/bootloader/iriver_h300.c @@ -43,6 +43,7 @@ #include "pcf50606.h" #include "common.h" #include "rbunicode.h" +#include "isp1362.h" #include @@ -189,6 +190,8 @@ void main(void) coldfire_set_pllcr_audio_bits(DEFAULT_PLLCR_AUDIO_BITS); set_irq_level(0); + isp1362_init(); + adc_init(); button_init(); @@ -245,6 +248,8 @@ void main(void) bool blink_toggle = false; bool request_start = false; + cpu_idle_mode(true); + while(charger_inserted() && !request_start) { button = button_get_w_tmo(HZ); @@ -286,6 +291,8 @@ void main(void) __reset_cookie(); power_off(); } + + cpu_idle_mode(false); } usb_init(); diff --git a/firmware/SOURCES b/firmware/SOURCES index f07145c..c1a2117 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -209,10 +209,13 @@ drivers/tlv320.c #endif /* SIMULATOR */ /* USBOTG */ -#if !defined(SIMULATOR) && !defined(BOOTLOADER) +#if !defined(SIMULATOR) #if CONFIG_USBOTG == USBOTG_ISP1362 drivers/isp1362.c -#elif CONFIG_USBOTG == USBOTG_M5636 +#endif +#endif +#if !defined(SIMULATOR) && !defined(BOOTLOADER) +#if CONFIG_USBOTG == USBOTG_M5636 drivers/m5636.c #elif CONFIG_USBOTG == USBOTG_ARC drivers/arcotg_udc.c -- cgit v1.1