@@ -29,6 +29,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/suspend.h>
+#include <memory/tegra_emc_performance.h>
/* Frequency table index must be sequential starting at 0 */
static struct cpufreq_frequency_table freq_table[] = {
@@ -117,16 +118,16 @@ static int tegra_update_cpu_speed(unsigned long rate)
if (freqs.old == freqs.new)
return ret;
- /*
- * Vote on memory bus frequency based on cpu frequency
- * This sets the minimum frequency, display or avp may request higher
- */
+ /* Boost memory bus frequency based on CPU frequency */
if (rate >= 816000)
- clk_set_rate(emc_clk, 600000000); /* cpu 816 MHz, emc max */
+ tegra_emc_request_perf_level(TEGRA_EMC_SC_MPCORE,
+ TEGRA_EMC_PL_HIGH);
else if (rate >= 456000)
- clk_set_rate(emc_clk, 300000000); /* cpu 456 MHz, emc 150Mhz */
+ tegra_emc_request_perf_level(TEGRA_EMC_SC_MPCORE,
+ TEGRA_EMC_PL_MID);
else
- clk_set_rate(emc_clk, 100000000); /* emc 50Mhz */
+ tegra_emc_request_perf_level(TEGRA_EMC_SC_MPCORE,
+ TEGRA_EMC_PL_LOW);
for_each_online_cpu(freqs.cpu)
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
The CPUfreq driver should not take control of EMC clock directly, but rather let the EMC driver know about the CPUs memory performance demands using the new EMC clock scaling API. Signed-off-by: Lucas Stach <dev@lynxeye.de> --- arch/arm/mach-tegra/cpu-tegra.c | 15 ++++++++------- 1 Datei geändert, 8 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-)