Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/pci Some more Sharp MM20 fixup code that I for...
details: https://anonhg.NetBSD.org/src/rev/0d7cdad91b6a
branches: trunk
changeset: 571393:0d7cdad91b6a
user: augustss <augustss%NetBSD.org@localhost>
date: Sun Nov 21 22:00:00 2004 +0000
description:
Some more Sharp MM20 fixup code that I forgot to commit in the first round.
diffstat:
sys/arch/i386/pci/pcibios.c | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diffs (60 lines):
diff -r 9a92504b3bdb -r 0d7cdad91b6a sys/arch/i386/pci/pcibios.c
--- a/sys/arch/i386/pci/pcibios.c Sun Nov 21 21:49:08 2004 +0000
+++ b/sys/arch/i386/pci/pcibios.c Sun Nov 21 22:00:00 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcibios.c,v 1.20 2004/10/21 17:12:42 augustss Exp $ */
+/* $NetBSD: pcibios.c,v 1.21 2004/11/21 22:00:00 augustss Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.20 2004/10/21 17:12:42 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcibios.c,v 1.21 2004/11/21 22:00:00 augustss Exp $");
#include "opt_pcibios.h"
@@ -747,13 +747,40 @@
return rv;
}
+#define MM20_PCI_BUS 0
+#define MM20_PCI_EHCI_DEV 15
+#define MM20_PCI_EHCI_FUNC 3
+#define MM20_PCI_EHCI_PIN 3
+#define MM20_PCI_EHCI_INTR 11
+#define MM20_PCI_ISA_DEV 3
+#define MM20_PCI_ISA_FUNC 0
+
static void
pcibios_mm20_fixup(void)
{
+ pci_chipset_tag_t pc;
+ pcitag_t tag;
+
/* Copy BIOS */
pcibios_copy_bios();
/* Route the interrupt for the EHCI controller. */
- (void)pcibios_biosroute(0, 15, 3, 3, 11);
+ (void)pcibios_biosroute(MM20_PCI_BUS,
+ MM20_PCI_EHCI_DEV,
+ MM20_PCI_EHCI_FUNC,
+ MM20_PCI_EHCI_PIN,
+ MM20_PCI_EHCI_INTR);
+
+ /* Fake some tags. */
+ pc = NULL;
+ tag = pci_make_tag(pc, MM20_PCI_BUS, MM20_PCI_EHCI_DEV,
+ MM20_PCI_EHCI_FUNC);
+ /* Set interrupt register in EHCI controller */
+ pci_conf_write(pc, tag, 0x3c, 0x50000400 + MM20_PCI_EHCI_INTR);
+ tag = pci_make_tag(pc, MM20_PCI_BUS, MM20_PCI_ISA_DEV,
+ MM20_PCI_ISA_FUNC);
+ /* Set some unknown registers in the ISA bridge. */
+ pci_conf_write(pc, tag, 0x58, 0xd87f5300);
+ pci_conf_write(pc, tag, 0x74, 0x00000009);
}
#endif /* PCIBIOS_SHARP_MM20_FIXUP */
Home |
Main Index |
Thread Index |
Old Index