summaryrefslogtreecommitdiffstats
path: root/sys/pci/uhci_pci.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-05-01 23:30:09 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-05-01 23:30:09 +0000
commit8f05b071c5794e9396e7ea9b2ea7aaa4e8672de0 (patch)
treea24325aa09bfa8a625a812253936a0f3770d321f /sys/pci/uhci_pci.c
parent4081c85fd14958f27dbb6b2dff1d1664679ab06a (diff)
downloadFreeBSD-src-8f05b071c5794e9396e7ea9b2ea7aaa4e8672de0.zip
FreeBSD-src-8f05b071c5794e9396e7ea9b2ea7aaa4e8672de0.tar.gz
Move the disabling of interrupts right before the allocation of the
resource. Avoids useless interrupts occurring between the allocation of the interrupt resource and the final initialisation of the kernel. Cause of these interrupts is unknown (a resuming device?).
Diffstat (limited to 'sys/pci/uhci_pci.c')
-rw-r--r--sys/pci/uhci_pci.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/pci/uhci_pci.c b/sys/pci/uhci_pci.c
index 4bddf8b..c00a6bf 100644
--- a/sys/pci/uhci_pci.c
+++ b/sys/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* FreeBSD $Id: uhci_pci.c,v 1.5 1999/04/11 14:24:20 n_hibma Exp $ */
+/* FreeBSD $Id: uhci_pci.c,v 1.6 1999/04/16 21:22:53 peter Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,6 +37,16 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/* Universal Host Controller Interface
+ *
+ * UHCI spec: http://www.intel.com/
+ */
+
+/* The low level controller code for UHCI has been split into
+ * PCI probes and UHCI specific code. This was done to facilitate the
+ * sharing of code between *BSD's
+ */
+
#include "opt_bus.h"
#include <sys/param.h>
@@ -47,6 +57,9 @@
#include <sys/device.h>
#include <sys/proc.h>
#include <sys/queue.h>
+#if defined(__FreeBSD__)
+#include <machine/bus_pio.h>
+#endif
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
@@ -135,6 +148,8 @@ uhci_pci_attach(device_t dev)
sc->iot = rman_get_bustag(res);
sc->ioh = rman_get_bushandle(res);
+ bus_space_write_2(sc->iot, sc->ioh, UHCI_INTR, 0); /* disable interrupts */
+
rid = 0;
res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
RF_SHAREABLE | RF_ACTIVE);
OpenPOWER on IntegriCloud