summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-08-27 17:24:49 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-08-27 17:50:59 +0200
commitc7f897faa4276ade8fb26a3522ff5b3041b4cd56 (patch)
tree6e560a2fb38797823817393c4ab917b5a6db6aeb
parentb81c1555ef7025a23c8e1e6e27259983adac9e5d (diff)
downloadrockbox-c7f897f.tar.gz
rockbox-c7f897f.tar.bz2
rockbox-c7f897f.zip
zen/zenxfi: always set EMI frequency to 130MHz
The ZEN/X-Fi (STMP3700) don't handle memory frequency scaling really well, for this reason we run it at a fixed frequency. That frequency was previously set to 64Mhz because when the CPU run at its lowest frequency, we set the VDD voltage to 0.975 V and on STMP3700, VDDD=VDDDMEM and this is too low to run EMI at 130Mhz. This is not a good solution because under heavy load, running the EMI at 64Mhz results in frame drops and a sluggish device. Thus we now run the EMI at 130Mhz all the time now. To do so, increase the minimum VDD voltage to 1.275 V. This may result is a decreased battery life on those targets but it will also avoid all sorts of glictches and all the device to truly run at full speed. Change-Id: Ia8391492c29fe67bc2701aa7d8cfd00a9df349e8
-rw-r--r--firmware/target/arm/imx233/system-imx233.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c
index 078e052b30..4e1583d568 100644
--- a/firmware/target/arm/imx233/system-imx233.c
+++ b/firmware/target/arm/imx233/system-imx233.c
@@ -288,11 +288,14 @@ struct cpufreq_profile_t
/* Some devices don't handle very well memory frequency changes, so avoid them
* by running at highest speed at all time */
#if defined(CREATIVE_ZEN) || defined(CREATIVE_ZENXFI)
-#define EMIFREQ_NORMAL IMX233_EMIFREQ_64_MHz
-#define EMIFREQ_MAX IMX233_EMIFREQ_64_MHz
+#define EMIFREQ_NORMAL IMX233_EMIFREQ_130_MHz
+#define EMIFREQ_MAX IMX233_EMIFREQ_130_MHz
+/* we need a VDDD of at least 1.2V to run the EMI at 130Mhz */
+#define VDDD_MIN 1275
#else /* weird targets */
#define EMIFREQ_NORMAL IMX233_EMIFREQ_64_MHz
#define EMIFREQ_MAX IMX233_EMIFREQ_130_MHz
+#define VDDD_MIN 1050
#endif
#if IMX233_SUBTARGET >= 3700
@@ -304,8 +307,8 @@ static struct cpufreq_profile_t cpu_profiles[] =
{IMX233_CPUFREQ_320_MHz, 1450, 1350, 3, 1, 27, EMIFREQ_MAX, 0},
/* clk_p@261.82 MHz, clk_h@130.91 MHz, clk_emi@130.91 MHz, VDDD@1.275 V */
{IMX233_CPUFREQ_261_MHz, 1275, 1175, 2, 1, 33, EMIFREQ_MAX, 0},
- /* clk_p@64 MHz, clk_h@64 MHz, clk_emi@64 MHz, VDDD@1.050 V */
- {IMX233_CPUFREQ_64_MHz, 1050, 975, 1, 5, 27, EMIFREQ_NORMAL, 3},
+ /* clk_p@64 MHz, clk_h@64 MHz, clk_emi@64 MHz, VDDD@1.050 V (or 1.275V) */
+ {IMX233_CPUFREQ_64_MHz, VDDD_MIN, 975, 1, 5, 27, EMIFREQ_NORMAL, 3},
/* dummy */
{0, 0, 0, 0, 0, 0, 0, 0}
};