summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-02-20 19:55:45 +0000
committersos <sos@FreeBSD.org>2003-02-20 19:55:45 +0000
commit465aae958c94f33f1c58bf6e4932b8bbb8ac7c73 (patch)
tree0313b9e060c594f3c5397e7473647e8cede16010
parent26815368d422565cd6137e711438397d2e5bf47d (diff)
downloadFreeBSD-src-465aae958c94f33f1c58bf6e4932b8bbb8ac7c73.zip
FreeBSD-src-465aae958c94f33f1c58bf6e4932b8bbb8ac7c73.tar.gz
First round off updates/fixes to the ATA driver.
This moves all chipset specific code to a new file 'ata-chipset.c'. Extensive use of tables and pointers to avoid having the same switch on chipset type in several places, and to allow substituting various functions for different HW arch needs. Added PIO mode setup and all DMA modes. Support for all known SiS chipsets. Thanks to Christoph Kukulies for sponsoring a nice ASUS P4S8X SiS648 based board for this work! Tested on: i386, PC98, alpha and sparc64
-rw-r--r--sys/sys/ata.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/sys/ata.h b/sys/sys/ata.h
index fcb891e..52442af 100644
--- a/sys/sys/ata.h
+++ b/sys/sys/ata.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
+ * Copyright (c) 2000 - 2003 Søren Schmidt <sos@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -339,14 +339,19 @@ struct ata_params {
#define ATA_PIO2 0x0a
#define ATA_PIO3 0x0b
#define ATA_PIO4 0x0c
+#define ATA_PIO_MAX 0x0f
#define ATA_DMA 0x10
-#define ATA_WDMA 0x20
+#define ATA_WDMA0 0x20
+#define ATA_WDMA1 0x21
#define ATA_WDMA2 0x22
-#define ATA_UDMA 0x40
+#define ATA_UDMA0 0x40
+#define ATA_UDMA1 0x41
#define ATA_UDMA2 0x42
+#define ATA_UDMA3 0x43
#define ATA_UDMA4 0x44
#define ATA_UDMA5 0x45
#define ATA_UDMA6 0x46
+#define ATA_DMA_MAX 0x4f
struct ata_cmd {
int channel;
OpenPOWER on IntegriCloud