From 5e645d27d64dafe0b5dfe1d03a3931f942f120a4 Mon Sep 17 00:00:00 2001 From: sos Date: Fri, 5 Aug 2005 13:14:00 +0000 Subject: Add support for the ITE IT8211F controller. --- sys/dev/ata/ata-chipset.c | 20 ++++++++++++++------ sys/dev/ata/ata-pci.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index d53827f..c9b3292 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -1795,13 +1795,21 @@ int ata_ite_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_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "ITE IT8212F" }, + { ATA_IT8211F, 0x00, 0x00, 0x00, ATA_UDMA6, "ITE IT8211F" }, + { 0, 0, 0, 0, 0, 0}}; + char buffer[64]; - if (pci_get_devid(dev) == ATA_IT8212F) { - device_set_desc(dev, "ITE IT8212F ATA133 controller"); - ctlr->chipinit = ata_ite_chipinit; - return 0; - } - return ENXIO; + if (!(idx = ata_match_chip(dev, ids))) + return ENXIO; + + sprintf(buffer, "%s %s controller", idx->text, ata_mode2str(idx->max_dma)); + device_set_desc_copy(dev, buffer); + ctlr->chip = idx; + ctlr->chipinit = ata_ite_chipinit; + return 0; } static int diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index 3bb80d3..1f9e8c3 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -149,6 +149,7 @@ struct ata_connect_task { #define ATA_I31244 0x32008086 #define ATA_ITE_ID 0x1283 +#define ATA_IT8211F 0x82111283 #define ATA_IT8212F 0x82121283 #define ATA_MICRON_ID 0x1042 -- cgit v1.1