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 Enable XUSB power rails at attach
details: https://anonhg.NetBSD.org/src/rev/2876b2780a8e
branches: trunk
changeset: 356420:2876b2780a8e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Sep 24 20:09:22 2017 +0000
description:
Enable XUSB power rails at attach
diffstat:
sys/arch/arm/nvidia/tegra_xusb.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r b390f5c442c7 -r 2876b2780a8e sys/arch/arm/nvidia/tegra_xusb.c
--- a/sys/arch/arm/nvidia/tegra_xusb.c Sun Sep 24 09:43:27 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra_xusb.c Sun Sep 24 20:09:22 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_xusb.c,v 1.9 2017/09/22 18:13:36 jmcneill Exp $ */
+/* $NetBSD: tegra_xusb.c,v 1.10 2017/09/24 20:09:22 jmcneill Exp $ */
/*
* Copyright (c) 2016 Jonathan A. Kollasch
@@ -30,7 +30,7 @@
#include "opt_tegra.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.9 2017/09/22 18:13:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.10 2017/09/24 20:09:22 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -42,8 +42,9 @@
#include <arm/nvidia/tegra_reg.h>
#include <arm/nvidia/tegra_var.h>
#include <arm/nvidia/tegra_xusbpad.h>
+#include <arm/nvidia/tegra_xusbreg.h>
+#include <arm/nvidia/tegra_pmcreg.h>
-#include <arm/nvidia/tegra_xusbreg.h>
#include <dev/pci/pcireg.h>
#include <dev/fdt/fdtvar.h>
@@ -231,6 +232,13 @@
}
aprint_normal_dev(self, "interrupting on %s\n", intrstr);
+ /* Enable XUSB power rails */
+
+ tegra_pmc_power(PMC_PARTID_XUSBC, true); /* Host/USB2.0 */
+ tegra_pmc_power(PMC_PARTID_XUSBA, true); /* SuperSpeed */
+
+ /* Enable XUSB clocks */
+
clk = fdtbus_clock_get(faa->faa_phandle, "pll_e");
rate = clk_get_rate(clk);
error = clk_enable(clk); /* XXX set frequency */
Home |
Main Index |
Thread Index |
Old Index