diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2008-12-01 04:17:39 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2008-12-01 04:17:39 +0000 |
commit | ce851c0c67f54868f72f83bd09b0e25b6a7a3109 (patch) | |
tree | 3b300666aa06dc5510d8f100b7cad193aa0eff6e /firmware/target/arm | |
parent | 50519416ca1c591f16fd4c59107e9c10eb4e2380 (diff) |
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
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index f6c8b2de24..2270894be5 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c @@ -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; |