Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/nvidia Correct an issue introduced in r1.7 that...



details:   https://anonhg.NetBSD.org/src/rev/10e61c0aaa31
branches:  trunk
changeset: 824142:10e61c0aaa31
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu May 25 23:15:39 2017 +0000

description:
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.

diffstat:

 sys/arch/arm/nvidia/tegra_pmc.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r 6d926b2919dd -r 10e61c0aaa31 sys/arch/arm/nvidia/tegra_pmc.c
--- a/sys/arch/arm/nvidia/tegra_pmc.c   Thu May 25 23:12:59 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_pmc.c   Thu May 25 23:15:39 2017 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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_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,



Home | Main Index | Thread Index | Old Index