dev->state = ACTMON_OFF;
actmon_dev_enable(dev);
- clk_enable(dev->clk);
+ tegra_clk_prepare_enable(dev->clk);
return 0;
}
/* EMC activity monitor: frequency sampling device:
* activity counter is incremented every 256 memory transactions, and
- * each transaction takes 2 EMC clocks; count_weight = 512.
+ * each transaction takes 2 EMC clocks; count_weight = 512 on Tegra3.
+ * On Tegra11 there is only 1 clock per transaction, hence weight = 256.
*/
static struct actmon_dev actmon_dev_emc = {
.reg = 0x1c0,
.boost_freq_step = 16000,
.boost_up_coef = 200,
.boost_down_coef = 50,
+#if defined(CONFIG_ARCH_TEGRA_14x_SOC)
+ .boost_up_threshold = 70,
+ .boost_down_threshold = 50,
+#else
.boost_up_threshold = 60,
.boost_down_threshold = 40,
+#endif
.up_wmark_window = 1,
.down_wmark_window = 3,
.avg_window_log2 = ACTMON_DEFAULT_AVG_WINDOW_LOG2,
+#if defined(CONFIG_ARCH_TEGRA_3x_SOC) || defined(CONFIG_ARCH_TEGRA_14x_SOC)
.count_weight = 0x200,
+#else
+ .count_weight = 0x100,
+#endif
.type = ACTMON_FREQ_SAMPLER,
.state = ACTMON_UNINITIALIZED,
return 0;
}
actmon_clk_freq = clk_get_rate(c) / 1000;
- ret = clk_enable(c);
+ ret = tegra_clk_prepare_enable(c);
if (ret) {
pr_err("%s: Failed to enable actmon clock\n", __func__);
return 0;