summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra12_dvfs.c
diff options
context:
space:
mode:
authorPuneet Saxena <puneets@nvidia.com>2014-01-29 17:04:45 +0530
committerSachin Nikam <snikam@nvidia.com>2014-01-29 22:24:43 -0800
commitd3626864ae9aca28b4f999ce3b35deb4c7a82ac5 (patch)
tree1a8c3db251bde057a544a9d0c6fa7ddacda398de /arch/arm/mach-tegra/tegra12_dvfs.c
parent37a301258e7f7de4da5aea0e2942cd9e890e895a (diff)
Arm: tegra12: Add user interface for emc floor
Adds node to set min emc clock rate. sysfs(floor rate in Hz, and state for ref counting) /sys/kernel/tegra_emc/emc_floor_rate /sys/kernel/tegra_emc/emc_floor_state PM QoS (freq in kHz): /dev/emc_freq_min Usecase: echo "emc_floor_value" > /dev/emc_freq_min "emc_floor_value": required minimum emc value Bug 1432476 Change-Id: Ib971899f99726e22b9f38f94827b7c9b0ac9ce00 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/361479 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra12_dvfs.c')
-rw-r--r--arch/arm/mach-tegra/tegra12_dvfs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra12_dvfs.c b/arch/arm/mach-tegra/tegra12_dvfs.c
index 911d0b5cebfc..38a214d9bb8f 100644
--- a/arch/arm/mach-tegra/tegra12_dvfs.c
+++ b/arch/arm/mach-tegra/tegra12_dvfs.c
@@ -1322,6 +1322,13 @@ static struct core_bus_rates_table tegra12_gpu_rates_sysfs = {
.attr = {.name = "gpu_available_rates", .mode = 0444} },
};
+static struct core_bus_limit_table tegra12_emc_floor_sysfs = {
+ .limit_clk_name = "floor.profile.emc",
+ .refcnt_attr = {.attr = {.name = "emc_floor_state", .mode = 0644} },
+ .level_attr = {.attr = {.name = "emc_floor_rate", .mode = 0644} },
+ .pm_qos_class = PM_QOS_EMC_FREQ_MIN,
+};
+
static struct core_bus_rates_table tegra12_emc_rates_sysfs = {
.bus_clk_name = "emc",
.rate_attr = {.attr = {.name = "emc_rate", .mode = 0444} },
@@ -1410,6 +1417,16 @@ static int __init tegra12_dvfs_init_core_cap(void)
kobject_del(emc_kobj);
return 0;
}
+
+ ret = tegra_init_shared_bus_floor(&tegra12_emc_floor_sysfs,
+ 1, emc_kobj);
+ if (ret) {
+ pr_err("tegra12_dvfs: failed to init emc floor interface (%d)\n",
+ ret);
+ kobject_del(emc_kobj);
+ return 0;
+ }
+
pr_info("tegra dvfs: tegra sysfs gpu & emc interface is initialized\n");
return 0;