Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/ingenic explicitly un-suspend the OTG port aft...
details: https://anonhg.NetBSD.org/src/rev/867a3bb89040
branches: trunk
changeset: 338328:867a3bb89040
user: macallan <macallan%NetBSD.org@localhost>
date: Mon May 18 15:11:47 2015 +0000
description:
explicitly un-suspend the OTG port after PHY reset
diffstat:
sys/arch/mips/ingenic/ingenic_dwctwo.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r eae24aa66970 -r 867a3bb89040 sys/arch/mips/ingenic/ingenic_dwctwo.c
--- a/sys/arch/mips/ingenic/ingenic_dwctwo.c Mon May 18 15:07:52 2015 +0000
+++ b/sys/arch/mips/ingenic/ingenic_dwctwo.c Mon May 18 15:11:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ingenic_dwctwo.c,v 1.10 2015/04/28 15:07:07 macallan Exp $ */
+/* $NetBSD: ingenic_dwctwo.c,v 1.11 2015/05/18 15:11:47 macallan Exp $ */
/*-
* Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.10 2015/04/28 15:07:07 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ingenic_dwctwo.c,v 1.11 2015/05/18 15:11:47 macallan Exp $");
/*
* adapted from bcm2835_dwctwo.c
@@ -154,6 +154,10 @@
#endif
reg = readreg(JZ_USBPCR1);
+#ifdef INGENIC_DEBUG
+ printf("JZ_USBPCR1 %08x\n", reg);
+#endif
+ reg &= ~0xf0000000;
reg |= PCR_SYNOPSYS;
reg |= PCR_REFCLK_CORE;
reg &= ~PCR_CLK_M;
@@ -166,6 +170,7 @@
printf("JZ_USBRDT %08x\n", readreg(JZ_USBRDT));
#endif
+ writereg(JZ_USBVBFIL, 0);
delay(10000);
reg = readreg(JZ_USBPCR);
@@ -177,6 +182,11 @@
delay(10000);
+ /* wake up the USB part */
+ reg = readreg(JZ_OPCR);
+ reg |= OPCR_SPENDN0;
+ writereg(JZ_OPCR, reg);
+
sc->sc_ih = evbmips_intr_establish(aa->aa_irq, dwc2_intr, &sc->sc_dwc2);
if (sc->sc_ih == NULL) {
Home |
Main Index |
Thread Index |
Old Index