Module Name: src
Committed By: macallan
Date: Mon May 18 15:11:47 UTC 2015
Modified Files:
src/sys/arch/mips/ingenic: ingenic_dwctwo.c
Log Message:
explicitly un-suspend the OTG port after PHY reset
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/ingenic/ingenic_dwctwo.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/ingenic/ingenic_dwctwo.c
diff -u src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.10 src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.11
--- src/sys/arch/mips/ingenic/ingenic_dwctwo.c:1.10 Tue Apr 28 15:07:07 2015
+++ src/sys/arch/mips/ingenic/ingenic_dwctwo.c Mon May 18 15:11:47 2015
@@ -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 @@ ingenic_dwc2_attach(device_t parent, dev
#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 @@ ingenic_dwc2_attach(device_t parent, dev
printf("JZ_USBRDT %08x\n", readreg(JZ_USBRDT));
#endif
+ writereg(JZ_USBVBFIL, 0);
delay(10000);
reg = readreg(JZ_USBPCR);
@@ -177,6 +182,11 @@ ingenic_dwc2_attach(device_t parent, dev
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) {