Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/sunxi Fix A64 PHY enable



details:   https://anonhg.NetBSD.org/src/rev/2e12ce41300f
branches:  trunk
changeset: 826477:2e12ce41300f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Sep 07 10:30:46 2017 +0000

description:
Fix A64 PHY enable

diffstat:

 sys/arch/arm/sunxi/sunxi_usbphy.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 7ee6fa821def -r 2e12ce41300f sys/arch/arm/sunxi/sunxi_usbphy.c
--- a/sys/arch/arm/sunxi/sunxi_usbphy.c Thu Sep 07 10:23:33 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_usbphy.c Thu Sep 07 10:30:46 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_usbphy.c,v 1.6 2017/09/07 01:07:04 jmcneill Exp $ */
+/* $NetBSD: sunxi_usbphy.c,v 1.7 2017/09/07 10:30:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_usbphy.c,v 1.6 2017/09/07 01:07:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_usbphy.c,v 1.7 2017/09/07 10:30:46 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -144,11 +144,15 @@
                USBPHY_WRITE(sc, phy->phy_index, HCI_ICR, val);
        }
 
-       if (sc->sc_type == USBPHY_H3) {
-               /* H3-specific */
+       switch (sc->sc_type) {
+       case USBPHY_H3:
+       case USBPHY_A64:
                val = USBPHY_READ(sc, phy->phy_index, PMU_UNK_H3);
                val &= ~PMU_UNK_H3_CLR;
                USBPHY_WRITE(sc, phy->phy_index, PMU_UNK_H3, val);
+               break;
+       default:
+               break;
        }
 
        if (phy->phy_reg == NULL)



Home | Main Index | Thread Index | Old Index