1
0
Fork 0
forked from len0rd/rockbox

Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.

This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-11-01 16:14:28 +00:00
parent 646cac0bde
commit 2f8a0081c6
64 changed files with 541 additions and 554 deletions

View file

@ -38,6 +38,7 @@
#include "rtc.h"
#include "power.h"
#include "ata_idle_notify.h"
#include "storage.h"
#include "screens.h"
#include "ctype.h"
#include "file.h"
@ -582,11 +583,11 @@ void status_save(void)
{
update_runtime();
#ifdef HAVE_RTC_RAM
/* this will be done in the ata_callback if
/* this will be done in the storage_callback if
target doesnt have rtc ram */
write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE);
#else
register_ata_idle_func(flush_global_status_callback);
register_storage_idle_func(flush_global_status_callback);
#endif
}
@ -594,11 +595,11 @@ int settings_save(void)
{
update_runtime();
#ifdef HAVE_RTC_RAM
/* this will be done in the ata_callback if
/* this will be done in the storage_callback if
target doesnt have rtc ram */
write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE);
#endif
register_ata_idle_func(flush_config_block_callback);
register_storage_idle_func(flush_config_block_callback);
return 0;
}
@ -768,7 +769,7 @@ void settings_apply(bool read_disk)
buttonlight_set_timeout(global_settings.buttonlight_timeout);
#endif
#ifdef HAVE_DISK_STORAGE
ata_spindown(global_settings.disk_spindown);
storage_spindown(global_settings.disk_spindown);
#endif
#if (CONFIG_CODEC == MAS3507D) && !defined(SIMULATOR)
dac_line_in(global_settings.line_in);