#define CREATE_BUF_LEN 48
char buf[CREATE_BUF_LEN];
- snprintf(buf, CREATE_BUF_LEN, "IODMAController%08lX", phandle);
+ snprintf(buf, CREATE_BUF_LEN, "IODMAController%08X", (uint32_t)phandle);
return OSSymbol::withCString(buf);
}
// Find the name of the parent dma controller
dmaParentData = OSDynamicCast(OSData, provider->getProperty("dma-parent"));
- if (dmaParentData == 0) return false;
- dmaParentName = createControllerName(*(UInt32 *)dmaParentData->getBytesNoCopy());
- if (dmaParentName == 0) return false;
+ if (dmaParentData == 0) return NULL;
+
+ if (dmaParentData->getLength() == sizeof(UInt32)) {
+ dmaParentName = createControllerName(*(UInt32 *)dmaParentData->getBytesNoCopy());
+ } else {
+ if (dmaIndex >= dmaParentData->getLength() / sizeof(UInt32))
+ panic("dmaIndex out of range");
+ dmaParentName = createControllerName(*(UInt32 *)dmaParentData->getBytesNoCopy(dmaIndex * sizeof(UInt32), sizeof(UInt32)));
+ }
+ if (dmaParentName == 0) return NULL;
// Wait for the parent dma controller
dmaController = OSDynamicCast(IODMAController, IOService::waitForService(IOService::nameMatching(dmaParentName)));
dmaES->completeDMACommand(dmaCommand);
}
-void IODMAController::notifyDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount)
+void IODMAController::notifyDMACommand(IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount, AbsoluteTime timeStamp)
{
- dmaES->notifyDMACommand(dmaCommand, status, actualByteCount);
+ dmaES->notifyDMACommand(dmaCommand, status, actualByteCount, timeStamp);
}