diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-25 11:10:40 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-25 11:10:40 +0000 |
commit | 8de2af7b9c52c305231c07a166063baa5496ac2e (patch) | |
tree | 3374dd24f707889c66797c2d6d9f72cbd2c6b7f9 /firmware/target/arm/as3525 | |
parent | f54739a1a1b61c9b282785f88b823a436c3103df (diff) | |
download | rockbox-8de2af7b9c52c305231c07a166063baa5496ac2e.tar.gz 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/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 2 |
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) | |||
669 | dma_retain(); | 669 | dma_retain(); |
670 | /* we don't use the uncached buffer here, because we need the | 670 | /* we don't use the uncached buffer here, because we need the |
671 | * physical memory address for DMA transfers */ | 671 | * physical memory address for DMA transfers */ |
672 | dma_enable_channel(0, aligned_buffer, MCI_FIFO(INTERNAL_AS3525), | 672 | dma_enable_channel(0, AS3525_PHYSICAL_ADDR(&aligned_buffer[0]), |
673 | DMA_PERI_SD, DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8, | 673 | MCI_FIFO(INTERNAL_AS3525), DMA_PERI_SD, |
674 | NULL); | 674 | DMAC_FLOWCTRL_PERI_MEM_TO_PERI, true, false, 0, DMA_S8, NULL); |
675 | 675 | ||
676 | MCI_DATA_TIMER(INTERNAL_AS3525) = SD_MAX_WRITE_TIMEOUT; | 676 | MCI_DATA_TIMER(INTERNAL_AS3525) = SD_MAX_WRITE_TIMEOUT; |
677 | MCI_DATA_LENGTH(INTERNAL_AS3525) = 512; | 677 | MCI_DATA_LENGTH(INTERNAL_AS3525) = 512; |
@@ -790,7 +790,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, | |||
790 | } | 790 | } |
791 | else | 791 | else |
792 | { | 792 | { |
793 | dma_buf = aligned_buffer; | 793 | dma_buf = AS3525_PHYSICAL_ADDR(&aligned_buffer[0]); |
794 | if(transfer > UNALIGNED_NUM_SECTORS) | 794 | if(transfer > UNALIGNED_NUM_SECTORS) |
795 | transfer = UNALIGNED_NUM_SECTORS; | 795 | transfer = UNALIGNED_NUM_SECTORS; |
796 | 796 | ||
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, | |||
886 | } | 886 | } |
887 | else | 887 | else |
888 | { | 888 | { |
889 | dma_buf = aligned_buffer; | 889 | dma_buf = AS3525(&aligned_buffer[0]); |
890 | if(transfer > UNALIGNED_NUM_SECTORS) | 890 | if(transfer > UNALIGNED_NUM_SECTORS) |
891 | transfer = UNALIGNED_NUM_SECTORS; | 891 | transfer = UNALIGNED_NUM_SECTORS; |
892 | 892 | ||