diff options
-rw-r--r-- | sys/dev/pci/pciide.c | 26 | ||||
-rw-r--r-- | sys/dev/pci/pciide_acard_reg.h | 6 |
2 files changed, 26 insertions, 6 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 90050ee4d75..e653eb81bad 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.150 2003/12/12 13:00:37 grange Exp $ */ +/* $OpenBSD: pciide.c,v 1.151 2003/12/12 13:03:51 grange Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -582,6 +582,14 @@ const struct pciide_product_desc pciide_acard_products[] = { { PCI_PRODUCT_ACARD_ATP860A, /* Acard ATP860-A Ultra66 Controller */ IDE_PCI_CLASS_OVERRIDE, acard_chip_map, + }, + { PCI_PRODUCT_ACARD_ATP865A, /* Acard ATP865-A Ultra133 Controller */ + IDE_PCI_CLASS_OVERRIDE, + acard_chip_map, + }, + { PCI_PRODUCT_ACARD_ATP865R, /* Acard ATP865-R Ultra133 Controller */ + IDE_PCI_CLASS_OVERRIDE, + acard_chip_map, } }; @@ -5604,7 +5612,7 @@ serverworks_pci_intr(arg) } -#define ACARD_IS_850(sc) \ +#define ACARD_IS_850(sc) \ ((sc)->sc_pp->ide_product == PCI_PRODUCT_ACARD_ATP850U) void @@ -5644,7 +5652,19 @@ acard_chip_map(sc, pa) } sc->sc_wdcdev.PIO_cap = 4; sc->sc_wdcdev.DMA_cap = 2; - sc->sc_wdcdev.UDMA_cap = ACARD_IS_850(sc) ? 2 : 4; + switch (sc->sc_pp->ide_product) { + case PCI_PRODUCT_ACARD_ATP850U: + sc->sc_wdcdev.UDMA_cap = 2; + break; + case PCI_PRODUCT_ACARD_ATP860: + case PCI_PRODUCT_ACARD_ATP860A: + sc->sc_wdcdev.UDMA_cap = 4; + break; + case PCI_PRODUCT_ACARD_ATP865A: + case PCI_PRODUCT_ACARD_ATP865R: + sc->sc_wdcdev.UDMA_cap = 6; + break; + } sc->sc_wdcdev.set_modes = acard_setup_channel; sc->sc_wdcdev.channels = sc->wdc_chanarray; diff --git a/sys/dev/pci/pciide_acard_reg.h b/sys/dev/pci/pciide_acard_reg.h index c97f199eff3..7b421d67d28 100644 --- a/sys/dev/pci/pciide_acard_reg.h +++ b/sys/dev/pci/pciide_acard_reg.h @@ -37,8 +37,8 @@ ((channel) * 16 + (drive) * 8)) #define ATP860_SETTIME_MASK(channel) (0xffff << ((channel) * 16)) -static const u_int8_t acard_act_udma[] = {0x3, 0x3, 0x3, 0x3, 0x3}; -static const u_int8_t acard_rec_udma[] = {0x1, 0x1, 0x1, 0x1, 0x1}; +static const u_int8_t acard_act_udma[] = {0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3}; +static const u_int8_t acard_rec_udma[] = {0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1}; static const u_int8_t acard_act_dma[] = {0x0, 0x3, 0x3}; static const u_int8_t acard_rec_dma[] = {0xa, 0x3, 0x1}; static const u_int8_t acard_act_pio[] = {0x0, 0x0, 0x0, 0x3, 0x3}; @@ -54,7 +54,7 @@ static const u_int8_t acard_rec_pio[] = {0x0, 0xa, 0x8, 0x3, 0x1}; #define ATP850_UDMA_MASK(channel) (0xf << ((channel) * 4)) #define ATP860_UDMA_MASK(channel) (0xff << ((channel) * 8)) -static const u_int8_t acard_udma_conf[] = {0x1, 0x2, 0x3, 0x4, 0x5}; +static const u_int8_t acard_udma_conf[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7}; #define ATP8x0_CTRL 0x48 #define ATP8x0_CTRL_EN(chan) (0x00020000 << (chan)) |