mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Sansa AMS: disable SD clocks when not in use (copied from FS#9570)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19280 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
50519416ca
commit
ce851c0c67
1 changed files with 5 additions and 0 deletions
|
|
@ -405,6 +405,9 @@ int sd_init(void)
|
|||
sd_init_card(SD_SLOT_AS3525);
|
||||
#endif
|
||||
/* init mutex */
|
||||
|
||||
sd_enable(false);
|
||||
|
||||
mutex_init(&sd_mtx);
|
||||
|
||||
queue_init(&sd_queue, true);
|
||||
|
|
@ -493,6 +496,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
|
|||
#endif
|
||||
|
||||
mutex_lock(&sd_mtx);
|
||||
sd_enable(true);
|
||||
|
||||
#ifdef HAVE_MULTIVOLUME
|
||||
if (drive != 0 && !card_detect_target())
|
||||
|
|
@ -579,6 +583,7 @@ static int sd_transfer_sectors(IF_MV2(int drive,) unsigned long start,
|
|||
|
||||
while (1)
|
||||
{
|
||||
sd_enable(false);
|
||||
mutex_unlock(&sd_mtx);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue