diff options
Diffstat (limited to 'firmware/export/storage.h')
-rw-r--r-- | firmware/export/storage.h | 16 |
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); | |||
187 | int storage_init(void); | 202 | int storage_init(void); |
188 | int storage_read_sectors(int drive, unsigned long start, int count, void* buf); | 203 | int storage_read_sectors(int drive, unsigned long start, int count, void* buf); |
189 | int storage_write_sectors(int drive, unsigned long start, int count, const void* buf); | 204 | int storage_write_sectors(int drive, unsigned long start, int count, const void* buf); |
205 | int storage_flush(void); | ||
190 | void storage_spin(void); | 206 | void storage_spin(void); |
191 | void storage_spindown(int seconds); | 207 | void storage_spindown(int seconds); |
192 | long storage_last_disk_activity(void); | 208 | long storage_last_disk_activity(void); |