mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Sansa AMS: Disable DMA clocks when not in use
Add dma_retain() and dma_release() to reference count the users git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19344 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3e4f3fe70e
commit
e97191faa7
4 changed files with 30 additions and 3 deletions
|
|
@ -568,6 +568,8 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
|
|||
goto sd_transfer_error;
|
||||
}
|
||||
|
||||
dma_retain();
|
||||
|
||||
while(count)
|
||||
{
|
||||
/* 128 * 512 = 2^16, and doesn't fit in the 16 bits of DATA_LENGTH
|
||||
|
|
@ -628,6 +630,8 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
|
|||
|
||||
while (1)
|
||||
{
|
||||
dma_release();
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
sd_enable(false);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue