Make the alpha hacks dependant on __alpha__ instead of !__i386__.

This commit is contained in:
dfr 2000-09-29 16:50:31 +00:00
parent 26e3a50f83
commit ee266293b6

View File

@ -583,14 +583,14 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
return 0; return 0;
if (masterdev) { if (masterdev) {
#ifdef __i386__ #ifdef __alpha__
return alpha_platform_alloc_ide_intr(unit);
#else
int irq = (unit == 0 ? 14 : 15); int irq = (unit == 0 ? 14 : 15);
return BUS_ALLOC_RESOURCE(device_get_parent(dev), child, return BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
SYS_RES_IRQ, rid, SYS_RES_IRQ, rid,
irq, irq, 1, flags & ~RF_SHAREABLE); irq, irq, 1, flags & ~RF_SHAREABLE);
#else
return alpha_platform_alloc_ide_intr(unit);
#endif #endif
} else { } else {
/* primary and secondary channels share the same interrupt */ /* primary and secondary channels share the same interrupt */
@ -650,11 +650,11 @@ ata_pci_release_resource(device_t dev, device_t child, int type, int rid,
return ENOENT; return ENOENT;
if (masterdev) { if (masterdev) {
#ifdef __i386__ #ifdef __alpha__
return alpha_platform_release_ide_intr(unit, r);
#else
return BUS_RELEASE_RESOURCE(device_get_parent(dev), return BUS_RELEASE_RESOURCE(device_get_parent(dev),
child, SYS_RES_IRQ, rid, r); child, SYS_RES_IRQ, rid, r);
#else
return alpha_platform_release_ide_intr(unit, r);
#endif #endif
} }
else { else {
@ -674,11 +674,11 @@ ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq,
void **cookiep) void **cookiep)
{ {
if (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) { if (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) {
#ifdef __i386__ #ifdef __alpha__
return alpha_platform_setup_ide_intr(irq, intr, arg, cookiep);
#else
return BUS_SETUP_INTR(device_get_parent(dev), child, irq, return BUS_SETUP_INTR(device_get_parent(dev), child, irq,
flags, intr, arg, cookiep); flags, intr, arg, cookiep);
#else
return alpha_platform_setup_ide_intr(irq, intr, arg, cookiep);
#endif #endif
} }
else else
@ -691,10 +691,10 @@ ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq,
void *cookie) void *cookie)
{ {
if (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) { if (pci_get_progif(dev) & PCIP_STORAGE_IDE_MASTERDEV) {
#ifdef __i386__ #ifdef __alpha__
return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie);
#else
return alpha_platform_teardown_ide_intr(irq, cookie); return alpha_platform_teardown_ide_intr(irq, cookie);
#else
return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie);
#endif #endif
} }
else else