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 GPU power is controlled by a different r...



details:   https://anonhg.NetBSD.org/src/rev/311a8612eeec
branches:  trunk
changeset: 811226:311a8612eeec
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 17 21:14:49 2015 +0000

description:
GPU power is controlled by a different register on Tegra124, handle this in tegra_pmc_remove_clamping

diffstat:

 sys/arch/arm/nvidia/tegra_pmc.c    |  13 +++++++++++--
 sys/arch/arm/nvidia/tegra_pmcreg.h |   5 ++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r 828677661bb8 -r 311a8612eeec sys/arch/arm/nvidia/tegra_pmc.c
--- a/sys/arch/arm/nvidia/tegra_pmc.c   Sat Oct 17 21:13:38 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_pmc.c   Sat Oct 17 21:14:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.6 2015/05/25 10:40:23 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.7 2015/10/17 21:14:49 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.6 2015/05/25 10:40:23 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.7 2015/10/17 21:14:49 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -152,6 +152,15 @@
 
        tegra_pmc_get_bs(&bst, &bsh);
 
+       if (tegra_chip_id() == CHIP_ID_TEGRA124) {
+               /*
+                * On Tegra124 the GPU power clamping is controlled by a
+                * separate register
+                */
+               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,
            __BIT(partid));
 }
diff -r 828677661bb8 -r 311a8612eeec sys/arch/arm/nvidia/tegra_pmcreg.h
--- a/sys/arch/arm/nvidia/tegra_pmcreg.h        Sat Oct 17 21:13:38 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_pmcreg.h        Sat Oct 17 21:14:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmcreg.h,v 1.4 2015/05/18 21:03:36 jmcneill Exp $ */
+/* $NetBSD: tegra_pmcreg.h,v 1.5 2015/10/17 21:14:49 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -93,4 +93,7 @@
 #define PMC_IO_DPD2_STATUS_REG         0x1c4
 #define PMC_IO_DPD2_STATUS_HV          __BIT(6)
 
+#define PMC_GPU_RG_CNTRL_REG           0x2d4
+#define PMC_GPU_RG_CNTRL_RAIL_CLAMP    __BIT(0)
+
 #endif /* _ARM_TEGRA_PMCREG_H */



Home | Main Index | Thread Index | Old Index