Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Rename xhci_op_barrier to xhci_barrier and remov...



details:   https://anonhg.NetBSD.org/src/rev/d8e064ec3468
branches:  trunk
changeset: 955876:d8e064ec3468
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Oct 15 09:37:40 2020 +0000

description:
Rename xhci_op_barrier to xhci_barrier and remove offset/length parameters.
Barriers will be applied to the entire XHCI register space.

diffstat:

 sys/dev/usb/xhci.c |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (54 lines):

diff -r 49759be31372 -r d8e064ec3468 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Thu Oct 15 09:32:40 2020 +0000
+++ b/sys/dev/usb/xhci.c        Thu Oct 15 09:37:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.134 2020/08/21 20:46:03 jakllsch Exp $      */
+/*     $NetBSD: xhci.c,v 1.135 2020/10/15 09:37:40 jmcneill Exp $      */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.134 2020/08/21 20:46:03 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.135 2020/10/15 09:37:40 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -312,6 +312,12 @@
 }
 #endif /* unused */
 
+static inline void
+xhci_barrier(const struct xhci_softc * const sc, int flags)
+{
+       bus_space_barrier(sc->sc_iot, sc->sc_ioh, 0, sc->sc_ios, flags);
+}
+
 static inline uint32_t
 xhci_cap_read_4(const struct xhci_softc * const sc, bus_size_t offset)
 {
@@ -369,13 +375,6 @@
        }
 }
 
-static inline void
-xhci_op_barrier(const struct xhci_softc * const sc, bus_size_t offset,
-    bus_size_t len, int flags)
-{
-       bus_space_barrier(sc->sc_iot, sc->sc_obh, offset, len, flags);
-}
-
 static inline uint32_t
 xhci_rt_read_4(const struct xhci_softc * const sc, bus_size_t offset)
 {
@@ -1229,7 +1228,7 @@
        xhci_op_write_8(sc, XHCI_CRCR, xhci_ring_trbp(sc->sc_cr, 0) |
            sc->sc_cr->xr_cs);
 
-       xhci_op_barrier(sc, 0, 4, BUS_SPACE_BARRIER_WRITE);
+       xhci_barrier(sc, BUS_SPACE_BARRIER_WRITE);
 
        HEXDUMP("eventst", KERNADDR(&sc->sc_eventst_dma, 0),
            XHCI_ERSTE_SIZE * XHCI_EVENT_RING_SEGMENTS);



Home | Main Index | Thread Index | Old Index