diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-05-08 13:41:53 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2018-05-08 13:41:53 +0000 |
commit | eaa331e0d6a73c199036ecbb2eda90a453348e22 (patch) | |
tree | 749f06b5bfd09ef3b6f26ba1b7e254bdf00b0ef6 /sys/dev | |
parent | 90dc32cceb02a00bfd0abde863c7f40be04db7b1 (diff) |
Print xHCI revision in dmesg.
ok patrick@, kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/fdt/xhci_fdt.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/xhci_pci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/xhci.c | 11 | ||||
-rw-r--r-- | sys/dev/usb/xhcivar.h | 3 |
4 files changed, 9 insertions, 13 deletions
diff --git a/sys/dev/fdt/xhci_fdt.c b/sys/dev/fdt/xhci_fdt.c index 90c77570020..177b62c1e96 100644 --- a/sys/dev/fdt/xhci_fdt.c +++ b/sys/dev/fdt/xhci_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_fdt.c,v 1.10 2018/05/03 10:57:37 patrick Exp $ */ +/* $OpenBSD: xhci_fdt.c,v 1.11 2018/05/08 13:41:52 mpi Exp $ */ /* * Copyright (c) 2017 Mark kettenis <kettenis@openbsd.org> * @@ -95,8 +95,6 @@ xhci_fdt_attach(struct device *parent, struct device *self, void *aux) goto unmap; } - printf("\n"); - /* Set up power domain */ power_domain_enable(sc->sc_node); diff --git a/sys/dev/pci/xhci_pci.c b/sys/dev/pci/xhci_pci.c index 9c81902221b..dc05c0c90ec 100644 --- a/sys/dev/pci/xhci_pci.c +++ b/sys/dev/pci/xhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_pci.c,v 1.8 2016/06/01 06:19:59 mpi Exp $ */ +/* $OpenBSD: xhci_pci.c,v 1.9 2018/05/08 13:41:52 mpi Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -173,7 +173,7 @@ xhci_pci_attach(struct device *parent, struct device *self, void *aux) printf("\n"); goto unmap_ret; } - printf(": %s\n", intrstr); + printf(": %s", intrstr); /* Figure out vendor for root hub descriptor. */ vendor = pci_findvendor(pa->pa_id); diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 3ca1bea01d9..6d99d051479 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.84 2018/04/29 09:00:42 mpi Exp $ */ +/* $OpenBSD: xhci.c,v 1.85 2018/05/08 13:41:52 mpi Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -286,12 +286,6 @@ xhci_init(struct xhci_softc *sc) uint32_t hcr; int npage, error; -#ifdef XHCI_DEBUG - uint16_t vers; - - vers = XREAD2(sc, XHCI_HCIVERSION); - printf("%s: xHCI version %x.%x\n", DEVNAME(sc), vers >> 8, vers & 0xff); -#endif sc->sc_bus.usbrev = USBREV_3_0; sc->sc_bus.methods = &xhci_bus_methods; sc->sc_bus.pipe_size = sizeof(struct xhci_pipe); @@ -300,6 +294,9 @@ xhci_init(struct xhci_softc *sc) sc->sc_door_off = XREAD4(sc, XHCI_DBOFF); sc->sc_runt_off = XREAD4(sc, XHCI_RTSOFF); + sc->sc_version = XREAD2(sc, XHCI_HCIVERSION); + printf(", xHCI %u.%u\n", sc->sc_version >> 8, sc->sc_version & 0xff); + #ifdef XHCI_DEBUG printf("%s: CAPLENGTH=%#lx\n", DEVNAME(sc), sc->sc_oper_off); printf("%s: DOORBELL=%#lx\n", DEVNAME(sc), sc->sc_door_off); diff --git a/sys/dev/usb/xhcivar.h b/sys/dev/usb/xhcivar.h index 289353dc7a5..90ac334c58d 100644 --- a/sys/dev/usb/xhcivar.h +++ b/sys/dev/usb/xhcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xhcivar.h,v 1.8 2015/01/18 20:35:11 mpi Exp $ */ +/* $OpenBSD: xhcivar.h,v 1.9 2018/05/08 13:41:52 mpi Exp $ */ /* * Copyright (c) 2014 Martin Pieuchot @@ -91,6 +91,7 @@ struct xhci_softc { bus_size_t sc_runt_off; /* Runtime */ bus_size_t sc_door_off; /* Doorbell */ + uint16_t sc_version; /* xHCI version */ uint32_t sc_pagesize; /* xHCI page size, minimum 4k */ uint32_t sc_ctxsize; /* 32/64 byte context structs */ |