summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-03-08 18:22:47 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-03-08 18:51:54 +0100
commit3e2f3efd894e7cbe80d9f1877f4a8babba5ce052 (patch)
tree1c24b62ee709207b10b4cadf6402553bfdd4ef37
parent9fe368792369fc5b81e752328ae80062bce56201 (diff)
imx233: prepare frequency scaling for stmp3700
Add entry for stmp3700 maximum frequency which is 320MHz. Change-Id: I6db4aad4efa0a7c1347a1ceb262a0295f63057ae
-rw-r--r--firmware/target/arm/imx233/system-imx233.c10
-rw-r--r--firmware/target/arm/imx233/system-target.h11
2 files changed, 13 insertions, 8 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c
index 1b4cdb3c2d..ad88cba918 100644
--- a/firmware/target/arm/imx233/system-imx233.c
+++ b/firmware/target/arm/imx233/system-imx233.c
@@ -263,15 +263,17 @@ struct cpufreq_profile_t
int arm_cache_timings;
};
-#if IMX233_SUBTARGET >= 3780
+#if IMX233_SUBTARGET >= 3700
static struct cpufreq_profile_t cpu_profiles[] =
{
- /* clk_p@454.74 MHz, clk_h@130.91 MHz, clk_emi@130.91 MHz, VDDD@1.550 V */
+ /* clk_p@454.74 MHz, clk_h@151.58 MHz, clk_emi@130.91 MHz, VDDD@1.550 V */
{IMX233_CPUFREQ_454_MHz, 1550, 1450, 3, 1, 19, IMX233_EMIFREQ_130_MHz, 0},
+ /* clk_p@320.00 MHz, clk_h@106.66 MHz, clk_emi@130.91 MHz, VDDD@1.450 V */
+ {IMX233_CPUFREQ_320_MHz, 1450, 1350, 3, 1, 27, IMX233_EMIFREQ_130_MHz, 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, IMX233_EMIFREQ_130_MHz, 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, IMX233_EMIFREQ_64_MHz, 0},
+ {IMX233_CPUFREQ_64_MHz, 1050, 975, 1, 5, 27, IMX233_EMIFREQ_64_MHz, 3},
/* dummy */
{0, 0, 0, 0, 0, 0, 0, 0}
};
@@ -281,7 +283,7 @@ static struct cpufreq_profile_t cpu_profiles[] =
void imx233_set_cpu_frequency(long frequency)
{
-#if IMX233_SUBTARGET >= 3780
+#if IMX233_SUBTARGET >= 3700
/* don't change the frequency if it is useless (changes are expensive) */
if(cpu_frequency == frequency)
return;
diff --git a/firmware/target/arm/imx233/system-target.h b/firmware/target/arm/imx233/system-target.h
index e77b5dc1b8..314ea9b773 100644
--- a/firmware/target/arm/imx233/system-target.h
+++ b/firmware/target/arm/imx233/system-target.h
@@ -32,19 +32,22 @@
#include "regs/regs-usbphy.h"
/**
- * Absolute maximum CPU speed: 454.74 MHz
- * Intermediate CPU speeds: 392.73 MHz, 360MHz, 261.82 MHz, 64 MHz
+ * Absolute maximum CPU speed: 454.74 MHz (STMP3780), 320.00 MHz (STMP3700)
+ * Intermediate CPU speeds: 261.82 MHz, 64 MHz
* Absolute minimum CPU speed: 24 MHz */
#define IMX233_CPUFREQ_454_MHz 454740
-#define IMX233_CPUFREQ_392_MHz 392730
-#define IMX233_CPUFREQ_360_MHz 360000
+#define IMX233_CPUFREQ_320_MHz 320000
#define IMX233_CPUFREQ_261_MHz 261820
#define IMX233_CPUFREQ_64_MHz 64000
#define IMX233_CPUFREQ_24_MHz 24000
#define CPUFREQ_DEFAULT IMX233_CPUFREQ_64_MHz
#define CPUFREQ_NORMAL IMX233_CPUFREQ_64_MHz
+#if IMX233_SUBTARGET >= 3780
#define CPUFREQ_MAX IMX233_CPUFREQ_454_MHz
+#elif IMX233_SUBTARGET >= 3700
+#define CPUFREQ_MAX IMX233_CPUFREQ_320_MHz
+#endif
#define CPUFREQ_SLEEP IMX233_CPUFREQ_64_MHz
void system_prepare_fw_start(void);