mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
sd-as3525*: use AS3525_PHYSICAL_ADDR
fix DMA buffers when the src/dst is in IRAM It worked fine because all the buffers are in DRAM, and the virtual address happens to be the physical address git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27876 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f54739a1a1
commit
8de2af7b9c
2 changed files with 5 additions and 5 deletions
|
|
@ -669,9 +669,9 @@ static int sd_select_bank(signed char bank)
|
|||
dma_retain();
|
||||
/* we don't use the uncached buffer here, because we need the
|
||||
* physical memory address for DMA transfers */
|
||||
dma_enable_channel(0, aligned_buffer, MCI_FIFO(INTERNAL_AS3525),
|
||||
DMA_PERI_SD, DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8,
|
||||
NULL);
|
||||
dma_enable_channel(0, AS3525_PHYSICAL_ADDR(&aligned_buffer[0]),
|
||||
MCI_FIFO(INTERNAL_AS3525), DMA_PERI_SD,
|
||||
DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8, NULL);
|
||||
|
||||
MCI_DATA_TIMER(INTERNAL_AS3525) = SD_MAX_WRITE_TIMEOUT;
|
||||
MCI_DATA_LENGTH(INTERNAL_AS3525) = 512;
|
||||
|
|
@ -790,7 +790,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
|
|||
}
|
||||
else
|
||||
{
|
||||
dma_buf = aligned_buffer;
|
||||
dma_buf = AS3525_PHYSICAL_ADDR(&aligned_buffer[0]);
|
||||
if(transfer > UNALIGNED_NUM_SECTORS)
|
||||
transfer = UNALIGNED_NUM_SECTORS;
|
||||
|
||||
|
|
|
|||
|
|
@ -886,7 +886,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
|
|||
}
|
||||
else
|
||||
{
|
||||
dma_buf = aligned_buffer;
|
||||
dma_buf = AS3525(&aligned_buffer[0]);
|
||||
if(transfer > UNALIGNED_NUM_SECTORS)
|
||||
transfer = UNALIGNED_NUM_SECTORS;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue