On Thu, 27 Feb 2025 at 07:32, Jason Chien <jason.ch...@sifive.com> wrote: > > This commit renames the macros to accurately reflect the direction of > DMA operations. > > EDU_DMA_TO_PCI now represents reading memory content into the EDU buffer, > while EDU_DMA_FROM_PCI represents writing EDU buffer content to memory.
The EDU device is a PCI device, so if it is reading then it is reading data from the PCI bus, and if it is writing then it is writing data to the PCI bus. So I think there's an argument that the current names make sense. Plus, presumably this device model is implementing the hardware half of a defined specification. The authoritative source for what names the 0 and 1 values of the DIR bit should be named would be that specification. Where is that spec, and what does it say? If it says 0 for FROM and 1 for TO, that's what we should use. If it's the other way around, that's an error in our device implementation that we should correct. thanks -- PMM