mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
Add support for the SiS964 ATA/SATA southbridge.
This could not have been done without the support from kuriyama. Approved by: re@
This commit is contained in:
parent
d7536ac93e
commit
f584b21960
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122886
|
@ -1866,7 +1866,9 @@ ata_sis_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_SIS963, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 963" }, /* south */
|
||||
{{ ATA_SIS964_1,0x00, SISSATA, 0, ATA_SA150, "SiS 964" }, /* south */
|
||||
{ ATA_SIS964, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 964" }, /* south */
|
||||
{ ATA_SIS963, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 963" }, /* south */
|
||||
{ ATA_SIS962, 0x00, SIS133NEW, 0, ATA_UDMA6, "SiS 962" }, /* south */
|
||||
|
||||
{ ATA_SIS755, 0x00, SIS_SOUTH, 0, ATA_UDMA6, "SiS 755" }, /* ext south */
|
||||
|
@ -1905,7 +1907,7 @@ ata_sis_ident(device_t dev)
|
|||
{ 0, 0, 0, 0, 0, 0 }};
|
||||
char buffer[64];
|
||||
|
||||
if (!(idx = ata_find_chip(dev, ids, -1)))
|
||||
if (!(idx = ata_find_chip(dev, ids, -pci_get_slot(dev))))
|
||||
return ENXIO;
|
||||
|
||||
if (idx->cfg1 == SIS_SOUTH) {
|
||||
|
@ -1960,6 +1962,10 @@ ata_sis_chipinit(device_t dev)
|
|||
pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 2) & 0xfff7, 2);
|
||||
pci_write_config(dev, 0x52, pci_read_config(dev, 0x52, 2) & 0xfff7, 2);
|
||||
break;
|
||||
case SISSATA:
|
||||
pci_write_config(dev, 0x04, pci_read_config(dev, 0x04, 2) & ~0x0400, 2);
|
||||
ctlr->setmode = ata_sata_setmode;
|
||||
return 0;
|
||||
default:
|
||||
return ENXIO;
|
||||
}
|
||||
|
@ -2225,7 +2231,8 @@ ata_find_chip(device_t dev, struct ata_chip_id *index, int slot)
|
|||
|
||||
while (index->chipid != 0) {
|
||||
for (i = 0; i < nchildren; i++) {
|
||||
if (((slot >= 0 && pci_get_slot(children[i]) == slot) || slot < 0)&&
|
||||
if (((slot >= 0 && pci_get_slot(children[i]) == slot) ||
|
||||
(slot < 0 && pci_get_slot(children[i]) <= -slot)) &&
|
||||
pci_get_devid(children[i]) == index->chipid &&
|
||||
pci_get_revid(children[i]) >= index->chiprev) {
|
||||
free(children, M_TEMP);
|
||||
|
|
|
@ -206,6 +206,8 @@ struct ata_pci_controller {
|
|||
#define ATA_SIS961 0x09611039
|
||||
#define ATA_SIS962 0x09621039
|
||||
#define ATA_SIS963 0x09631039
|
||||
#define ATA_SIS964 0x09641039
|
||||
#define ATA_SIS964_1 0x01801039
|
||||
|
||||
#define ATA_VIA_ID 0x1106
|
||||
#define ATA_VIA82C571 0x05711106
|
||||
|
@ -255,12 +257,13 @@ struct ata_pci_controller {
|
|||
#define SIISETCLK 0x02
|
||||
|
||||
#define SIS_SOUTH 1
|
||||
#define SIS133NEW 2
|
||||
#define SIS133OLD 3
|
||||
#define SIS100NEW 4
|
||||
#define SIS100OLD 5
|
||||
#define SIS66 6
|
||||
#define SIS33 7
|
||||
#define SISSATA 2
|
||||
#define SIS133NEW 3
|
||||
#define SIS133OLD 4
|
||||
#define SIS100NEW 5
|
||||
#define SIS100OLD 6
|
||||
#define SIS66 7
|
||||
#define SIS33 8
|
||||
|
||||
#define VIA33 0
|
||||
#define VIA66 1
|
||||
|
|
Loading…
Reference in a new issue