diff options
author | grehan <grehan@FreeBSD.org> | 2004-04-23 23:39:53 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2004-04-23 23:39:53 +0000 |
commit | 37a55c7ec422afd8d71d38197362659be6a4a63b (patch) | |
tree | 83378379ec17fc18fb80befc230aaf0ad5639b9d /sys | |
parent | 67d79f0cfb20d67bff147283fb167115ae7943bf (diff) | |
download | FreeBSD-src-37a55c7ec422afd8d71d38197362659be6a4a63b.zip FreeBSD-src-37a55c7ec422afd8d71d38197362659be6a4a63b.tar.gz |
- Catch up with recent ATA changes.
- Remove trailing space in ata_macio.c
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/powermac/ata_kauai.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powermac/ata_macio.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/powerpc/powermac/ata_kauai.c b/sys/powerpc/powermac/ata_kauai.c index f8817b1..47d8115 100644 --- a/sys/powerpc/powermac/ata_kauai.c +++ b/sys/powerpc/powermac/ata_kauai.c @@ -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)); } diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c index 0a0983f..127defe 100644 --- a/sys/powerpc/powermac/ata_macio.c +++ b/sys/powerpc/powermac/ata_macio.c @@ -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)); } |