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 Make sure HDMI I/O is not in deep power ...



details:   https://anonhg.NetBSD.org/src/rev/30bf30e31901
branches:  trunk
changeset: 338332:30bf30e31901
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon May 18 21:03:36 2015 +0000

description:
Make sure HDMI I/O is not in deep power down mode

diffstat:

 sys/arch/arm/nvidia/tegra_hdmi.c   |   6 ++++--
 sys/arch/arm/nvidia/tegra_pmc.c    |  18 ++++++++++++++++--
 sys/arch/arm/nvidia/tegra_pmcreg.h |   8 +++++++-
 sys/arch/arm/nvidia/tegra_var.h    |   3 ++-
 4 files changed, 29 insertions(+), 6 deletions(-)

diffs (100 lines):

diff -r 12579749dcc6 -r 30bf30e31901 sys/arch/arm/nvidia/tegra_hdmi.c
--- a/sys/arch/arm/nvidia/tegra_hdmi.c  Mon May 18 20:36:42 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_hdmi.c  Mon May 18 21:03:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_hdmi.c,v 1.1 2015/05/18 19:32:48 jmcneill Exp $ */
+/* $NetBSD: tegra_hdmi.c,v 1.2 2015/05/18 21:03:36 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_hdmi.c,v 1.1 2015/05/18 19:32:48 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_hdmi.c,v 1.2 2015/05/18 21:03:36 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -244,6 +244,8 @@
 
        KASSERT(sc->sc_curmode != NULL);
 
+       tegra_pmc_hdmi_enable();
+
        tegra_car_hdmi_enable(mode->dot_clock * 1000);
 
        for (n = 0; n < __arraycount(tegra_hdmi_tmds_config); n++) {
diff -r 12579749dcc6 -r 30bf30e31901 sys/arch/arm/nvidia/tegra_pmc.c
--- a/sys/arch/arm/nvidia/tegra_pmc.c   Mon May 18 20:36:42 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_pmc.c   Mon May 18 21:03:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmc.c,v 1.4 2015/05/15 11:50:30 jmcneill Exp $ */
+/* $NetBSD: tegra_pmc.c,v 1.5 2015/05/18 21:03:36 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.4 2015/05/15 11:50:30 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pmc.c,v 1.5 2015/05/18 21:03:36 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -143,3 +143,17 @@
        bus_space_write_4(bst, bsh, PMC_REMOVE_CLAMPING_CMD_0_REG,
            __BIT(partid));
 }
+
+void
+tegra_pmc_hdmi_enable(void)
+{
+       bus_space_tag_t bst;
+       bus_space_handle_t bsh;
+
+       tegra_pmc_get_bs(&bst, &bsh);
+
+       tegra_reg_set_clear(bst, bsh, PMC_IO_DPD_STATUS_REG,
+           0, PMC_IO_DPD_STATUS_HDMI);
+       tegra_reg_set_clear(bst, bsh, PMC_IO_DPD2_STATUS_REG,
+           0, PMC_IO_DPD2_STATUS_HV);
+}
diff -r 12579749dcc6 -r 30bf30e31901 sys/arch/arm/nvidia/tegra_pmcreg.h
--- a/sys/arch/arm/nvidia/tegra_pmcreg.h        Mon May 18 20:36:42 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_pmcreg.h        Mon May 18 21:03:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pmcreg.h,v 1.3 2015/05/15 11:50:30 jmcneill Exp $ */
+/* $NetBSD: tegra_pmcreg.h,v 1.4 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -87,4 +87,10 @@
 #define PMC_PARTID_TD                  1
 #define PMC_PARTID_CPU0                        0
 
+#define PMC_IO_DPD_STATUS_REG          0x1bc
+#define PMC_IO_DPD_STATUS_HDMI         __BIT(28)
+
+#define PMC_IO_DPD2_STATUS_REG         0x1c4
+#define PMC_IO_DPD2_STATUS_HV          __BIT(6)
+
 #endif /* _ARM_TEGRA_PMCREG_H */
diff -r 12579749dcc6 -r 30bf30e31901 sys/arch/arm/nvidia/tegra_var.h
--- a/sys/arch/arm/nvidia/tegra_var.h   Mon May 18 20:36:42 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_var.h   Mon May 18 21:03:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_var.h,v 1.18 2015/05/18 20:36:42 jmcneill Exp $ */
+/* $NetBSD: tegra_var.h,v 1.19 2015/05/18 21:03:36 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -137,6 +137,7 @@
 void   tegra_pmc_reset(void);
 void   tegra_pmc_power(u_int, bool);
 void   tegra_pmc_remove_clamping(u_int);
+void   tegra_pmc_hdmi_enable(void);
 
 psize_t        tegra_mc_memsize(void);
 



Home | Main Index | Thread Index | Old Index