On Fri, Apr 21, 2023 at 11:21 AM Vijaya Krishna Nivarthi
<quic_vnivarth@xxxxxxxxxxx> wrote:
Oh! Of course, that's right. So you are correct, you'd need to addIf we were to have a linked list of descriptors that we can parse andIsn't that exactly the same value as "data_address"? Sure,
free, it would require 2 more fields
this_descriptor_dma - dma address of the current descriptor
"data_address" is a u32 and the DMA address is 64-bits, but elsewhere
in the code you already rely on the fact that the upper bits of the
DMA address are 0 when you do:
No; data_address is the dma_address mapped to the xfer buffer.
This is provided by spi framework and retrieved from sgl.
"this_descriptor" would be the dma_address of the current cmd_descriptor.
this is returned from dma_pool_alloc()
this would be required for freeing.
"this_descriptor_dma", but not the virtual address since that would be
the same as the address of the structure via the list_node_t. I guess
I won't insist on using a linked list even though it seems more
elegant to me. In the very least it should fall back to PIO if the
array isn't enough and if we need to change it later we always can.
-Doug