diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-11-08 01:55:26 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-11-08 01:55:26 +0000 |
commit | f184152c0501a80e95ad871927d766fdee50281b (patch) | |
tree | ecfa4b6cdf24065b32467d6d7274a2659c3ec9b0 /firmware/drivers/ata_mmc.c | |
parent | 5dd07759248fec1407f6b3d4d1fb177554e45a13 (diff) |
* changes to ata.c - idle callbacks are called after 2 sec of real idle,
and shutdown and usb (it makes sense here). ata_sleep doesnt get broken
by callbacks.
* allow ata_sleep() at the end of buffering again
* config block uses ata_idle instead of delayed sector when saving
* remove delayed sector code from ata_mmc.c (idle callbacks are not yet
implemented for ata_mmc.c tho)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata_mmc.c')
-rw-r--r-- | firmware/drivers/ata_mmc.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index 6303ca2851..64a7ba4bfd 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c @@ -98,9 +98,6 @@ static bool mmc_monitor_enabled = true; #endif static bool initialized = false; static bool new_mmc_circuit; -static bool delayed_write = false; -static unsigned char delayed_sector[SECTOR_SIZE]; -static int delayed_sector_num; static enum { MMC_UNKNOWN, @@ -805,10 +802,6 @@ int ata_read_sectors(IF_MV2(int drive,) deselect_card(); - /* only flush if reading went ok */ - if ( (rc == 0) && delayed_write ) - ata_flush(); - return rc; } @@ -960,33 +953,9 @@ int ata_write_sectors(IF_MV2(int drive,) deselect_card(); - /* only flush if writing went ok */ - if ( (rc == 0) && delayed_write ) - ata_flush(); - return rc; } -/* While there is no spinup, the delayed write is still here to avoid - wearing the flash unnecessarily */ -extern void ata_delayed_write(unsigned long sector, const void* buf) -{ - memcpy(delayed_sector, buf, SECTOR_SIZE); - delayed_sector_num = sector; - delayed_write = true; -} - -/* write the delayed sector to volume 0 */ -extern void ata_flush(void) -{ - if ( delayed_write ) - { - DEBUGF("ata_flush()\n"); - delayed_write = false; - ata_write_sectors(IF_MV2(0,) delayed_sector_num, 1, delayed_sector); - } -} - void ata_spindown(int seconds) { (void)seconds; |