summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra_cl_dvfs.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-11-29 14:56:42 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-11-29 14:56:42 +0100
commit2eecc3c4c63955c3d5860b44422dccd229ec7043 (patch)
treea3256780705eb959d17dd4c4a622a89f1001d90d /arch/arm/mach-tegra/tegra_cl_dvfs.c
parent9a315efc7e2646e75e8cc9d1d79e508589ad2202 (diff)
parentb271e8fa67a6d9c4600274a25636cfe00fdd1b68 (diff)
Merge tag 'tegra-l4t-r21.6' into toradex_tk1_l4t_r21.6
Merge NVIDIA's latest Linux for Tegra aka L4T R21.6 Linux kernel changes from git://nv-tegra.nvidia.com/linux-3.10.git commit: b271e8fa67a6d9c4600274a25636cfe00fdd1b68 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
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);