summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2005-08-05 13:14:00 +0000
committersos <sos@FreeBSD.org>2005-08-05 13:14:00 +0000
commit5e645d27d64dafe0b5dfe1d03a3931f942f120a4 (patch)
tree105219b6c5e5885a1b9ad9758b8940bd68a071e2 /sys
parented266019ee2b9c8ff9f72c5d8a3f27d46b1db364 (diff)
downloadFreeBSD-src-5e645d27d64dafe0b5dfe1d03a3931f942f120a4.zip
FreeBSD-src-5e645d27d64dafe0b5dfe1d03a3931f942f120a4.tar.gz
Add support for the ITE IT8211F controller.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-chipset.c20
-rw-r--r--sys/dev/ata/ata-pci.h1
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
OpenPOWER on IntegriCloud