summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/dvfs_dptc-imx31.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-06 03:23:51 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-06 03:23:51 +0000
commita36a498c577ae5c9daa8487c8440df46d325bab3 (patch)
treeba8a35620ee10da2a7e1d6e6ed9234f0f35647d9 /firmware/target/arm/imx31/dvfs_dptc-imx31.h
parent8fd3ec97271001d0b50d4404f5891c9a4e77d960 (diff)
downloadrockbox-a36a498c577ae5c9daa8487c8440df46d325bab3.tar.gz
rockbox-a36a498c577ae5c9daa8487c8440df46d325bab3.zip
i.MX31/Gigabeat S: This should fix stability problems. One problem was to start using the DVFS controller properly so that interrupts will be masked at the lowest and highest frequency indexes. Millions of useless interrupts were occurring at 132MHz because its index was 2, not 3, which masks it automatically when it can't go slower. Stopping the flood was enough to actually see the difference in general. IRQ must be disabled when fiddling with the CCM registers and only enabled when waiting for voltage ramp as having them enables also causes spurious DVFS ints. Implement interruptible ISR pro/epilogue more safely (always using IRQ stack even in SVC mode handling). Fix an improper inequality in DVFS code (which set regs for down when going up and v.v.). Misc. support changes. Have internal tables take less RAM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25837 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/dvfs_dptc-imx31.h')
-rw-r--r--firmware/target/arm/imx31/dvfs_dptc-imx31.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/dvfs_dptc-imx31.h b/firmware/target/arm/imx31/dvfs_dptc-imx31.h
index 2bf6114a11..844fd6ebff 100644
--- a/firmware/target/arm/imx31/dvfs_dptc-imx31.h
+++ b/firmware/target/arm/imx31/dvfs_dptc-imx31.h
@@ -107,6 +107,16 @@ struct dvfs_lt_signal_descriptor
107 uint8_t detect : 1; /* 1 = edge-detected */ 107 uint8_t detect : 1; /* 1 = edge-detected */
108}; 108};
109 109
110#define DVFS_NUM_LEVELS 4
111#define DPTC_NUM_WP 17
112
113/* 0 and 3 are *required*. DVFS hardware depends upon DVSUP pins showing
114 * minimum (11) and maximum (00) levels or interrupts will be continuously
115 * asserted. */
116#define DVFS_LEVEL_0 (1u << 0)
117#define DVFS_LEVEL_1 (1u << 1)
118#define DVFS_LEVEL_2 (1u << 2)
119#define DVFS_LEVEL_3 (1u << 3)
110 120
111extern long cpu_voltage_setting; 121extern long cpu_voltage_setting;
112 122