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
This commit is contained in:
Michael Sparmann 2009-10-09 20:36:09 +00:00
parent 8e3e5e7a59
commit f0a96580ae
12 changed files with 98 additions and 15 deletions

View file

@ -36,9 +36,6 @@ long last_disk_activity = -1;
/** static, private data **/
static bool initialized = false;
static long next_yield = 0;
#define MIN_YIELD_PERIOD 2000
/* API Functions */
void nand_led(bool onoff)
@ -67,6 +64,10 @@ void nand_sleep(void)
{
}
void nand_sleepnow(void)
{
}
void nand_spin(void)
{
}
@ -86,6 +87,13 @@ long nand_last_disk_activity(void)
return 0;
}
#ifdef HAVE_STORAGE_FLUSH
int nand_flush(void)
{
return ftl_sync();
}
#endif
int nand_init(void)
{
if (ftl_init()) return 1;