summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-ipod4g.h2
-rw-r--r--firmware/export/config-ipodcolor.h2
-rw-r--r--firmware/export/config-ipodmini.h2
-rw-r--r--firmware/system.c16
4 files changed, 19 insertions, 3 deletions
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index 7e428de..d4d4f28 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -94,7 +94,7 @@
#define CONFIG_LED LED_VIRTUAL
/* Define this if you have adjustable CPU frequency */
-//#define HAVE_ADJUSTABLE_CPU_FREQ
+#define HAVE_ADJUSTABLE_CPU_FREQ
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index 9cbc058..a48bde5 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -93,7 +93,7 @@
#define CONFIG_LED LED_VIRTUAL
/* Define this if you have adjustable CPU frequency */
-//#define HAVE_ADJUSTABLE_CPU_FREQ
+#define HAVE_ADJUSTABLE_CPU_FREQ
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 4514bcb..1cb18a7 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -94,7 +94,7 @@
#define CONFIG_LED LED_VIRTUAL
/* Define this if you have adjustable CPU frequency */
-//#define HAVE_ADJUSTABLE_CPU_FREQ
+#define HAVE_ADJUSTABLE_CPU_FREQ
#define BOOTFILE_EXT "ipod"
#define BOOTFILE "rockbox." BOOTFILE_EXT
diff --git a/firmware/system.c b/firmware/system.c
index efa0a06..c957ad9 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -1224,11 +1224,27 @@ void set_cpu_frequency(long frequency)
/* Clock frequency = (24/8)*postmult */
outl(0xaa020000 | 8 | (postmult << 8), 0x60006034);
+
/* Wait for PLL relock? */
udelay(2000);
/* Select PLL as clock source? */
outl((inl(0x60006020) & 0x0fffff0f) | 0x20000070, 0x60006020);
+
+#if defined(IPOD_COLOR) || defined(IPOD_4G) || defined(IPOD_MINI)
+ /* We don't know why the timer interrupt gets disabled on the PP5020
+ based ipods, but without the following line, the 4Gs will freeze
+ when CPU frequency changing is enabled.
+
+ Note also that a simple "CPU_INT_EN = TIMER1_MASK;" (as used
+ elsewhere to enable interrupts) doesn't work, we need "|=".
+
+ It's not needed on the PP5021 and PP5022 ipods.
+ */
+
+ /* unmask interrupt source */
+ CPU_INT_EN |= TIMER1_MASK;
+#endif
}
#elif !defined(BOOTLOADER)
void ipod_set_cpu_frequency(void)