diff options
author | grehan <grehan@FreeBSD.org> | 2003-01-09 01:22:30 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2003-01-09 01:22:30 +0000 |
commit | 7b0b5d2550882961ee88eda12703735dfc55aede (patch) | |
tree | c724db32f87e24345c49f56f3f5e8372a9e47895 /sys/powerpc | |
parent | 8234c83805f79b4072d5f4edddbb0f0d13cb1c97 (diff) | |
download | FreeBSD-src-7b0b5d2550882961ee88eda12703735dfc55aede.zip FreeBSD-src-7b0b5d2550882961ee88eda12703735dfc55aede.tar.gz |
- remove unneeded includes
- fix big in use of rid for SYS_RES_IRQ
- catch up with ATA common code by adding lock function
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powermac/ata_macio.c | 22 |
1 files changed, 17 insertions, 5 deletions
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 <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/disk.h> #include <sys/module.h> #include <sys/bus.h> -#include <sys/bio.h> #include <sys/malloc.h> -#include <sys/devicestat.h> -#include <sys/sysctl.h> #include <machine/stdarg.h> #include <machine/resource.h> #include <machine/bus.h> @@ -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); } |