From 7b0b5d2550882961ee88eda12703735dfc55aede Mon Sep 17 00:00:00 2001 From: grehan Date: Thu, 9 Jan 2003 01:22:30 +0000 Subject: - remove unneeded includes - fix big in use of rid for SYS_RES_IRQ - catch up with ATA common code by adding lock function --- sys/powerpc/powermac/ata_macio.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'sys/powerpc/powermac/ata_macio.c') diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c index 6b163d1..c192e2e 100644 --- a/sys/powerpc/powermac/ata_macio.c +++ b/sys/powerpc/powermac/ata_macio.c @@ -34,13 +34,9 @@ #include #include #include -#include #include #include -#include #include -#include -#include #include #include #include @@ -185,8 +181,9 @@ ata_macio_alloc_resource(device_t dev, device_t child, int type, int *rid, * Pass this on to the parent, using the IRQ from the * ATA pseudo-bus resource */ + myrid = 0; res = bus_generic_rl_alloc_resource(device_get_parent(dev), - dev, SYS_RES_IRQ, 0, 0, ~0, 1, flags); + dev, SYS_RES_IRQ, &myrid, 0, ~0, 1, flags); return (res); } else { @@ -230,12 +227,27 @@ 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 int ata_macio_sub_probe(device_t dev) { struct ata_channel *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; return ata_probe(dev); } -- cgit v1.1