summaryrefslogtreecommitdiff
path: root/firmware/storage.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2009-10-09 20:36:09 +0000
committerMichael Sparmann <theseven@rockbox.org>2009-10-09 20:36:09 +0000
commitf0a96580ae84cdfbb09db568f296491c699b6a4b (patch)
tree73d71563c1ab314f322e0fe10fc80c3b7f698ab7 /firmware/storage.c
parent8e3e5e7a59f741c16eafc5ff0672af2eb1404835 (diff)
downloadrockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.tar.gz
rockbox-f0a96580ae84cdfbb09db568f296491c699b6a4b.zip
Core changes to allow storage drivers to do cleanup on shutdown, and iPod Nano 2G shutdown code rework (FS#10668)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23057 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/storage.c')
-rw-r--r--firmware/storage.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/firmware/storage.c b/firmware/storage.c
index cee7d1cc8b..d6700d1148 100644
--- a/firmware/storage.c
+++ b/firmware/storage.c
@@ -293,6 +293,35 @@ int storage_soft_reset(void)
293 return rc; 293 return rc;
294} 294}
295 295
296#ifdef HAVE_STORAGE_FLUSH
297int storage_flush(void)
298{
299 int rc=0;
300
301#if (CONFIG_STORAGE & STORAGE_ATA)
302 //if ((rc=ata_flush())) return rc;
303#endif
304
305#if (CONFIG_STORAGE & STORAGE_MMC)
306 //if ((rc=mmc_flush())) return rc;
307#endif
308
309#if (CONFIG_STORAGE & STORAGE_SD)
310 //if ((rc=sd_flush())) return rc;
311#endif
312
313#if (CONFIG_STORAGE & STORAGE_NAND)
314 if ((rc=nand_flush())) return rc;
315#endif
316
317#if (CONFIG_STORAGE & STORAGE_RAMDISK)
318 //if ((rc=ramdisk_flush())) return rc;
319#endif
320
321 return rc;
322}
323#endif
324
296void storage_spin(void) 325void storage_spin(void)
297{ 326{
298#if (CONFIG_STORAGE & STORAGE_ATA) 327#if (CONFIG_STORAGE & STORAGE_ATA)