summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-25 11:10:40 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-25 11:10:40 +0000
commit8de2af7b9c52c305231c07a166063baa5496ac2e (patch)
tree3374dd24f707889c66797c2d6d9f72cbd2c6b7f9 /firmware
parentf54739a1a1b61c9b282785f88b823a436c3103df (diff)
downloadrockbox-8de2af7b9c52c305231c07a166063baa5496ac2e.tar.gz
rockbox-8de2af7b9c52c305231c07a166063baa5496ac2e.tar.bz2
rockbox-8de2af7b9c52c305231c07a166063baa5496ac2e.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sd-as3525.c8
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c
index ff41ef6215..115f2f1f0d 100644
--- a/firmware/target/arm/as3525/sd-as3525.c
+++ b/firmware/target/arm/as3525/sd-as3525.c
@@ -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;
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index e8a0719b11..1c427b36f6 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -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;