summaryrefslogtreecommitdiff
path: root/firmware/export/storage.h
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/export/storage.h
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/export/storage.h')
-rw-r--r--firmware/export/storage.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index fc49d0ce31..cb4ad7fc3a 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -69,6 +69,9 @@ struct storage_info
69 #define storage_close() ata_close() 69 #define storage_close() ata_close()
70 #define storage_read_sectors(drive, start, count, buf) ata_read_sectors(IF_MD2(drive,) start, count, buf) 70 #define storage_read_sectors(drive, start, count, buf) ata_read_sectors(IF_MD2(drive,) start, count, buf)
71 #define storage_write_sectors(drive, start, count, buf) ata_write_sectors(IF_MD2(drive,) start, count, buf) 71 #define storage_write_sectors(drive, start, count, buf) ata_write_sectors(IF_MD2(drive,) start, count, buf)
72 #ifdef HAVE_STORAGE_FLUSH
73 #define storage_flush() (void)0
74 #endif
72 #define storage_last_disk_activity() ata_last_disk_activity() 75 #define storage_last_disk_activity() ata_last_disk_activity()
73 #define storage_spinup_time() ata_spinup_time() 76 #define storage_spinup_time() ata_spinup_time()
74 #define storage_get_identify() ata_get_identify() 77 #define storage_get_identify() ata_get_identify()
@@ -92,6 +95,9 @@ struct storage_info
92 #define storage_init() sd_init() 95 #define storage_init() sd_init()
93 #define storage_read_sectors(drive, start, count, buf) sd_read_sectors(IF_MD2(drive,) start, count, buf) 96 #define storage_read_sectors(drive, start, count, buf) sd_read_sectors(IF_MD2(drive,) start, count, buf)
94 #define storage_write_sectors(drive, start, count, buf) sd_write_sectors(IF_MD2(drive,) start, count, buf) 97 #define storage_write_sectors(drive, start, count, buf) sd_write_sectors(IF_MD2(drive,) start, count, buf)
98 #ifdef HAVE_STORAGE_FLUSH
99 #define storage_flush() (void)0
100 #endif
95 #define storage_last_disk_activity() sd_last_disk_activity() 101 #define storage_last_disk_activity() sd_last_disk_activity()
96 #define storage_spinup_time() 0 102 #define storage_spinup_time() 0
97 #define storage_get_identify() sd_get_identify() 103 #define storage_get_identify() sd_get_identify()
@@ -115,6 +121,9 @@ struct storage_info
115 #define storage_init() mmc_init() 121 #define storage_init() mmc_init()
116 #define storage_read_sectors(drive, start, count, buf) mmc_read_sectors(IF_MD2(drive,) start, count, buf) 122 #define storage_read_sectors(drive, start, count, buf) mmc_read_sectors(IF_MD2(drive,) start, count, buf)
117 #define storage_write_sectors(drive, start, count, buf) mmc_write_sectors(IF_MD2(drive,) start, count, buf) 123 #define storage_write_sectors(drive, start, count, buf) mmc_write_sectors(IF_MD2(drive,) start, count, buf)
124 #ifdef HAVE_STORAGE_FLUSH
125 #define storage_flush() (void)0
126 #endif
118 #define storage_last_disk_activity() mmc_last_disk_activity() 127 #define storage_last_disk_activity() mmc_last_disk_activity()
119 #define storage_spinup_time() 0 128 #define storage_spinup_time() 0
120 #define storage_get_identify() mmc_get_identify() 129 #define storage_get_identify() mmc_get_identify()
@@ -138,6 +147,9 @@ struct storage_info
138 #define storage_init() nand_init() 147 #define storage_init() nand_init()
139 #define storage_read_sectors(drive, start, count, buf) nand_read_sectors(IF_MD2(drive,) start, count, buf) 148 #define storage_read_sectors(drive, start, count, buf) nand_read_sectors(IF_MD2(drive,) start, count, buf)
140 #define storage_write_sectors(drive, start, count, buf) nand_write_sectors(IF_MD2(drive,) start, count, buf) 149 #define storage_write_sectors(drive, start, count, buf) nand_write_sectors(IF_MD2(drive,) start, count, buf)
150 #ifdef HAVE_STORAGE_FLUSH
151 #define storage_flush() nand_flush()
152 #endif
141 #define storage_last_disk_activity() nand_last_disk_activity() 153 #define storage_last_disk_activity() nand_last_disk_activity()
142 #define storage_spinup_time() 0 154 #define storage_spinup_time() 0
143 #define storage_get_identify() nand_get_identify() 155 #define storage_get_identify() nand_get_identify()
@@ -161,6 +173,9 @@ struct storage_info
161 #define storage_init() ramdisk_init() 173 #define storage_init() ramdisk_init()
162 #define storage_read_sectors(drive, start, count, buf) ramdisk_read_sectors(IF_MD2(drive,) start, count, buf) 174 #define storage_read_sectors(drive, start, count, buf) ramdisk_read_sectors(IF_MD2(drive,) start, count, buf)
163 #define storage_write_sectors(drive, start, count, buf) ramdisk_write_sectors(IF_MD2(drive,) start, count, buf) 175 #define storage_write_sectors(drive, start, count, buf) ramdisk_write_sectors(IF_MD2(drive,) start, count, buf)
176 #ifdef HAVE_STORAGE_FLUSH
177 #define storage_flush() (void)0
178 #endif
164 #define storage_last_disk_activity() ramdisk_last_disk_activity() 179 #define storage_last_disk_activity() ramdisk_last_disk_activity()
165 #define storage_spinup_time() 0 180 #define storage_spinup_time() 0
166 #define storage_get_identify() ramdisk_get_identify() 181 #define storage_get_identify() ramdisk_get_identify()
@@ -187,6 +202,7 @@ int storage_soft_reset(void);
187int storage_init(void); 202int storage_init(void);
188int storage_read_sectors(int drive, unsigned long start, int count, void* buf); 203int storage_read_sectors(int drive, unsigned long start, int count, void* buf);
189int storage_write_sectors(int drive, unsigned long start, int count, const void* buf); 204int storage_write_sectors(int drive, unsigned long start, int count, const void* buf);
205int storage_flush(void);
190void storage_spin(void); 206void storage_spin(void);
191void storage_spindown(int seconds); 207void storage_spindown(int seconds);
192long storage_last_disk_activity(void); 208long storage_last_disk_activity(void);