Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/sibyte/ata_zbbus.c
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | ata_zbbus_attach(device_t dev) | ||||
ch = device_get_softc(dev); | ch = device_get_softc(dev); | ||||
if (ch->attached) | if (ch->attached) | ||||
return (0); | return (0); | ||||
ch->attached = 1; | ch->attached = 1; | ||||
rid = 0; | rid = 0; | ||||
io = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE); | io = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); | ||||
if (io == NULL) | if (io == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* | /* | ||||
* SWARM needs an address shift of 5 when accessing ATA registers. | * SWARM needs an address shift of 5 when accessing ATA registers. | ||||
* | * | ||||
* For e.g. an access to register 4 actually needs an address | * For e.g. an access to register 4 actually needs an address | ||||
* of (4 << 5) to be output on the generic bus. | * of (4 << 5) to be output on the generic bus. | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |