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:
Rafaël Carré 2010-08-25 11:10:40 +00:00
parent f54739a1a1
commit 8de2af7b9c
2 changed files with 5 additions and 5 deletions

View file

@ -669,9 +669,9 @@ static int sd_select_bank(signed char bank)
dma_retain(); dma_retain();
/* we don't use the uncached buffer here, because we need the /* we don't use the uncached buffer here, because we need the
* physical memory address for DMA transfers */ * physical memory address for DMA transfers */
dma_enable_channel(0, aligned_buffer, MCI_FIFO(INTERNAL_AS3525), dma_enable_channel(0, AS3525_PHYSICAL_ADDR(&aligned_buffer[0]),
DMA_PERI_SD, DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8, MCI_FIFO(INTERNAL_AS3525), DMA_PERI_SD,
NULL); DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8, NULL);
MCI_DATA_TIMER(INTERNAL_AS3525) = SD_MAX_WRITE_TIMEOUT; MCI_DATA_TIMER(INTERNAL_AS3525) = SD_MAX_WRITE_TIMEOUT;
MCI_DATA_LENGTH(INTERNAL_AS3525) = 512; MCI_DATA_LENGTH(INTERNAL_AS3525) = 512;
@ -790,7 +790,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
} }
else else
{ {
dma_buf = aligned_buffer; dma_buf = AS3525_PHYSICAL_ADDR(&aligned_buffer[0]);
if(transfer > UNALIGNED_NUM_SECTORS) if(transfer > UNALIGNED_NUM_SECTORS)
transfer = UNALIGNED_NUM_SECTORS; transfer = UNALIGNED_NUM_SECTORS;

View file

@ -886,7 +886,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
} }
else else
{ {
dma_buf = aligned_buffer; dma_buf = AS3525(&aligned_buffer[0]);
if(transfer > UNALIGNED_NUM_SECTORS) if(transfer > UNALIGNED_NUM_SECTORS)
transfer = UNALIGNED_NUM_SECTORS; transfer = UNALIGNED_NUM_SECTORS;