1.1 --- a/pkg/devices/lib/msc/src/jz4780.cc Thu Feb 15 23:15:30 2024 +0100
1.2 +++ b/pkg/devices/lib/msc/src/jz4780.cc Thu Feb 15 23:18:09 2024 +0100
1.3 @@ -50,7 +50,7 @@
1.4 }
1.5
1.6 // Request the transfer of the indicated number of bytes between two physical
1.7 -// addresses in the indicated direction, returning the number of bytes
1.8 +// addresses in the indicated direction, returning the number of bytes to be
1.9 // transferred.
1.10 // NOTE: To be consolidated into a generic method that uses generic request types.
1.11
1.12 @@ -70,7 +70,7 @@
1.13 4, 4, unit_size,
1.14 recv ? _request_type_in : _request_type_out);
1.15
1.16 - return to_transfer - _dma->wait() * unit_size;
1.17 + return to_transfer * unit_size;
1.18 }
1.19
1.20
1.21 @@ -126,8 +126,10 @@
1.22 static_cast<Msc_channel *>(msc_channel)->enable();
1.23 }
1.24
1.25 -uint32_t jz4780_msc_read_block(void *msc_channel, uint8_t card,
1.26 - l4re_dma_space_dma_addr_t paddr)
1.27 +uint32_t jz4780_msc_read_blocks(void *msc_channel, uint8_t card,
1.28 + l4re_dma_space_dma_addr_t paddr,
1.29 + uint32_t block_address, uint32_t block_count)
1.30 {
1.31 - return static_cast<Msc_channel *>(msc_channel)->read_block(card, paddr);
1.32 + return static_cast<Msc_channel *>(msc_channel)->read_blocks(card, paddr,
1.33 + block_address, block_count);
1.34 }