diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2008-11-01 17:33:21 +0000 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2008-11-01 17:33:21 +0000 |
| commit | 19eb800f75db9746435868ff6837b7b3b506ac0a (patch) | |
| tree | b06b4eb017d0a38bdd9f742d44ff242215803341 | |
| parent | 94b6a0be993f83d50e0456dfa452c39926f2ae6c (diff) | |
| download | rockbox-19eb800f75db9746435868ff6837b7b3b506ac0a.zip rockbox-19eb800f75db9746435868ff6837b7b3b506ac0a.tar.gz rockbox-19eb800f75db9746435868ff6837b7b3b506ac0a.tar.bz2 rockbox-19eb800f75db9746435868ff6837b7b3b506ac0a.tar.xz | |
conditionalise *_get_info() to get some binsize back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18965 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/ata.c | 2 | ||||
| -rw-r--r-- | firmware/drivers/ata_flash.c | 2 | ||||
| -rw-r--r-- | firmware/drivers/ata_mmc.c | 2 | ||||
| -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 | ||||
| -rw-r--r-- | firmware/target/arm/ata-nand-telechips.c | 2 | ||||
| -rw-r--r-- | firmware/target/arm/ata-sd-pp.c | 2 |
11 files changed, 27 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index c2882a5..4a28ed3 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -1403,6 +1403,7 @@ int ata_spinup_time(void) return spinup_time; } +#ifdef STORAGE_GET_INFO void ata_get_info(struct storage_info *info) { unsigned short *src,*dest; @@ -1432,3 +1433,4 @@ void ata_get_info(struct storage_info *info) dest[i] = htobe16(src[i]); info->revision=revision; } +#endif diff --git a/firmware/drivers/ata_flash.c b/firmware/drivers/ata_flash.c index 9b1b641..ba96ea0 100644 --- a/firmware/drivers/ata_flash.c +++ b/firmware/drivers/ata_flash.c @@ -450,6 +450,7 @@ long nand_last_disk_activity(void) return last_disk_activity; } +#ifdef STORAGE_GET_INFO void nand_get_info(struct storage_info *info) { unsigned long blocks; @@ -469,4 +470,5 @@ void nand_get_info(struct storage_info *info) info->serial=0; } +#endif diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index 953bb90..097d0a0 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c @@ -963,6 +963,7 @@ long mmc_last_disk_activity(void) return last_disk_activity; } +#ifdef STORAGE_GET_INFO void mmc_get_info(IF_MV2(int drive,) struct storage_info *info) { #ifndef HAVE_MULTIVOLUME @@ -981,6 +982,7 @@ void mmc_get_info(IF_MV2(int drive,) struct storage_info *info) } info->revision="0.00"; } +#endif #ifdef HAVE_HOTSWAP bool mmc_removable(IF_MV_NONVOID(int drive)) diff --git a/firmware/export/ata.h b/firmware/export/ata.h index f09a463..a5c2f62 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h @@ -47,7 +47,10 @@ void ata_spin(void); void ata_set_led_enabled(bool enabled); #endif unsigned short* ata_get_identify(void); + +#ifdef STORAGE_GET_INFO void ata_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool ata_removable(IF_MV_NONVOID(int drive)); bool ata_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/config.h b/firmware/export/config.h index e04397b..22a0bd2 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -624,4 +624,8 @@ #endif #endif /* HAVE_HEADPHONE_DETECTION */ +#if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND) +#define STORAGE_GET_INFO +#endif + #endif /* __CONFIG_H__ */ diff --git a/firmware/export/mmc.h b/firmware/export/mmc.h index 2e7fb24..271d910 100644 --- a/firmware/export/mmc.h +++ b/firmware/export/mmc.h @@ -44,7 +44,9 @@ void mmc_spin(void); void mmc_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void mmc_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool mmc_removable(IF_MV_NONVOID(int drive)); bool mmc_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/nand.h b/firmware/export/nand.h index 3d4d1ce..25aed46 100644 --- a/firmware/export/nand.h +++ b/firmware/export/nand.h @@ -43,7 +43,9 @@ void nand_spin(void); void nand_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void nand_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif long nand_last_disk_activity(void); diff --git a/firmware/export/sd.h b/firmware/export/sd.h index 8e1fa88..fbb66cc 100644 --- a/firmware/export/sd.h +++ b/firmware/export/sd.h @@ -43,7 +43,9 @@ void sd_spin(void); void sd_set_led_enabled(bool enabled); #endif +#ifdef STORAGE_GET_INFO void sd_get_info(IF_MV2(int drive,) struct storage_info *info); +#endif #ifdef HAVE_HOTSWAP bool sd_removable(IF_MV_NONVOID(int drive)); bool sd_present(IF_MV_NONVOID(int drive)); diff --git a/firmware/export/storage.h b/firmware/export/storage.h index 78d3360..52c6f2b 100644 --- a/firmware/export/storage.h +++ b/firmware/export/storage.h @@ -197,6 +197,7 @@ static inline int storage_spinup_time(void) #endif } +#ifdef STORAGE_GET_INFO static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) { #if (CONFIG_STORAGE & STORAGE_ATA) @@ -211,6 +212,7 @@ static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info #error No storage driver! #endif } +#endif #ifdef HAVE_HOTSWAP static inline bool storage_removable(IF_MV_NONVOID(int drive)) @@ -310,11 +312,13 @@ static inline int storage_spinup_time(void) return 0; } +#ifdef STORAGE_GET_INFO static inline void storage_get_info(IF_MV2(int drive,) struct storage_info *info) { IF_MV((void)drive;) (void)info; } +#endif #ifdef HAVE_HOTSWAP static inline bool storage_removable(IF_MV_NONVOID(int drive)) diff --git a/firmware/target/arm/ata-nand-telechips.c b/firmware/target/arm/ata-nand-telechips.c index 4276c10..a0c1bc9 100644 --- a/firmware/target/arm/ata-nand-telechips.c +++ b/firmware/target/arm/ata-nand-telechips.c @@ -714,6 +714,7 @@ int nand_write_sectors(IF_MV2(int drive,) unsigned long start, int count, return -1; } +#ifdef STORAGE_GET_INFO void nand_get_info(struct storage_info *info) { /* firmware version */ @@ -727,6 +728,7 @@ void nand_get_info(struct storage_info *info) * page_size * total_banks; info->sector_size=SECTOR_SIZE; } +#endif int nand_init(void) { diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c index a12aafc..f451a7f 100644 --- a/firmware/target/arm/ata-sd-pp.c +++ b/firmware/target/arm/ata-sd-pp.c @@ -1300,6 +1300,7 @@ long sd_last_disk_activity(void) return last_disk_activity; } +#ifdef STORAGE_GET_INFO void sd_get_info(IF_MV2(int drive,) struct storage_info *info) { #ifndef HAVE_MULTIVOLUME @@ -1318,6 +1319,7 @@ void sd_get_info(IF_MV2(int drive,) struct storage_info *info) } info->revision="0.00"; } +#endif #ifdef HAVE_HOTSWAP bool sd_removable(IF_MV_NONVOID(int drive)) |