Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch/evbmips/loongson Pull up following revision(s) (...



details:   https://anonhg.NetBSD.org/src/rev/d96124f0d6e3
branches:  netbsd-7
changeset: 799939:d96124f0d6e3
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 11 10:37:51 2016 +0000

description:
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.

diffstat:

 sys/arch/evbmips/loongson/yeeloong_machdep.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 377222bbed49 -r d96124f0d6e3 sys/arch/evbmips/loongson/yeeloong_machdep.c
--- a/sys/arch/evbmips/loongson/yeeloong_machdep.c      Sun Jul 10 10:42:26 2016 +0000
+++ b/sys/arch/evbmips/loongson/yeeloong_machdep.c      Mon Jul 11 10:37:51 2016 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index