Module Name: src
Committed By: jmcneill
Date: Thu May 25 23:15:39 UTC 2017
Modified Files:
src/sys/arch/arm/nvidia: tegra_pmc.c
Log Message:
Correct an issue introduced in r1.7 that prevented unclamping power for
non-GPU partitions. While here, apply the GPU power workaround to Tegra210
as well.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/nvidia/tegra_pmc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/nvidia/tegra_pmc.c
diff -u src/sys/arch/arm/nvidia/tegra_pmc.c:1.8 src/sys/arch/arm/nvidia/tegra_pmc.c:1.9
--- src/sys/arch/arm/nvidia/tegra_pmc.c:1.8 Sun Dec 13 17:39:19 2015
+++ src/sys/arch/arm/nvidia/tegra_pmc.c Thu May 25 23:15:39 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.8 2015/12/13 17:39:19 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.8 2015/12/13 17:39:19 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.9 2017/05/25 23:15:39 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -165,13 +165,17 @@ tegra_pmc_remove_clamping(u_int partid)
tegra_pmc_get_bs(&bst, &bsh);
- if (tegra_chip_id() == CHIP_ID_TEGRA124) {
+ if (partid == PMC_PARTID_TD) {
/*
- * On Tegra124 the GPU power clamping is controlled by a
- * separate register
+ * On Tegra124 and later, the GPU power clamping is
+ * controlled by a separate register
*/
- bus_space_write_4(bst, bsh, PMC_GPU_RG_CNTRL_REG, 0);
- return;
+ switch (tegra_chip_id()) {
+ case CHIP_ID_TEGRA124:
+ case CHIP_ID_TEGRA210:
+ bus_space_write_4(bst, bsh, PMC_GPU_RG_CNTRL_REG, 0);
+ return;
+ }
}
bus_space_write_4(bst, bsh, PMC_REMOVE_CLAMPING_CMD_0_REG,