• Manivannan Sadhasivam's avatar
    bus: mhi: ep: Add support for reading from the host · 20c01fde
    Manivannan Sadhasivam authored
    
    
    Data transfer between host and the ep device happens over the transfer
    ring associated with each bi-directional channel pair. Host defines the
    transfer ring by allocating memory for it. The read and write pointer
    addresses of the transfer ring are stored in the channel context.
    
    Once host places the elements in the transfer ring, it increments the
    write pointer and rings the channel doorbell. Device will receive the
    doorbell interrupt and will process the transfer ring elements.
    
    This commit adds support for reading the transfer ring elements from
    the transfer ring till write pointer, incrementing the read pointer and
    finally sending the completion event to the host through corresponding
    event ring.
    Reviewed-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    20c01fde
main.c 36.9 KB