diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-11-24 03:59:21 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-11-24 03:59:21 +0000 |
commit | 5d21c8cb1db547580b8b0cabbee6dd773143d39d (patch) | |
tree | bd389188ef2cf4ad91d4ece8718948d334bcdfae /firmware/target | |
parent | 4c3a19f1b480c726b32d25e3b2fbaf3018a0d5e0 (diff) |
First part of FS#9570 by Antonius Hellmann. Disables power to the SD memory when not in use. Gives a sizeable power savings (4 mA by his measurement).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19194 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/ata-sd-pp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c index 8ebec39fa8..8f2ee503d8 100644 --- a/firmware/target/arm/ata-sd-pp.c +++ b/firmware/target/arm/ata-sd-pp.c @@ -758,7 +758,7 @@ int sd_read_sectors(IF_MV2(int drive,) unsigned long start, int incount, /* TODO: Add DMA support. */ mutex_lock(&sd_mtx); - + sd_enable(true); sd_led(true); sd_read_retry: @@ -844,6 +844,7 @@ sd_read_retry: while (1) { sd_led(false); + sd_enable(false); mutex_unlock(&sd_mtx); return ret; @@ -873,7 +874,7 @@ int sd_write_sectors(IF_MV2(int drive,) unsigned long start, int count, int bank; mutex_lock(&sd_mtx); - + sd_enable(true); sd_led(true); sd_write_retry: @@ -972,6 +973,7 @@ sd_write_retry: while (1) { sd_led(false); + sd_enable(false); mutex_unlock(&sd_mtx); return ret; |