summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-01-04 10:37:41 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-01-04 10:37:41 +0000
commit826a606e9dd903d3cbcf9474470229ebc91fa4fe (patch)
treefe1ce3ffb2d28bc8f2c5000bb77174b5b7bade78 /sys/dev/pci
parentced536a82bb817960eb514a92297e6389ed80845 (diff)
Add support for CS5535 IDE adapted from the gcscide code in NetBSD
originally written by Juan Romero Pardines. Thanks to Lars Kotthoff for testing on a HeroLogic HL-463 system. Because the CS5535 doesn't provide SMM emulated PCI access to set DMA/PIO modes or a real PCI IDE controller we have to resort to making MSR calls. As this is very MD specific, hide most of uglyness away in i386 MD pciide code. ok grange@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pciide.c12
-rw-r--r--sys/dev/pci/pciidevar.h6
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index e03135a53b0..2e2acf4a134 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.291 2009/01/04 10:22:01 jsg Exp $ */
+/* $OpenBSD: pciide.c,v 1.292 2009/01/04 10:37:40 jsg Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -671,7 +671,17 @@ const struct pciide_product_desc pciide_sis_products[] = {
}
};
+/*
+ * The National/AMD CS5535 requires MSRs to set DMA/PIO modes so it
+ * has been banished to the MD i386 pciide_machdep
+ */
const struct pciide_product_desc pciide_natsemi_products[] = {
+#ifdef __i386__
+ { PCI_PRODUCT_NS_CS5535_IDE, /* National/AMD CS5535 IDE */
+ 0,
+ gcsc_chip_map
+ },
+#endif
{ PCI_PRODUCT_NS_PC87415, /* National Semi PC87415 IDE */
0,
natsemi_chip_map
diff --git a/sys/dev/pci/pciidevar.h b/sys/dev/pci/pciidevar.h
index c957ba9db2d..fb7d3591388 100644
--- a/sys/dev/pci/pciidevar.h
+++ b/sys/dev/pci/pciidevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciidevar.h,v 1.17 2009/01/04 10:22:01 jsg Exp $ */
+/* $OpenBSD: pciidevar.h,v 1.18 2009/01/04 10:37:40 jsg Exp $ */
/* $NetBSD: pciidevar.h,v 1.6 2001/01/12 16:04:00 bouyer Exp $ */
/*
@@ -161,6 +161,10 @@ void pciide_print_channels(int, pcireg_t);
* Functions defined by machine-dependent code.
*/
+#ifdef __i386__
+void gcsc_chip_map(struct pciide_softc *, struct pci_attach_args *);
+#endif
+
/* Attach compat interrupt handler, returning handle or NULL if failed. */
#if !defined(pciide_machdep_compat_intr_establish)
void *pciide_machdep_compat_intr_establish(struct device *,