summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra_cl_dvfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/tegra_cl_dvfs.c')
-rw-r--r--arch/arm/mach-tegra/tegra_cl_dvfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra_cl_dvfs.c b/arch/arm/mach-tegra/tegra_cl_dvfs.c
index 1eb08abdfdcc..82fac33f2a73 100644
--- a/arch/arm/mach-tegra/tegra_cl_dvfs.c
+++ b/arch/arm/mach-tegra/tegra_cl_dvfs.c
@@ -150,6 +150,8 @@
#define CL_DVFS_OUTPUT_LUT 0x200
+#define CL_DVFS_APERTURE 0x400
+
#define CL_DVFS_CALIBR_TIME 40000
#define CL_DVFS_OUTPUT_PENDING_TIMEOUT 1000
#define CL_DVFS_OUTPUT_RAMP_DELAY 100
@@ -3243,6 +3245,9 @@ static ssize_t cl_register_write(struct file *file,
if (sscanf(buf, "[0x%x] = 0x%x", &offs, &val) != 2)
return -1;
+ if (offs >= CL_DVFS_APERTURE)
+ return -1;
+
clk_enable(cld->soc_clk);
cl_dvfs_writel(cld, val, offs & (~0x3));
clk_disable(cld->soc_clk);