diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/ata.h | 3 | ||||
-rw-r--r-- | firmware/export/config.h | 4 | ||||
-rw-r--r-- | firmware/export/mmc.h | 2 | ||||
-rw-r--r-- | firmware/export/nand.h | 2 | ||||
-rw-r--r-- | firmware/export/sd.h | 2 | ||||
-rw-r--r-- | firmware/export/storage.h | 4 |
6 files changed, 17 insertions, 0 deletions
diff --git a/firmware/export/ata.h b/firmware/export/ata.h index f09a4630d3..a5c2f6292a 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h | |||
@@ -47,7 +47,10 @@ void ata_spin(void); | |||
47 | void ata_set_led_enabled(bool enabled); | 47 | void ata_set_led_enabled(bool enabled); |
48 | #endif | 48 | #endif |
49 | unsigned short* ata_get_identify(void); | 49 | unsigned short* ata_get_identify(void); |
50 | |||
51 | #ifdef STORAGE_GET_INFO | ||
50 | void ata_get_info(IF_MV2(int drive,) struct storage_info *info); | 52 | void ata_get_info(IF_MV2(int drive,) struct storage_info *info); |
53 | #endif | ||
51 | #ifdef HAVE_HOTSWAP | 54 | #ifdef HAVE_HOTSWAP |
52 | bool ata_removable(IF_MV_NONVOID(int drive)); | 55 | bool ata_removable(IF_MV_NONVOID(int drive)); |
53 | bool ata_present(IF_MV_NONVOID(int drive)); | 56 | bool ata_present(IF_MV_NONVOID(int drive)); |
diff --git a/firmware/export/config.h b/firmware/export/config.h index e04397b5bb..22a0bd2244 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -624,4 +624,8 @@ | |||
624 | #endif | 624 | #endif |
625 | #endif /* HAVE_HEADPHONE_DETECTION */ | 625 | #endif /* HAVE_HEADPHONE_DETECTION */ |
626 | 626 | ||
627 | #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND) | ||
628 | #define STORAGE_GET_INFO | ||
629 | #endif | ||
630 | |||
627 | #endif /* __CONFIG_H__ */ | 631 | #endif /* __CONFIG_H__ */ |
diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index 2e7fb2441d..271d910763 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h | |||
@@ -44,7 +44,9 @@ void mmc_spin(void); | |||
44 | void mmc_set_led_enabled(bool enabled); | 44 | void mmc_set_led_enabled(bool enabled); |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #ifdef STORAGE_GET_INFO | ||
47 | void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); | 48 | void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); |
49 | #endif | ||
48 | #ifdef HAVE_HOTSWAP | 50 | #ifdef HAVE_HOTSWAP |
49 | bool mmc_removable(IF_MV_NONVOID(int drive)); | 51 | bool mmc_removable(IF_MV_NONVOID(int drive)); |
50 | bool mmc_present(IF_MV_NONVOID(int drive)); | 52 | bool mmc_present(IF_MV_NONVOID(int drive)); |
diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 3d4d1ce166..25aed46629 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h | |||
@@ -43,7 +43,9 @@ void nand_spin(void); | |||
43 | void nand_set_led_enabled(bool enabled); | 43 | void nand_set_led_enabled(bool enabled); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef STORAGE_GET_INFO | ||
46 | void nand_get_info(IF_MV2(int drive,) struct storage_info *info); | 47 | void nand_get_info(IF_MV2(int drive,) struct storage_info *info); |
48 | #endif | ||
47 | 49 | ||
48 | long nand_last_disk_activity(void); | 50 | long nand_last_disk_activity(void); |
49 | 51 | ||
diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 8e1fa88ceb..fbb66cc9a9 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h | |||
@@ -43,7 +43,9 @@ void sd_spin(void); | |||
43 | void sd_set_led_enabled(bool enabled); | 43 | void sd_set_led_enabled(bool enabled); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef STORAGE_GET_INFO | ||
46 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info); | 47 | void sd_get_info(IF_MV2(int drive,) struct storage_info *info); |
48 | #endif | ||
47 | #ifdef HAVE_HOTSWAP | 49 | #ifdef HAVE_HOTSWAP |
48 | bool sd_removable(IF_MV_NONVOID(int drive)); | 50 | bool sd_removable(IF_MV_NONVOID(int drive)); |
49 | bool sd_present(IF_MV_NONVOID(int drive)); | 51 | bool sd_present(IF_MV_NONVOID(int drive)); |
diff --git a/firmware/export/storage.h b/firmware/export/storage.h index 78d3360ba9..52c6f2bed1 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h | |||
@@ -197,6 +197,7 @@ static inline int storage_spinup_time(void) | |||
197 | #endif | 197 | #endif |
198 | } | 198 | } |
199 | 199 | ||
200 | #ifdef STORAGE_GET_INFO | ||
200 | static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) | 201 | static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) |
201 | { | 202 | { |
202 | #if (CONFIG_STORAGE & STORAGE_ATA) | 203 | #if (CONFIG_STORAGE & STORAGE_ATA) |
@@ -211,6 +212,7 @@ static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info | |||
211 | #error No storage driver! | 212 | #error No storage driver! |
212 | #endif | 213 | #endif |
213 | } | 214 | } |
215 | #endif | ||
214 | 216 | ||
215 | #ifdef HAVE_HOTSWAP | 217 | #ifdef HAVE_HOTSWAP |
216 | static inline bool storage_removable(IF_MV_NONVOID(int drive)) | 218 | static inline bool storage_removable(IF_MV_NONVOID(int drive)) |
@@ -310,11 +312,13 @@ static inline int storage_spinup_time(void) | |||
310 | return 0; | 312 | return 0; |
311 | } | 313 | } |
312 | 314 | ||
315 | #ifdef STORAGE_GET_INFO | ||
313 | static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) | 316 | static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) |
314 | { | 317 | { |
315 | IF_MV((void)drive;) | 318 | IF_MV((void)drive;) |
316 | (void)info; | 319 | (void)info; |
317 | } | 320 | } |
321 | #endif | ||
318 | 322 | ||
319 | #ifdef HAVE_HOTSWAP | 323 | #ifdef HAVE_HOTSWAP |
320 | static inline bool storage_removable(IF_MV_NONVOID(int drive)) | 324 | static inline bool storage_removable(IF_MV_NONVOID(int drive)) |