Module Name: src Committed By: martin Date: Mon Jul 11 10:37:51 UTC 2016
Modified Files: src/sys/arch/evbmips/loongson [netbsd-7]: yeeloong_machdep.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1202): sys/arch/evbmips/loongson/yeeloong_machdep.c: revision 1.8 The version of PMON on my 8089B (LM8089-1.4.9a) configures OHCI but doesn't enable memory space access. Enable it before the ohci driver attaches to allow low- and full-speed devices to work. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/arch/evbmips/loongson/yeeloong_machdep.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/evbmips/loongson/yeeloong_machdep.c diff -u src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6 src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6.4.1 --- src/sys/arch/evbmips/loongson/yeeloong_machdep.c:1.6 Sat Mar 29 19:28:28 2014 +++ src/sys/arch/evbmips/loongson/yeeloong_machdep.c Mon Jul 11 10:37:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $ */ +/* $NetBSD: yeeloong_machdep.c,v 1.6.4.1 2016/07/11 10:37:51 martin Exp $ */ /* $OpenBSD: yeeloong_machdep.c,v 1.16 2011/04/15 20:40:06 deraadt Exp $ */ /* @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.6 2014/03/29 19:28:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yeeloong_machdep.c,v 1.6.4.1 2016/07/11 10:37:51 martin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -558,6 +558,18 @@ lemote_device_register(device_t dev, voi if (device_class(dev) != bootdev_class) return; + /* OHCI memory space access may not be enabled by the BIOS */ + if (device_is_a(dev, "ohci")) { + struct pci_attach_args *pa = aux; + pcireg_t csr = pci_conf_read(pa->pa_pc, pa->pa_tag, + PCI_COMMAND_STATUS_REG); + if ((csr & PCI_COMMAND_MEM_ENABLE) == 0) { + csr |= PCI_COMMAND_MEM_ENABLE; + pci_conf_write(pa->pa_pc, pa->pa_tag, + PCI_COMMAND_STATUS_REG, csr); + } + } + /* * The device numbering must match. There's no way * pmon tells us more info. Depending on the usb slot