summaryrefslogtreecommitdiff
path: root/firmware/export/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/storage.h')
-rw-r--r--firmware/export/storage.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index 8e7281d523..14cba09b35 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -93,6 +93,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
93 #define storage_removable(drive) hostfs_removable(IF_MD(drive)) 93 #define storage_removable(drive) hostfs_removable(IF_MD(drive))
94 #define storage_present(drive) hostfs_present(IF_MD(drive)) 94 #define storage_present(drive) hostfs_present(IF_MD(drive))
95 #endif 95 #endif
96 #define storage_driver_type(drive) hostfs_driver_type(IF_MV(drive))
96 #elif (CONFIG_STORAGE & STORAGE_ATA) 97 #elif (CONFIG_STORAGE & STORAGE_ATA)
97 #define STORAGE_FUNCTION(NAME) (ata_## NAME) 98 #define STORAGE_FUNCTION(NAME) (ata_## NAME)
98 #define storage_spindown ata_spindown 99 #define storage_spindown ata_spindown
@@ -119,6 +120,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
119 #define storage_removable(drive) ata_removable(IF_MD(drive)) 120 #define storage_removable(drive) ata_removable(IF_MD(drive))
120 #define storage_present(drive) ata_present(IF_MD(drive)) 121 #define storage_present(drive) ata_present(IF_MD(drive))
121 #endif 122 #endif
123 #define storage_driver_type(drive) (STORAGE_ATA_NUM)
122 #elif (CONFIG_STORAGE & STORAGE_SD) 124 #elif (CONFIG_STORAGE & STORAGE_SD)
123 #define STORAGE_FUNCTION(NAME) (sd_## NAME) 125 #define STORAGE_FUNCTION(NAME) (sd_## NAME)
124 #define storage_spindown sd_spindown 126 #define storage_spindown sd_spindown
@@ -145,6 +147,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
145 #define storage_removable(drive) sd_removable(IF_MD(drive)) 147 #define storage_removable(drive) sd_removable(IF_MD(drive))
146 #define storage_present(drive) sd_present(IF_MD(drive)) 148 #define storage_present(drive) sd_present(IF_MD(drive))
147 #endif 149 #endif
150 #define storage_driver_type(drive) (STORAGE_SD_NUM)
148 #elif (CONFIG_STORAGE & STORAGE_MMC) 151 #elif (CONFIG_STORAGE & STORAGE_MMC)
149 #define STORAGE_FUNCTION(NAME) (mmc_## NAME) 152 #define STORAGE_FUNCTION(NAME) (mmc_## NAME)
150 #define storage_spindown mmc_spindown 153 #define storage_spindown mmc_spindown
@@ -170,6 +173,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
170 #define storage_removable(drive) mmc_removable(IF_MD(drive)) 173 #define storage_removable(drive) mmc_removable(IF_MD(drive))
171 #define storage_present(drive) mmc_present(IF_MD(drive)) 174 #define storage_present(drive) mmc_present(IF_MD(drive))
172 #endif 175 #endif
176 #define storage_driver_type(drive) (STORAGE_MMC_NUM)
173 #elif (CONFIG_STORAGE & STORAGE_NAND) 177 #elif (CONFIG_STORAGE & STORAGE_NAND)
174 #define STORAGE_FUNCTION(NAME) (nand_## NAME) 178 #define STORAGE_FUNCTION(NAME) (nand_## NAME)
175 #define storage_spindown nand_spindown 179 #define storage_spindown nand_spindown
@@ -195,6 +199,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
195 #define storage_removable(drive) nand_removable(IF_MD(drive)) 199 #define storage_removable(drive) nand_removable(IF_MD(drive))
196 #define storage_present(drive) nand_present(IF_MD(drive)) 200 #define storage_present(drive) nand_present(IF_MD(drive))
197 #endif 201 #endif
202 #define storage_driver_type(drive) (STORAGE_NAND_NUM)
198 #elif (CONFIG_STORAGE & STORAGE_RAMDISK) 203 #elif (CONFIG_STORAGE & STORAGE_RAMDISK)
199 #define STORAGE_FUNCTION(NAME) (ramdisk_## NAME) 204 #define STORAGE_FUNCTION(NAME) (ramdisk_## NAME)
200 #define storage_spindown ramdisk_spindown 205 #define storage_spindown ramdisk_spindown
@@ -220,6 +225,7 @@ static inline void stub_storage_spindown(int timeout) { (void)timeout; }
220 #define storage_removable(drive) ramdisk_removable(IF_MD(drive)) 225 #define storage_removable(drive) ramdisk_removable(IF_MD(drive))
221 #define storage_present(drive) ramdisk_present(IF_MD(drive)) 226 #define storage_present(drive) ramdisk_present(IF_MD(drive))
222 #endif 227 #endif
228 #define storage_driver_type(drive) (STORAGE_RAMDISK_NUM)
223 #else 229 #else
224 //#error No storage driver! 230 //#error No storage driver!
225 #endif 231 #endif
@@ -246,6 +252,7 @@ void storage_get_info(int drive, struct storage_info *info);
246bool storage_removable(int drive); 252bool storage_removable(int drive);
247bool storage_present(int drive); 253bool storage_present(int drive);
248#endif 254#endif
255int storage_driver_type(int drive);
249 256
250#endif /* NOT CONFIG_STORAGE_MULTI and NOT SIMULATOR*/ 257#endif /* NOT CONFIG_STORAGE_MULTI and NOT SIMULATOR*/
251 258