- Catch up with recent ATA changes.

- Remove trailing space in ata_macio.c
This commit is contained in:
Peter Grehan 2004-04-23 23:39:53 +00:00
parent 6b2fc10b64
commit 50069af197
2 changed files with 9 additions and 6 deletions

View File

@ -169,6 +169,7 @@ ata_kauai_probe(device_t dev)
}
ch = device_get_softc(dev);
bzero(ch, sizeof(struct ata_channel));
rid = PCIR_BARS;
mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
@ -192,6 +193,7 @@ ata_kauai_probe(device_t dev)
ch->locking = ata_kauai_locknoop;
ch->device[MASTER].setmode = ata_kauai_setmode;
ch->device[SLAVE].setmode = ata_kauai_setmode;
ata_generic_hw(ch);
return (ata_probe(dev));
}

View File

@ -50,9 +50,9 @@
#include <dev/ofw/openfirm.h>
#include <powerpc/powermac/maciovar.h>
/*
/*
* Offset to control registers from base
*/
*/
#define ATA_MACIO_ALTOFFSET 0x160
/*
@ -109,14 +109,14 @@ ata_macio_probe(device_t dev)
return (ENXIO);
ch = device_get_softc(dev);
bzero(ch, sizeof(struct ata_channel));
rid = 0;
mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~1, 1,
RF_ACTIVE);
mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
if (mem == NULL) {
device_printf(dev, "could not allocate memory\n");
return (ENXIO);
}
}
/*
* Set up the resource vectors
@ -128,11 +128,12 @@ ata_macio_probe(device_t dev)
ch->r_io[ATA_ALTSTAT].res = mem;
ch->r_io[ATA_ALTSTAT].offset = ATA_MACIO_ALTOFFSET;
ch->unit = 0;
ch->unit = 0;
ch->flags |= ATA_USE_16BIT;
ch->locking = ata_macio_locknoop;
ch->device[MASTER].setmode = ata_macio_setmode;
ch->device[SLAVE].setmode = ata_macio_setmode;
ata_generic_hw(ch);
return (ata_probe(dev));
}