Catch up with ATAng changes

This commit is contained in:
Peter Grehan 2003-02-24 03:12:30 +00:00
parent 63b117a6b7
commit 597dc6637a
2 changed files with 24 additions and 19 deletions

View File

@ -41,6 +41,7 @@
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <sys/ata.h>
#include <dev/ata/ata-all.h>
#include <dev/ofw/openfirm.h>
@ -285,19 +286,18 @@ static driver_t ata_macio_sub_driver = {
DRIVER_MODULE(ata, atamacio, ata_macio_sub_driver, ata_devclass, 0, 0);
static int
ata_macio_intrnoop(struct ata_channel *ch)
{
return (1);
}
static void
ata_macio_locknoop(struct ata_channel *ch, int type)
{
/* XXX SMP ? */
}
static void
ata_macio_setmode(struct ata_device *atadev, int mode)
{
atadev->mode = ATA_PIO;
}
static int
ata_macio_sub_probe(device_t dev)
{
@ -306,9 +306,13 @@ ata_macio_sub_probe(device_t dev)
ch = device_get_softc(dev);
ch->unit = 0;
ch->flags = ATA_USE_16BIT;
ch->intr_func = ata_macio_intrnoop;
ch->lock_func = ata_macio_locknoop;
ch->flags |= ATA_USE_16BIT;
ch->locking = ata_macio_locknoop;
ch->device[MASTER].setmode = ata_macio_setmode;
ch->device[SLAVE].setmode = ata_macio_setmode;
return (ata_probe(dev));
}

View File

@ -41,6 +41,7 @@
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <sys/ata.h>
#include <dev/ata/ata-all.h>
#include <dev/ofw/openfirm.h>
@ -228,18 +229,17 @@ static driver_t ata_iobus_sub_driver = {
DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, 0, 0);
static int
ata_iobus_intrnoop(struct ata_channel *ch)
{
return (1);
}
static void
ata_iobus_locknoop(struct ata_channel *ch, int type)
{
}
static void
ata_iobus_setmode(struct ata_device *atadev, int mode)
{
atadev->mode = ATA_PIO;
}
static int
ata_iobus_sub_probe(device_t dev)
{
@ -248,8 +248,9 @@ ata_iobus_sub_probe(device_t dev)
/* Only a single unit per controller thus far */
ch->unit = 0;
ch->flags = (ATA_USE_16BIT|ATA_NO_SLAVE);
ch->intr_func = ata_iobus_intrnoop;
ch->lock_func = ata_iobus_locknoop;
ch->locking = ata_iobus_locknoop;
ch->device[MASTER].setmode = ata_iobus_setmode;
ch->device[SLAVE].setmode = ata_iobus_setmode;
return ata_probe(dev);
}