summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-09-08 13:55:05 +0000
committersos <sos@FreeBSD.org>2003-09-08 13:55:05 +0000
commit2ae98bd2efb533f6e4ce01ff9a8821c27e1410b6 (patch)
tree298dc38cc896346d4f56bd32358d2b00517cb832
parentfa2b1d63132cc2da0e6c591c6d031d1ae3940410 (diff)
downloadFreeBSD-src-2ae98bd2efb533f6e4ce01ff9a8821c27e1410b6.zip
FreeBSD-src-2ae98bd2efb533f6e4ce01ff9a8821c27e1410b6.tar.gz
Add another ID for the SiI3112a SATA chip as used on the Adaptec 1210SA.
RAID support is still in the works, so for now just normal ATA ops. Sponsored by: Matt Douhan(www.fruitsalad.org)
-rw-r--r--sys/dev/ata/ata-chipset.c19
-rw-r--r--sys/dev/ata/ata-pci.h1
2 files changed, 13 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 6e37c10..00e97f9 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -1561,12 +1561,13 @@ ata_sii_ident(device_t dev)
struct ata_pci_controller *ctlr = device_get_softc(dev);
struct ata_chip_id *idx;
static struct ata_chip_id ids[] =
- {{ ATA_SII3112, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" },
- { ATA_SII0680, 0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" },
- { ATA_CMD649, 0x00, 0, SIIINTR, ATA_UDMA5, "CMD 649" },
- { ATA_CMD648, 0x00, 0, SIIINTR, ATA_UDMA4, "CMD 648" },
- { ATA_CMD646, 0x07, 0, 0, ATA_UDMA2, "CMD 646U2" },
- { ATA_CMD646, 0x00, 0, 0, ATA_WDMA2, "CMD 646" },
+ {{ ATA_SII3112, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" },
+ { ATA_SII3112_1, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" },
+ { ATA_SII0680, 0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" },
+ { ATA_CMD649, 0x00, 0, SIIINTR, ATA_UDMA5, "CMD 649" },
+ { ATA_CMD648, 0x00, 0, SIIINTR, ATA_UDMA4, "CMD 648" },
+ { ATA_CMD646, 0x07, 0, 0, ATA_UDMA2, "CMD 646U2" },
+ { ATA_CMD646, 0x00, 0, 0, ATA_WDMA2, "CMD 646" },
{ 0, 0, 0, 0, 0, 0}};
char buffer[64];
@@ -1606,11 +1607,15 @@ ata_sii_chipinit(device_t dev)
if (ctlr->chip->cfg2 & SIISETCLK) {
if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
pci_write_config(dev, 0x8a,
- (pci_read_config(dev, 0x8a, 1) & 0x0F)|0x10,1);
+ (pci_read_config(dev, 0x8a, 1) & 0xcf)|0x10,1);
if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
device_printf(dev, "%s could not set ATA133 clock\n",
ctlr->chip->text);
}
+
+ /* enable interrupt as BIOS might not */
+ pci_write_config(dev, 0x8a, (pci_read_config(dev, 0x8a, 1) & 0x3f), 1);
+
ctlr->allocate = ata_sii_mio_allocate;
ctlr->setmode = ata_sii_setmode;
}
diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h
index a976f94..32aceb9 100644
--- a/sys/dev/ata/ata-pci.h
+++ b/sys/dev/ata/ata-pci.h
@@ -160,6 +160,7 @@ struct ata_pci_controller {
#define ATA_SILICON_IMAGE_ID 0x1095
#define ATA_SII0680 0x06801095
#define ATA_SII3112 0x31121095
+#define ATA_SII3112_1 0x02401095
#define ATA_CMD646 0x06461095
#define ATA_CMD648 0x06481095
#define ATA_CMD649 0x06491095
OpenPOWER on IntegriCloud