X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..15129b1c8dbb3650c63b70adb1cad9af601c6c17:/iokit/IOKit/IODMAEventSource.h diff --git a/iokit/IOKit/IODMAEventSource.h b/iokit/IOKit/IODMAEventSource.h index ce68f6f86..58d851bf9 100644 --- a/iokit/IOKit/IODMAEventSource.h +++ b/iokit/IOKit/IODMAEventSource.h @@ -34,6 +34,8 @@ #include #include +class IODMAController; + class IODMAEventSource : public IOEventSource { OSDeclareDefaultStructors(IODMAEventSource); @@ -41,12 +43,12 @@ class IODMAEventSource : public IOEventSource friend class IODMAController; public: - typedef void (*Action)(OSObject *owner, IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); + typedef void (*Action)(OSObject *owner, IODMAEventSource *dmaES, IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount, AbsoluteTime timeStamp); #define IODMAEventAction IODMAEventSource::Action protected: virtual void completeDMACommand(IODMACommand *dmaCommand); - virtual void notifyDMACommand(IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount); + virtual void notifyDMACommand(IODMACommand *dmaCommand, IOReturn status, IOByteCount actualByteCount, AbsoluteTime timeStamp); public: static IODMAEventSource *dmaEventSource(OSObject *owner, @@ -56,9 +58,16 @@ class IODMAEventSource : public IOEventSource UInt32 dmaIndex = 0); virtual IOReturn startDMACommand(IODMACommand *dmaCommand, IODirection direction, IOByteCount byteCount = 0, IOByteCount byteOffset = 0); - virtual IOReturn stopDMACommand(bool flush = false, mach_timespec_t *timeout = 0); - + virtual IOReturn stopDMACommand(bool flush = false, uint64_t timeout = UINT64_MAX); + virtual IOReturn queryDMACommand(IODMACommand **dmaCommand, IOByteCount *transferCount, bool waitForIdle = false); + + virtual IOByteCount getFIFODepth(IODirection direction = kIODirectionNone); + virtual IOReturn setFIFODepth(IOByteCount depth); + virtual IOByteCount validFIFODepth(IOByteCount depth, IODirection direction); + + virtual IOReturn setDMAConfig(UInt32 dmaIndex); + virtual bool validDMAConfig(UInt32 dmaIndex); private: IOService *dmaProvider; @@ -76,6 +85,7 @@ class IODMAEventSource : public IOEventSource Action notification = 0, UInt32 dmaIndex = 0); virtual bool checkForWork(void); + virtual void free(void); }; #endif /* _IOKIT_IODMAEVENTSOURCE_H */