Skip to content

Commit

Permalink
pifile: fix DMA check
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Sep 7, 2024
1 parent 2e6accb commit e505c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pifile.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static int __pifile_read(void *file, uint8_t *buf, int len)
return 0;

// Check if we can DMA directly to the output buffer
if (((f->base + f->ptr) ^ (uint32_t)buf) == 0) {
if ((((f->base + f->ptr) ^ (uint32_t)buf) & 1) == 0) {
data_cache_hit_writeback_invalidate(buf, len);
dma_read_async(buf, f->base + f->ptr, len);
dma_wait();
Expand Down

0 comments on commit e505c84

Please sign in to comment.