Handle HPT-370A controllers, from skanto@sjk-software.fi (kern/13540) but

with some differences to the original patch: don't assume all controllers with
rev >= HPT370_REV are HPT370, and explicitely print if we have a chip with a
rev the driver does't know.
This commit is contained in:
bouyer 2001-07-23 14:55:26 +00:00
parent f247756193
commit ecbce129cb
2 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide.c,v 1.122 2001/07/19 16:36:16 thorpej Exp $ */
/* $NetBSD: pciide.c,v 1.123 2001/07/23 14:55:26 bouyer Exp $ */
/*
@ -3091,8 +3091,12 @@ hpt_chip_map(sc, pa)
printf(": Triones/Highpoint ");
if (revision == HPT370_REV)
printf("HPT370 IDE Controller\n");
else
else if (revision == HPT370A_REV)
printf("HPT370A IDE Controller\n");
else if (revision == HPT366_REV)
printf("HPT366 IDE Controller\n");
else
printf("unknown HPT IDE controller rev %d\n", revision);
/*
* when the chip is in native mode it identifies itself as a
@ -3103,7 +3107,7 @@ hpt_chip_map(sc, pa)
} else {
interface = PCIIDE_INTERFACE_BUS_MASTER_DMA |
PCIIDE_INTERFACE_PCI(0);
if (revision == HPT370_REV)
if (revision == HPT370_REV || revision == HPT370A_REV)
interface |= PCIIDE_INTERFACE_PCI(1);
}
@ -3171,7 +3175,7 @@ hpt_chip_map(sc, pa)
wdcattach(&cp->wdc_channel);
hpt_setup_channel(&cp->wdc_channel);
}
if (revision == HPT370_REV) {
if (revision == HPT370_REV || revision == HPT370A_REV) {
/*
* HPT370_REV has a bit to disable interrupts, make sure
* to clear it

View File

@ -1,4 +1,4 @@
/* $NetBSD: pciide_hpt_reg.h,v 1.3 2001/01/05 15:20:53 bouyer Exp $ */
/* $NetBSD: pciide_hpt_reg.h,v 1.4 2001/07/23 14:55:27 bouyer Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@ -46,6 +46,7 @@
*/
#define HPT366_REV 0x01
#define HPT370_REV 0x03
#define HPT370A_REV 0x04
#define HPT_IDETIM(chan, drive) (0x40 + ((drive) * 4) + ((chan) * 8))
#define HPT_IDETIM_BUFEN 0x80000000