diff options
71 files changed, 142 insertions, 114 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 8c4622828d..26534cc101 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #include "fat.h" | 63 | #include "fat.h" |
64 | #include "mas.h" | 64 | #include "mas.h" |
65 | #include "eeprom_24cxx.h" | 65 | #include "eeprom_24cxx.h" |
66 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 66 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
67 | #include "hotswap.h" | 67 | #include "hotswap.h" |
68 | #endif | 68 | #endif |
69 | #if CONFIG_TUNER | 69 | #if CONFIG_TUNER |
@@ -1730,8 +1730,8 @@ static bool view_battery(void) | |||
1730 | #endif | 1730 | #endif |
1731 | 1731 | ||
1732 | #ifndef SIMULATOR | 1732 | #ifndef SIMULATOR |
1733 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 1733 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
1734 | #if defined(HAVE_MMC) | 1734 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1735 | #define CARDTYPE "MMC" | 1735 | #define CARDTYPE "MMC" |
1736 | #else | 1736 | #else |
1737 | #define CARDTYPE "microSD" | 1737 | #define CARDTYPE "microSD" |
@@ -1812,7 +1812,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1812 | { | 1812 | { |
1813 | simplelist_addline(SIMPLELIST_ADD_LINE, "Not Found!"); | 1813 | simplelist_addline(SIMPLELIST_ADD_LINE, "Not Found!"); |
1814 | } | 1814 | } |
1815 | #ifndef HAVE_MMC | 1815 | #if (CONFIG_STORAGE & STORAGE_SD) |
1816 | else /* card->initialized < 0 */ | 1816 | else /* card->initialized < 0 */ |
1817 | { | 1817 | { |
1818 | simplelist_addline(SIMPLELIST_ADD_LINE, "Init Error! (%d)", card->initialized); | 1818 | simplelist_addline(SIMPLELIST_ADD_LINE, "Init Error! (%d)", card->initialized); |
@@ -1826,7 +1826,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1826 | } | 1826 | } |
1827 | return btn; | 1827 | return btn; |
1828 | } | 1828 | } |
1829 | #else /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */ | 1829 | #else /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */ |
1830 | static int disk_callback(int btn, struct gui_synclist *lists) | 1830 | static int disk_callback(int btn, struct gui_synclist *lists) |
1831 | { | 1831 | { |
1832 | (void)lists; | 1832 | (void)lists; |
@@ -1960,13 +1960,13 @@ static bool dbg_identify_info(void) | |||
1960 | } | 1960 | } |
1961 | return false; | 1961 | return false; |
1962 | } | 1962 | } |
1963 | #endif /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */ | 1963 | #endif /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */ |
1964 | 1964 | ||
1965 | static bool dbg_disk_info(void) | 1965 | static bool dbg_disk_info(void) |
1966 | { | 1966 | { |
1967 | struct simplelist_info info; | 1967 | struct simplelist_info info; |
1968 | simplelist_info_init(&info, "Disk Info", 1, NULL); | 1968 | simplelist_info_init(&info, "Disk Info", 1, NULL); |
1969 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 1969 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
1970 | char title[16]; | 1970 | char title[16]; |
1971 | int card = 0; | 1971 | int card = 0; |
1972 | info.callback_data = (void*)&card; | 1972 | info.callback_data = (void*)&card; |
@@ -2146,7 +2146,7 @@ static bool dbg_save_roms(void) | |||
2146 | 2146 | ||
2147 | return false; | 2147 | return false; |
2148 | } | 2148 | } |
2149 | #elif defined(CPU_PP) && !defined(HAVE_ATA_SD) | 2149 | #elif defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD) |
2150 | static bool dbg_save_roms(void) | 2150 | static bool dbg_save_roms(void) |
2151 | { | 2151 | { |
2152 | int fd; | 2152 | int fd; |
@@ -2467,7 +2467,7 @@ struct the_menu_item { | |||
2467 | }; | 2467 | }; |
2468 | static const struct the_menu_item menuitems[] = { | 2468 | static const struct the_menu_item menuitems[] = { |
2469 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ | 2469 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \ |
2470 | (defined(CPU_PP) && !defined(HAVE_ATA_SD)) | 2470 | (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)) |
2471 | { "Dump ROM contents", dbg_save_roms }, | 2471 | { "Dump ROM contents", dbg_save_roms }, |
2472 | #endif | 2472 | #endif |
2473 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ | 2473 | #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \ |
@@ -2504,7 +2504,7 @@ static const struct the_menu_item menuitems[] = { | |||
2504 | #endif | 2504 | #endif |
2505 | #ifndef SIMULATOR | 2505 | #ifndef SIMULATOR |
2506 | { "View disk info", dbg_disk_info }, | 2506 | { "View disk info", dbg_disk_info }, |
2507 | #if !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) | 2507 | #if !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) |
2508 | { "Dump ATA identify info", dbg_identify_info}, | 2508 | { "Dump ATA identify info", dbg_identify_info}, |
2509 | #endif | 2509 | #endif |
2510 | #endif | 2510 | #endif |
diff --git a/apps/main.c b/apps/main.c index bacaa51e01..50597699c5 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -89,7 +89,7 @@ | |||
89 | #if CONFIG_TUNER | 89 | #if CONFIG_TUNER |
90 | #include "radio.h" | 90 | #include "radio.h" |
91 | #endif | 91 | #endif |
92 | #ifdef HAVE_MMC | 92 | #if (CONFIG_STORAGE & STORAGE_MMC) |
93 | #include "ata_mmc.h" | 93 | #include "ata_mmc.h" |
94 | #endif | 94 | #endif |
95 | 95 | ||
@@ -377,7 +377,7 @@ static void init(void) | |||
377 | #ifdef DEBUG | 377 | #ifdef DEBUG |
378 | debug_init(); | 378 | debug_init(); |
379 | #else | 379 | #else |
380 | #if !defined(HAVE_FMADC) && !defined(HAVE_MMC) | 380 | #if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC) |
381 | serial_setup(); | 381 | serial_setup(); |
382 | #endif | 382 | #endif |
383 | #endif | 383 | #endif |
@@ -456,7 +456,7 @@ static void init(void) | |||
456 | #endif | 456 | #endif |
457 | /* enter USB mode early, before trying to mount */ | 457 | /* enter USB mode early, before trying to mount */ |
458 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) | 458 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) |
459 | #ifdef HAVE_MMC | 459 | #if (CONFIG_STORAGE & STORAGE_MMC) |
460 | if (!mmc_touched() || | 460 | if (!mmc_touched() || |
461 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) | 461 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) |
462 | #endif | 462 | #endif |
diff --git a/apps/misc.c b/apps/misc.c index cd59dbc40f..7c8ff0fbd8 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #include "playlist.h" | 61 | #include "playlist.h" |
62 | #include "yesno.h" | 62 | #include "yesno.h" |
63 | 63 | ||
64 | #ifdef HAVE_MMC | 64 | #if (CONFIG_STORAGE & STORAGE_MMC) |
65 | #include "ata_mmc.h" | 65 | #include "ata_mmc.h" |
66 | #endif | 66 | #endif |
67 | #include "tree.h" | 67 | #include "tree.h" |
@@ -910,7 +910,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
910 | case SYS_USB_CONNECTED: | 910 | case SYS_USB_CONNECTED: |
911 | if (callback != NULL) | 911 | if (callback != NULL) |
912 | callback(parameter); | 912 | callback(parameter); |
913 | #ifdef HAVE_MMC | 913 | #if (CONFIG_STORAGE & STORAGE_MMC) |
914 | if (!mmc_touched() || | 914 | if (!mmc_touched() || |
915 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) | 915 | (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED)) |
916 | #endif | 916 | #endif |
diff --git a/apps/mpeg.c b/apps/mpeg.c index 713915d5a6..3c37a6b22f 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c | |||
@@ -1603,7 +1603,8 @@ static void mpeg_thread(void) | |||
1603 | /* Don't read more than until the end of the buffer */ | 1603 | /* Don't read more than until the end of the buffer */ |
1604 | amount_to_read = MIN(audiobuflen - audiobuf_write, | 1604 | amount_to_read = MIN(audiobuflen - audiobuf_write, |
1605 | amount_to_read); | 1605 | amount_to_read); |
1606 | #ifdef HAVE_MMC /* MMC is slow, so don't read too large chunks */ | 1606 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1607 | /* MMC is slow, so don't read too large chunks */ | ||
1607 | amount_to_read = MIN(0x40000, amount_to_read); | 1608 | amount_to_read = MIN(0x40000, amount_to_read); |
1608 | #elif MEM == 8 | 1609 | #elif MEM == 8 |
1609 | amount_to_read = MIN(0x100000, amount_to_read); | 1610 | amount_to_read = MIN(0x100000, amount_to_read); |
@@ -1912,7 +1913,8 @@ static void mpeg_thread(void) | |||
1912 | 1913 | ||
1913 | amount_to_save = MIN(amount_to_save, | 1914 | amount_to_save = MIN(amount_to_save, |
1914 | audiobuflen - audiobuf_read); | 1915 | audiobuflen - audiobuf_read); |
1915 | #ifdef HAVE_MMC /* MMC is slow, so don't save too large chunks at once */ | 1916 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1917 | /* MMC is slow, so don't save too large chunks at once */ | ||
1916 | amount_to_save = MIN(0x40000, amount_to_save); | 1918 | amount_to_save = MIN(0x40000, amount_to_save); |
1917 | #elif MEM == 8 | 1919 | #elif MEM == 8 |
1918 | amount_to_save = MIN(0x100000, amount_to_save); | 1920 | amount_to_save = MIN(0x100000, amount_to_save); |
diff --git a/apps/mpeg.h b/apps/mpeg.h index f5ce613b8d..3aaa990881 100644 --- a/apps/mpeg.h +++ b/apps/mpeg.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #define MPEG_RECORDING_LOW_WATER 0x80000 | 32 | #define MPEG_RECORDING_LOW_WATER 0x80000 |
33 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 | 33 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 |
34 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 | 34 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 |
35 | #ifdef HAVE_MMC | 35 | #if (CONFIG_STORAGE & STORAGE_MMC) |
36 | #define MPEG_PLAY_PENDING_THRESHOLD 0x20000 | 36 | #define MPEG_PLAY_PENDING_THRESHOLD 0x20000 |
37 | #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000 | 37 | #define MPEG_PLAY_PENDING_SWAPSIZE 0x20000 |
38 | #else | 38 | #else |
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 0c27a5b1de..a4ddbacfd0 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -120,7 +120,8 @@ nim.c | |||
120 | mp3_encoder.c | 120 | mp3_encoder.c |
121 | wav2wv.c | 121 | wav2wv.c |
122 | #else /* hardware codec platforms */ | 122 | #else /* hardware codec platforms */ |
123 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ | 123 | #if !defined(ARCHOS_ONDIOSP) && !defined(ARCHOS_ONDIOFM) |
124 | /* not for Ondio, has no remote control pin */ | ||
124 | alpine_cdc.c | 125 | alpine_cdc.c |
125 | #endif | 126 | #endif |
126 | splitedit.c | 127 | splitedit.c |
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index f23255aea6..dfffc3b3cd 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "plugin.h" | 34 | #include "plugin.h" |
35 | 35 | ||
36 | /* Only build for (correct) target */ | 36 | /* Only build for (correct) target */ |
37 | #if CONFIG_CPU==SH7034 && !defined(HAVE_MMC) | 37 | #if CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) |
38 | 38 | ||
39 | PLUGIN_HEADER | 39 | PLUGIN_HEADER |
40 | 40 | ||
@@ -1199,4 +1199,4 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
1199 | return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR; | 1199 | return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR; |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | #endif /* CONFIG_CPU==SH7034 && !defined(HAVE_MMC) */ | 1202 | #endif /* CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) */ |
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c index 8de6a746ab..dda46a0f29 100644 --- a/apps/plugins/splitedit.c +++ b/apps/plugins/splitedit.c | |||
@@ -1044,7 +1044,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1044 | case LOOP_MODE_TO: | 1044 | case LOOP_MODE_TO: |
1045 | rb->audio_pause(); | 1045 | rb->audio_pause(); |
1046 | rb->audio_ff_rewind(range_start); | 1046 | rb->audio_ff_rewind(range_start); |
1047 | #ifdef HAVE_MMC | 1047 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1048 | /* MMC is slow - wait some time to allow track reload to finish */ | 1048 | /* MMC is slow - wait some time to allow track reload to finish */ |
1049 | rb->sleep(HZ/20); | 1049 | rb->sleep(HZ/20); |
1050 | if (mp3->elapsed > play_end) /* reload in progress */ | 1050 | if (mp3->elapsed > play_end) /* reload in progress */ |
@@ -1056,7 +1056,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split, | |||
1056 | case LOOP_MODE_FROM: | 1056 | case LOOP_MODE_FROM: |
1057 | rb->audio_pause(); | 1057 | rb->audio_pause(); |
1058 | rb->audio_ff_rewind(xpos_to_time(split_x)); | 1058 | rb->audio_ff_rewind(xpos_to_time(split_x)); |
1059 | #ifdef HAVE_MMC | 1059 | #if (CONFIG_STORAGE & STORAGE_MMC) |
1060 | /* MMC is slow - wait some time to allow track reload to finish */ | 1060 | /* MMC is slow - wait some time to allow track reload to finish */ |
1061 | rb->sleep(HZ/20); | 1061 | rb->sleep(HZ/20); |
1062 | if (mp3->elapsed > play_end) /* reload in progress */ | 1062 | if (mp3->elapsed > play_end) /* reload in progress */ |
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 7638fbf831..2e421e151e 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -29,7 +29,7 @@ PLUGIN_HEADER | |||
29 | #define TEST_FILE TESTBASEDIR "/test_disk.tmp" | 29 | #define TEST_FILE TESTBASEDIR "/test_disk.tmp" |
30 | #define FRND_SEED 0x78C3 /* arbirary */ | 30 | #define FRND_SEED 0x78C3 /* arbirary */ |
31 | 31 | ||
32 | #ifdef HAVE_MMC | 32 | #if (CONFIG_STORAGE & STORAGE_MMC) |
33 | #define TEST_SIZE (20*1024*1024) | 33 | #define TEST_SIZE (20*1024*1024) |
34 | #else | 34 | #else |
35 | #define TEST_SIZE (300*1024*1024) | 35 | #define TEST_SIZE (300*1024*1024) |
diff --git a/apps/plugins/wavplay.c b/apps/plugins/wavplay.c index 333d16135c..c37b656d1c 100644 --- a/apps/plugins/wavplay.c +++ b/apps/plugins/wavplay.c | |||
@@ -3574,7 +3574,7 @@ int play_file(char* filename) | |||
3574 | while (!(SSR0 & SCI_TEND)); /* wait for end of transfer */ | 3574 | while (!(SSR0 & SCI_TEND)); /* wait for end of transfer */ |
3575 | BRR0 = 0; /* maximum speed, ~3 MBit/s */ | 3575 | BRR0 = 0; /* maximum speed, ~3 MBit/s */ |
3576 | 3576 | ||
3577 | #ifndef HAVE_MMC | 3577 | #if !(CONFIG_STORAGE & STORAGE_MMC) |
3578 | low_water = 5 /* seconds */ | 3578 | low_water = 5 /* seconds */ |
3579 | * 2 /* bytes per sample */ | 3579 | * 2 /* bytes per sample */ |
3580 | * channels | 3580 | * channels |
@@ -3603,7 +3603,7 @@ int play_file(char* filename) | |||
3603 | else | 3603 | else |
3604 | { | 3604 | { |
3605 | wanted = MIN(free_space, aud_size - aud_write); | 3605 | wanted = MIN(free_space, aud_size - aud_write); |
3606 | #ifdef HAVE_MMC | 3606 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3607 | wanted = MIN(wanted, 256*1024); | 3607 | wanted = MIN(wanted, 256*1024); |
3608 | #elif MEM == 8 | 3608 | #elif MEM == 8 |
3609 | wanted = MIN(wanted, 1024*1024); | 3609 | wanted = MIN(wanted, 1024*1024); |
diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index d57a61a6a2..d4b8bf1fd2 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c | |||
@@ -3587,7 +3587,7 @@ static int record_file(char *filename) | |||
3587 | if (to_save > aud_size) | 3587 | if (to_save > aud_size) |
3588 | { | 3588 | { |
3589 | rec_tick_enable(false); | 3589 | rec_tick_enable(false); |
3590 | #ifdef HAVE_MMC | 3590 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3591 | rb->splash(HZ, "Data overrun (slow MMC)"); | 3591 | rb->splash(HZ, "Data overrun (slow MMC)"); |
3592 | #else | 3592 | #else |
3593 | rb->splash(HZ, "Data overrun"); | 3593 | rb->splash(HZ, "Data overrun"); |
@@ -3597,7 +3597,7 @@ static int record_file(char *filename) | |||
3597 | break; | 3597 | break; |
3598 | } | 3598 | } |
3599 | write_now = MIN(to_save, aud_size - aud_read); | 3599 | write_now = MIN(to_save, aud_size - aud_read); |
3600 | #ifdef HAVE_MMC | 3600 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3601 | write_now = MIN(write_now, 256*1024); | 3601 | write_now = MIN(write_now, 256*1024); |
3602 | #else | 3602 | #else |
3603 | write_now = MIN(write_now, 1024*1024); | 3603 | write_now = MIN(write_now, 1024*1024); |
@@ -3802,7 +3802,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
3802 | return rc; | 3802 | return rc; |
3803 | 3803 | ||
3804 | #if 0 | 3804 | #if 0 |
3805 | #ifdef HAVE_MMC | 3805 | #if (CONFIG_STORAGE & STORAGE_MMC) |
3806 | return record_file("/<MMC1>/test.wav"); | 3806 | return record_file("/<MMC1>/test.wav"); |
3807 | #else | 3807 | #else |
3808 | return record_file("/test.wav"); | 3808 | return record_file("/test.wav"); |
diff --git a/apps/screens.c b/apps/screens.c index d8ce695a9a..753b666902 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -68,7 +68,7 @@ | |||
68 | #include <bitmaps/remote_usblogo.h> | 68 | #include <bitmaps/remote_usblogo.h> |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #ifdef HAVE_MMC | 71 | #if (CONFIG_STORAGE & STORAGE_MMC) |
72 | #include "ata_mmc.h" | 72 | #include "ata_mmc.h" |
73 | #endif | 73 | #endif |
74 | #if CONFIG_CODEC == SWCODEC | 74 | #if CONFIG_CODEC == SWCODEC |
@@ -145,9 +145,9 @@ void usb_screen(void) | |||
145 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 145 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
146 | while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) { | 146 | while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) { |
147 | if(usb_inserted()) { | 147 | if(usb_inserted()) { |
148 | #ifdef HAVE_MMC /* USB-MMC bridge can report activity */ | 148 | #if (CONFIG_STORAGE & STORAGE_MMC) /* USB-MMC bridge can report activity */ |
149 | led(mmc_usb_active(HZ)); | 149 | led(mmc_usb_active(HZ)); |
150 | #endif /* HAVE_MMC */ | 150 | #endif /* STORAGE_MMC */ |
151 | gui_syncstatusbar_draw(&statusbars, false); | 151 | gui_syncstatusbar_draw(&statusbars, false); |
152 | } | 152 | } |
153 | } | 153 | } |
@@ -161,7 +161,7 @@ void usb_screen(void) | |||
161 | #endif /* USB_NONE */ | 161 | #endif /* USB_NONE */ |
162 | } | 162 | } |
163 | 163 | ||
164 | #ifdef HAVE_MMC | 164 | #if (CONFIG_STORAGE & STORAGE_MMC) |
165 | int mmc_remove_request(void) | 165 | int mmc_remove_request(void) |
166 | { | 166 | { |
167 | struct queue_event ev; | 167 | struct queue_event ev; |
diff --git a/apps/screens.h b/apps/screens.h index d024cc5f2e..eb613fc178 100644 --- a/apps/screens.h +++ b/apps/screens.h | |||
@@ -34,7 +34,7 @@ int charging_screen(void); | |||
34 | void charging_splash(void); | 34 | void charging_splash(void); |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef HAVE_MMC | 37 | #if (CONFIG_STORAGE & STORAGE_MMC) |
38 | int mmc_remove_request(void); | 38 | int mmc_remove_request(void); |
39 | #endif | 39 | #endif |
40 | 40 | ||
diff --git a/apps/talk.c b/apps/talk.c index 2da4cd5c26..44ba063655 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -187,7 +187,7 @@ static unsigned char* get_clip(long id, long* p_size) | |||
187 | return NULL; | 187 | return NULL; |
188 | clipbuf = (unsigned char *) p_voicefile + p_voicefile->index[id].offset; | 188 | clipbuf = (unsigned char *) p_voicefile + p_voicefile->index[id].offset; |
189 | 189 | ||
190 | #ifdef HAVE_MMC /* dynamic loading, on demand */ | 190 | #if (CONFIG_STORAGE & STORAGE_MMC) /* dynamic loading, on demand */ |
191 | if (!(clipsize & LOADED_MASK)) | 191 | if (!(clipsize & LOADED_MASK)) |
192 | { /* clip used for the first time, needs loading */ | 192 | { /* clip used for the first time, needs loading */ |
193 | lseek(filehandle, p_voicefile->index[id].offset, SEEK_SET); | 193 | lseek(filehandle, p_voicefile->index[id].offset, SEEK_SET); |
@@ -225,7 +225,7 @@ static void load_voicefile(void) | |||
225 | if (file_size > audiobufend - audiobuf) /* won't fit? */ | 225 | if (file_size > audiobufend - audiobuf) /* won't fit? */ |
226 | goto load_err; | 226 | goto load_err; |
227 | 227 | ||
228 | #ifdef HAVE_MMC /* load only the header for now */ | 228 | #if (CONFIG_STORAGE & STORAGE_MMC) /* load only the header for now */ |
229 | load_size = offsetof(struct voicefile, index); | 229 | load_size = offsetof(struct voicefile, index); |
230 | #else /* load the full file */ | 230 | #else /* load the full file */ |
231 | load_size = file_size; | 231 | load_size = file_size; |
@@ -266,7 +266,7 @@ static void load_voicefile(void) | |||
266 | structec_convert(&p_voicefile->index[i], "ll", 1, true); | 266 | structec_convert(&p_voicefile->index[i], "ll", 1, true); |
267 | #endif | 267 | #endif |
268 | 268 | ||
269 | #ifdef HAVE_MMC | 269 | #if (CONFIG_STORAGE & STORAGE_MMC) |
270 | /* load the index table, now that we know its size from the header */ | 270 | /* load the index table, now that we know its size from the header */ |
271 | load_size = (p_voicefile->id1_max + p_voicefile->id2_max) | 271 | load_size = (p_voicefile->id1_max + p_voicefile->id2_max) |
272 | * sizeof(struct clip_entry); | 272 | * sizeof(struct clip_entry); |
@@ -520,7 +520,7 @@ void talk_init(void) | |||
520 | return; | 520 | return; |
521 | } | 521 | } |
522 | 522 | ||
523 | #ifdef HAVE_MMC | 523 | #if (CONFIG_STORAGE & STORAGE_MMC) |
524 | if (filehandle >= 0) /* MMC: An old voice file might still be open */ | 524 | if (filehandle >= 0) /* MMC: An old voice file might still be open */ |
525 | { | 525 | { |
526 | close(filehandle); | 526 | close(filehandle); |
@@ -577,7 +577,7 @@ void talk_buffer_steal(void) | |||
577 | #if CONFIG_CODEC != SWCODEC | 577 | #if CONFIG_CODEC != SWCODEC |
578 | mp3_play_stop(); | 578 | mp3_play_stop(); |
579 | #endif | 579 | #endif |
580 | #ifdef HAVE_MMC | 580 | #if (CONFIG_STORAGE & STORAGE_MMC) |
581 | if (filehandle >= 0) /* only relevant for MMC */ | 581 | if (filehandle >= 0) /* only relevant for MMC */ |
582 | { | 582 | { |
583 | close(filehandle); | 583 | close(filehandle); |
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 5e20142a59..c1aad5ce11 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -80,7 +80,7 @@ unsigned char *loadbuffer = (unsigned char *)DRAM_START; | |||
80 | char version[] = APPSVERSION; | 80 | char version[] = APPSVERSION; |
81 | 81 | ||
82 | /* Locations and sizes in hidden partition on Sansa */ | 82 | /* Locations and sizes in hidden partition on Sansa */ |
83 | #if defined(HAVE_ATA_SD) | 83 | #if (CONFIG_STORAGE & STORAGE_SD) |
84 | #define PPMI_SECTOR_OFFSET 1024 | 84 | #define PPMI_SECTOR_OFFSET 1024 |
85 | #define PPMI_SECTORS 1 | 85 | #define PPMI_SECTORS 1 |
86 | #define MI4_HEADER_SECTORS 1 | 86 | #define MI4_HEADER_SECTORS 1 |
@@ -361,7 +361,7 @@ int load_mi4(unsigned char* buf, char* firmware, unsigned int buffer_size) | |||
361 | return EOK; | 361 | return EOK; |
362 | } | 362 | } |
363 | 363 | ||
364 | #if defined(HAVE_ATA_SD) | 364 | #if (CONFIG_STORAGE & STORAGE_SD) |
365 | /* Load mi4 firmware from a hidden disk partition */ | 365 | /* Load mi4 firmware from a hidden disk partition */ |
366 | int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | 366 | int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, |
367 | unsigned int buffer_size, bool disable_rebuild) | 367 | unsigned int buffer_size, bool disable_rebuild) |
@@ -506,7 +506,7 @@ void* main(void) | |||
506 | printf(MODEL_NAME); | 506 | printf(MODEL_NAME); |
507 | 507 | ||
508 | i=ata_init(); | 508 | i=ata_init(); |
509 | #if !defined(HAVE_ATA_SD) | 509 | #if !(CONFIG_STORAGE & STORAGE_SD) |
510 | if (i==0) { | 510 | if (i==0) { |
511 | identify_info=ata_get_identify(); | 511 | identify_info=ata_get_identify(); |
512 | /* Show model */ | 512 | /* Show model */ |
@@ -550,7 +550,7 @@ void* main(void) | |||
550 | */ | 550 | */ |
551 | printf("Loading original firmware..."); | 551 | printf("Loading original firmware..."); |
552 | 552 | ||
553 | #if defined(HAVE_ATA_SD) | 553 | #if (CONFIG_STORAGE & STORAGE_SD) |
554 | /* First try a (hidden) firmware partition */ | 554 | /* First try a (hidden) firmware partition */ |
555 | printf("Trying firmware partition"); | 555 | printf("Trying firmware partition"); |
556 | pinfo = disk_partinfo(1); | 556 | pinfo = disk_partinfo(1); |
diff --git a/firmware/SOURCES b/firmware/SOURCES index e73e94b453..b17bb0c115 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -109,15 +109,17 @@ drivers/serial.c | |||
109 | 109 | ||
110 | /* Storage */ | 110 | /* Storage */ |
111 | #ifndef SIMULATOR | 111 | #ifndef SIMULATOR |
112 | #ifdef HAVE_MMC | 112 | #if (CONFIG_STORAGE & STORAGE_MMC) |
113 | drivers/ata_mmc.c | 113 | drivers/ata_mmc.c |
114 | #elif defined(HAVE_FLASH_DISK) | 114 | #elif (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND & NAND_IFP7XX) |
115 | drivers/ata_flash.c | 115 | drivers/ata_flash.c |
116 | #elif defined(HAVE_ATA) | 116 | #elif (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND & NAND_TCC) |
117 | target/arm/ata-nand-telechips.c | ||
118 | #elif (CONFIG_STORAGE & STORAGE_ATA) | ||
117 | drivers/ata.c | 119 | drivers/ata.c |
118 | #endif /* HAVE_MMC */ | 120 | #endif /* CONFIG_STORAGE */ |
119 | drivers/fat.c | 121 | drivers/fat.c |
120 | #if defined(HAVE_MMC) || defined(HAVE_ATA_SD) | 122 | #if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD) |
121 | hotswap.c | 123 | hotswap.c |
122 | #endif | 124 | #endif |
123 | #endif /* SIMULATOR */ | 125 | #endif /* SIMULATOR */ |
@@ -981,7 +983,6 @@ target/arm/pnx0101/pcm-pnx0101.c | |||
981 | #ifdef LOGIK_DAX | 983 | #ifdef LOGIK_DAX |
982 | #ifndef SIMULATOR | 984 | #ifndef SIMULATOR |
983 | drivers/nand_id.c | 985 | drivers/nand_id.c |
984 | target/arm/ata-nand-telechips.c | ||
985 | target/arm/lcd-ssd1815.c | 986 | target/arm/lcd-ssd1815.c |
986 | target/arm/tcc77x/adc-tcc77x.c | 987 | target/arm/tcc77x/adc-tcc77x.c |
987 | target/arm/tcc77x/kernel-tcc77x.c | 988 | target/arm/tcc77x/kernel-tcc77x.c |
@@ -1004,7 +1005,6 @@ target/arm/tcc77x/logikdax/audio-logikdax.c | |||
1004 | #ifndef SIMULATOR | 1005 | #ifndef SIMULATOR |
1005 | drivers/nand_id.c | 1006 | drivers/nand_id.c |
1006 | target/arm/lcd-ssd1815.c | 1007 | target/arm/lcd-ssd1815.c |
1007 | target/arm/ata-nand-telechips.c | ||
1008 | target/arm/tcc77x/adc-tcc77x.c | 1008 | target/arm/tcc77x/adc-tcc77x.c |
1009 | target/arm/tcc77x/kernel-tcc77x.c | 1009 | target/arm/tcc77x/kernel-tcc77x.c |
1010 | target/arm/tcc77x/powermgmt-tcc77x.c | 1010 | target/arm/tcc77x/powermgmt-tcc77x.c |
@@ -1025,7 +1025,6 @@ target/arm/tcc77x/m200/audio-m200.c | |||
1025 | #ifdef SANSA_C100 | 1025 | #ifdef SANSA_C100 |
1026 | #ifndef SIMULATOR | 1026 | #ifndef SIMULATOR |
1027 | drivers/nand_id.c | 1027 | drivers/nand_id.c |
1028 | target/arm/ata-nand-telechips.c | ||
1029 | target/arm/tcc77x/adc-tcc77x.c | 1028 | target/arm/tcc77x/adc-tcc77x.c |
1030 | target/arm/tcc77x/kernel-tcc77x.c | 1029 | target/arm/tcc77x/kernel-tcc77x.c |
1031 | target/arm/tcc77x/c100/lcd-S6B33B2.c | 1030 | target/arm/tcc77x/c100/lcd-S6B33B2.c |
@@ -1071,7 +1070,6 @@ target/arm/as3525/as3525-codec.c | |||
1071 | #ifndef SIMULATOR | 1070 | #ifndef SIMULATOR |
1072 | drivers/nand_id.c | 1071 | drivers/nand_id.c |
1073 | drivers/pcf50606.c | 1072 | drivers/pcf50606.c |
1074 | target/arm/ata-nand-telechips.c | ||
1075 | target/arm/tcc77x/system-tcc77x.c | 1073 | target/arm/tcc77x/system-tcc77x.c |
1076 | target/arm/tcc77x/kernel-tcc77x.c | 1074 | target/arm/tcc77x/kernel-tcc77x.c |
1077 | target/arm/tcc77x/timer-tcc77x.c | 1075 | target/arm/tcc77x/timer-tcc77x.c |
@@ -1096,7 +1094,6 @@ target/arm/tcc77x/iaudio7/audio-iaudio7.c | |||
1096 | drivers/nand_id.c | 1094 | drivers/nand_id.c |
1097 | drivers/pcf50606.c | 1095 | drivers/pcf50606.c |
1098 | target/arm/lcd-as-memframe.S | 1096 | target/arm/lcd-as-memframe.S |
1099 | target/arm/ata-nand-telechips.c | ||
1100 | target/arm/tcc780x/adc-tcc780x.c | 1097 | target/arm/tcc780x/adc-tcc780x.c |
1101 | target/arm/tcc780x/system-tcc780x.c | 1098 | target/arm/tcc780x/system-tcc780x.c |
1102 | target/arm/tcc780x/cowond2/button-cowond2.c | 1099 | target/arm/tcc780x/cowond2/button-cowond2.c |
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 3130a3e2b4..90be93f4f4 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -204,7 +204,7 @@ static char fat_cache_sectors[FAT_CACHE_SIZE][SECTOR_SIZE]; | |||
204 | static struct fat_cache_entry fat_cache[FAT_CACHE_SIZE]; | 204 | static struct fat_cache_entry fat_cache[FAT_CACHE_SIZE]; |
205 | static struct mutex cache_mutex SHAREDBSS_ATTR; | 205 | static struct mutex cache_mutex SHAREDBSS_ATTR; |
206 | 206 | ||
207 | #if defined(HAVE_HOTSWAP) && !defined(HAVE_MMC) /* A better condition ?? */ | 207 | #if defined(HAVE_HOTSWAP) && !(CONFIG_STORAGE & STORAGE_MMC) /* A better condition ?? */ |
208 | void fat_lock(void) | 208 | void fat_lock(void) |
209 | { | 209 | { |
210 | mutex_lock(&cache_mutex); | 210 | mutex_lock(&cache_mutex); |
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c index 961974e987..47fbf564ff 100644 --- a/firmware/drivers/serial.c +++ b/firmware/drivers/serial.c | |||
@@ -39,7 +39,7 @@ | |||
39 | /* iFP7xx has no remote */ | 39 | /* iFP7xx has no remote */ |
40 | 40 | ||
41 | #if !defined(HAVE_FMADC) /* Recorder FM/V2 has no remote control pin */ \ | 41 | #if !defined(HAVE_FMADC) /* Recorder FM/V2 has no remote control pin */ \ |
42 | && !defined(HAVE_MMC) /* MMC takes serial port 1, so don't mess with it */ | 42 | && !(CONFIG_STORAGE & STORAGE_MMC) /* MMC takes serial port 1, so don't mess with it */ |
43 | 43 | ||
44 | /* Received byte identifiers */ | 44 | /* Received byte identifiers */ |
45 | #define PLAY 0xC1 | 45 | #define PLAY 0xC1 |
@@ -146,7 +146,7 @@ int remote_control_rx(void) | |||
146 | return ret; | 146 | return ret; |
147 | } | 147 | } |
148 | 148 | ||
149 | #endif /* !HAVE_FMADC && !HAVE_MMC */ | 149 | #endif /* !HAVE_FMADC && !STORAGE_MMC */ |
150 | #elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL) | 150 | #elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL) |
151 | 151 | ||
152 | void serial_tx(const unsigned char *buf) | 152 | void serial_tx(const unsigned char *buf) |
diff --git a/firmware/export/ata_idle_notify.h b/firmware/export/ata_idle_notify.h index cfbba6f13d..aea2c92b06 100644 --- a/firmware/export/ata_idle_notify.h +++ b/firmware/export/ata_idle_notify.h | |||
@@ -44,7 +44,8 @@ enum { | |||
44 | }; | 44 | }; |
45 | 45 | ||
46 | #define USING_ATA_CALLBACK !defined(SIMULATOR) \ | 46 | #define USING_ATA_CALLBACK !defined(SIMULATOR) \ |
47 | && !defined(HAVE_FLASH_DISK) \ | 47 | && ! ((CONFIG_STORAGE & STORAGE_NAND) \ |
48 | && (CONFIG_NAND & NAND_IFP7XX)) \ | ||
48 | && !defined(BOOTLOADER) | 49 | && !defined(BOOTLOADER) |
49 | 50 | ||
50 | typedef bool (*ata_idle_notify)(void); | 51 | typedef bool (*ata_idle_notify)(void); |
diff --git a/firmware/export/config-c100.h b/firmware/export/config-c100.h index 5bf0fc83a6..9a2664202a 100644 --- a/firmware/export/config-c100.h +++ b/firmware/export/config-c100.h | |||
@@ -120,4 +120,8 @@ | |||
120 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 120 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
121 | #define BOOTDIR "/" | 121 | #define BOOTDIR "/" |
122 | 122 | ||
123 | #define CONFIG_STORAGE STORAGE_NAND | ||
124 | |||
125 | #define CONFIG_NAND NAND_TCC | ||
126 | |||
123 | #endif /* SIMULATOR */ | 127 | #endif /* SIMULATOR */ |
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h index 9a9198ee05..a96b9c7ef8 100644 --- a/firmware/export/config-c200.h +++ b/firmware/export/config-c200.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define HAVE_FLASH_STORAGE | 115 | #define HAVE_FLASH_STORAGE |
116 | 116 | ||
117 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 117 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
118 | #define HAVE_ATA_SD | 118 | #define CONFIG_STORAGE STORAGE_SD |
119 | 119 | ||
120 | #define BATTERY_CAPACITY_DEFAULT 530 /* default battery capacity */ | 120 | #define BATTERY_CAPACITY_DEFAULT 530 /* default battery capacity */ |
121 | #define BATTERY_CAPACITY_MIN 530 /* min. capacity selectable */ | 121 | #define BATTERY_CAPACITY_MIN 530 /* min. capacity selectable */ |
diff --git a/firmware/export/config-clip.h b/firmware/export/config-clip.h index 01a08f3886..591ec1012a 100644 --- a/firmware/export/config-clip.h +++ b/firmware/export/config-clip.h | |||
@@ -95,7 +95,7 @@ | |||
95 | #define HAVE_FLASH_STORAGE | 95 | #define HAVE_FLASH_STORAGE |
96 | 96 | ||
97 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 97 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
98 | #define HAVE_ATA_SD | 98 | #define CONFIG_STORAGE STORAGE_SD |
99 | 99 | ||
100 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ | 100 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ |
101 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 101 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ |
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h index d136caefb2..749eb0b882 100644 --- a/firmware/export/config-cowond2.h +++ b/firmware/export/config-cowond2.h | |||
@@ -145,4 +145,8 @@ | |||
145 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 145 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
146 | #define BOOTDIR "/.rockbox" | 146 | #define BOOTDIR "/.rockbox" |
147 | 147 | ||
148 | #define CONFIG_STORAGE STORAGE_NAND | ||
149 | |||
150 | #define CONFIG_NAND NAND_TCC | ||
151 | |||
148 | #endif /* SIMULATOR */ | 152 | #endif /* SIMULATOR */ |
diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h index e9cc2685b6..5f0336e538 100644 --- a/firmware/export/config-creativezv.h +++ b/firmware/export/config-creativezv.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define MODEL_NUMBER 28 | 37 | #define MODEL_NUMBER 28 |
38 | 38 | ||
39 | /* define this if you use an ATA controller */ | 39 | /* define this if you use an ATA controller */ |
40 | #define HAVE_ATA | 40 | #define CONFIG_STORAGE STORAGE_ATA |
41 | 41 | ||
42 | /* define this if you have a bitmap LCD display */ | 42 | /* define this if you have a bitmap LCD display */ |
43 | #define HAVE_LCD_BITMAP | 43 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h index ec21500296..ea3cc871a5 100644 --- a/firmware/export/config-creativezvm.h +++ b/firmware/export/config-creativezvm.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define MODEL_NUMBER 26 | 37 | #define MODEL_NUMBER 26 |
38 | 38 | ||
39 | /* define this if you use an ATA controller */ | 39 | /* define this if you use an ATA controller */ |
40 | #define HAVE_ATA | 40 | #define CONFIG_STORAGE STORAGE_ATA |
41 | 41 | ||
42 | /* define this if you have a bitmap LCD display */ | 42 | /* define this if you have a bitmap LCD display */ |
43 | #define HAVE_LCD_BITMAP | 43 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h index d1e1d80889..a0cf2ba918 100644 --- a/firmware/export/config-creativezvm60gb.h +++ b/firmware/export/config-creativezvm60gb.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define MODEL_NUMBER 27 | 37 | #define MODEL_NUMBER 27 |
38 | 38 | ||
39 | /* define this if you use an ATA controller */ | 39 | /* define this if you use an ATA controller */ |
40 | #define HAVE_ATA | 40 | #define CONFIG_STORAGE STORAGE_ATA |
41 | 41 | ||
42 | /* define this if you have a bitmap LCD display */ | 42 | /* define this if you have a bitmap LCD display */ |
43 | #define HAVE_LCD_BITMAP | 43 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index 745aa71735..075f490ee4 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h | |||
@@ -112,7 +112,7 @@ | |||
112 | #define HAVE_FLASH_STORAGE | 112 | #define HAVE_FLASH_STORAGE |
113 | 113 | ||
114 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 114 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
115 | #define HAVE_ATA_SD | 115 | #define CONFIG_STORAGE STORAGE_SD |
116 | 116 | ||
117 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ | 117 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ |
118 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 118 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ |
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index 0dc87d4123..c51bac0a9f 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define HAVE_FLASH_STORAGE | 115 | #define HAVE_FLASH_STORAGE |
116 | 116 | ||
117 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 117 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
118 | #define HAVE_ATA_SD | 118 | #define CONFIG_STORAGE STORAGE_SD |
119 | 119 | ||
120 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ | 120 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ |
121 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 121 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ |
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 1908f6a29d..716bc98e09 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* define this if you use an ATA controller */ | 1 | /* define this if you use an ATA controller */ |
2 | #define HAVE_ATA | 2 | #define CONFIG_STORAGE STORAGE_ATA |
3 | 3 | ||
4 | #define MODEL_NAME "Archos FM Recorder" | 4 | #define MODEL_NAME "Archos FM Recorder" |
5 | 5 | ||
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h index 7f36bce7dd..007fd7d2f4 100644 --- a/firmware/export/config-gigabeat-s.h +++ b/firmware/export/config-gigabeat-s.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define MODEL_NUMBER 21 | 13 | #define MODEL_NUMBER 21 |
14 | 14 | ||
15 | /* define this if you use an ATA controller */ | 15 | /* define this if you use an ATA controller */ |
16 | #define HAVE_ATA | 16 | #define CONFIG_STORAGE STORAGE_ATA |
17 | 17 | ||
18 | /* define this if you have a bitmap LCD display */ | 18 | /* define this if you have a bitmap LCD display */ |
19 | #define HAVE_LCD_BITMAP | 19 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h index f4910bfcb0..0c5462400b 100644 --- a/firmware/export/config-gigabeat.h +++ b/firmware/export/config-gigabeat.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 18 | 11 | #define MODEL_NUMBER 18 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have a bitmap LCD display */ | 16 | /* define this if you have a bitmap LCD display */ |
17 | #define HAVE_LCD_BITMAP | 17 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index 8504ffd25a..2056fd4fcf 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "iriver H10 20GB" | 9 | #define MODEL_NAME "iriver H10 20GB" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h index 641709f639..9c327f11fd 100644 --- a/firmware/export/config-h100.h +++ b/firmware/export/config-h100.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define MODEL_NUMBER 1 | 15 | #define MODEL_NUMBER 1 |
16 | 16 | ||
17 | /* define this if you use an ATA controller */ | 17 | /* define this if you use an ATA controller */ |
18 | #define HAVE_ATA | 18 | #define CONFIG_STORAGE STORAGE_ATA |
19 | 19 | ||
20 | /* define this if you have a bitmap LCD display */ | 20 | /* define this if you have a bitmap LCD display */ |
21 | #define HAVE_LCD_BITMAP | 21 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index fa1e37229a..40acdc6efe 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "iriver H10 5/6GB" | 9 | #define MODEL_NAME "iriver H10 5/6GB" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h index 6177347664..d81fa07d93 100644 --- a/firmware/export/config-h120.h +++ b/firmware/export/config-h120.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define MODEL_NUMBER 0 | 10 | #define MODEL_NUMBER 0 |
11 | 11 | ||
12 | /* define this if you use an ATA controller */ | 12 | /* define this if you use an ATA controller */ |
13 | #define HAVE_ATA | 13 | #define CONFIG_STORAGE STORAGE_ATA |
14 | 14 | ||
15 | /* define this if you have a bitmap LCD display */ | 15 | /* define this if you have a bitmap LCD display */ |
16 | #define HAVE_LCD_BITMAP | 16 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h index 0b305747cf..f45b694fe0 100644 --- a/firmware/export/config-h300.h +++ b/firmware/export/config-h300.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define MODEL_NUMBER 2 | 10 | #define MODEL_NUMBER 2 |
11 | 11 | ||
12 | /* define this if you use an ATA controller */ | 12 | /* define this if you use an ATA controller */ |
13 | #define HAVE_ATA | 13 | #define CONFIG_STORAGE STORAGE_ATA |
14 | 14 | ||
15 | /* define this if you have a bitmap LCD display */ | 15 | /* define this if you have a bitmap LCD display */ |
16 | #define HAVE_LCD_BITMAP | 16 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-hdd1630.h b/firmware/export/config-hdd1630.h index 810902e487..7ee3f11355 100755 --- a/firmware/export/config-hdd1630.h +++ b/firmware/export/config-hdd1630.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "Philips GoGear HDD1630" | 9 | #define MODEL_NAME "Philips GoGear HDD1630" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | /* #define HAVE_RECORDING */ | 15 | /* #define HAVE_RECORDING */ |
diff --git a/firmware/export/config-iaudio7.h b/firmware/export/config-iaudio7.h index cce357ec4b..ca6212d305 100644 --- a/firmware/export/config-iaudio7.h +++ b/firmware/export/config-iaudio7.h | |||
@@ -155,6 +155,10 @@ | |||
155 | #define BOOTFILE "rockbox." BOOTFILE_EXT | 155 | #define BOOTFILE "rockbox." BOOTFILE_EXT |
156 | #define BOOTDIR "/" | 156 | #define BOOTDIR "/" |
157 | 157 | ||
158 | #define CONFIG_STORAGE STORAGE_NAND | ||
159 | |||
160 | #define CONFIG_NAND NAND_TCC | ||
161 | |||
158 | #ifdef BOOTLOADER | 162 | #ifdef BOOTLOADER |
159 | #define TCCBOOT | 163 | #define TCCBOOT |
160 | #endif | 164 | #endif |
diff --git a/firmware/export/config-iaudiom3.h b/firmware/export/config-iaudiom3.h index 8ebd5cb8b6..f4ced651d0 100644 --- a/firmware/export/config-iaudiom3.h +++ b/firmware/export/config-iaudiom3.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "iAudio M3" | 9 | #define MODEL_NAME "iAudio M3" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h index 027ffb61e5..5ec6b77862 100644 --- a/firmware/export/config-iaudiom5.h +++ b/firmware/export/config-iaudiom5.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "iAudio M5" | 9 | #define MODEL_NAME "iAudio M5" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index 5ea3dcd73c..cdae55af4f 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "iAudio X5" | 9 | #define MODEL_NAME "iAudio X5" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
15 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-ifp7xx.h b/firmware/export/config-ifp7xx.h index 6e6f9f4097..6a26a93da2 100644 --- a/firmware/export/config-ifp7xx.h +++ b/firmware/export/config-ifp7xx.h | |||
@@ -31,7 +31,9 @@ | |||
31 | 31 | ||
32 | #define CONFIG_KEYPAD IRIVER_IFP7XX_PAD | 32 | #define CONFIG_KEYPAD IRIVER_IFP7XX_PAD |
33 | 33 | ||
34 | #define CONFIG_FLASH FLASH_IFP7XX | 34 | #define CONFIG_STORAGE STORAGE_NAND |
35 | |||
36 | #define CONFIG_NAND NAND_IFP7XX | ||
35 | 37 | ||
36 | #define HAVE_FAT16SUPPORT | 38 | #define HAVE_FAT16SUPPORT |
37 | 39 | ||
@@ -50,8 +52,6 @@ | |||
50 | /* Define this if you have the WM8975 audio codec */ | 52 | /* Define this if you have the WM8975 audio codec */ |
51 | /* #define HAVE_WM8975 */ | 53 | /* #define HAVE_WM8975 */ |
52 | 54 | ||
53 | #define HAVE_FLASH_DISK | ||
54 | |||
55 | /* Virtual LED (icon) */ | 55 | /* Virtual LED (icon) */ |
56 | #define CONFIG_LED LED_VIRTUAL | 56 | #define CONFIG_LED LED_VIRTUAL |
57 | 57 | ||
diff --git a/firmware/export/config-ipod1g2g.h b/firmware/export/config-ipod1g2g.h index ae810b14cb..4308d9c66c 100644 --- a/firmware/export/config-ipod1g2g.h +++ b/firmware/export/config-ipod1g2g.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 19 | 11 | #define MODEL_NUMBER 19 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility | 16 | /* define this if you have recording possibility |
17 | #define HAVE_RECORDING */ | 17 | #define HAVE_RECORDING */ |
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index 3ca95c375c..f1550576d2 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #define MODEL_NUMBER 7 | 12 | #define MODEL_NUMBER 7 |
13 | 13 | ||
14 | /* define this if you use an ATA controller */ | 14 | /* define this if you use an ATA controller */ |
15 | #define HAVE_ATA | 15 | #define CONFIG_STORAGE STORAGE_ATA |
16 | 16 | ||
17 | /* define this if you have recording possibility */ | 17 | /* define this if you have recording possibility */ |
18 | /*#define HAVE_RECORDING*/ | 18 | /*#define HAVE_RECORDING*/ |
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h index 4f0045fee8..4a2207d1d6 100644 --- a/firmware/export/config-ipod4g.h +++ b/firmware/export/config-ipod4g.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 8 | 11 | #define MODEL_NUMBER 8 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | #define HAVE_RECORDING | 17 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h index d23a03a00b..47b7a4eacf 100644 --- a/firmware/export/config-ipodcolor.h +++ b/firmware/export/config-ipodcolor.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 3 | 11 | #define MODEL_NUMBER 3 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | #define HAVE_RECORDING | 17 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h index 8477e497b4..c2d6376706 100644 --- a/firmware/export/config-ipodmini.h +++ b/firmware/export/config-ipodmini.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 9 | 11 | #define MODEL_NUMBER 9 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | /*#define HAVE_RECORDING*/ | 17 | /*#define HAVE_RECORDING*/ |
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h index 5e7bdb0d09..6d6ebf1a9a 100644 --- a/firmware/export/config-ipodmini2g.h +++ b/firmware/export/config-ipodmini2g.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 11 | 11 | #define MODEL_NUMBER 11 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | /*#define HAVE_RECORDING*/ | 17 | /*#define HAVE_RECORDING*/ |
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h index 0750d55557..7d6515fc0f 100644 --- a/firmware/export/config-ipodnano.h +++ b/firmware/export/config-ipodnano.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 4 | 11 | #define MODEL_NUMBER 4 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | #define HAVE_RECORDING | 17 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h index c7a248e532..fa6ddd304f 100644 --- a/firmware/export/config-ipodvideo.h +++ b/firmware/export/config-ipodvideo.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #define MODEL_NUMBER 5 | 11 | #define MODEL_NUMBER 5 |
12 | 12 | ||
13 | /* define this if you use an ATA controller */ | 13 | /* define this if you use an ATA controller */ |
14 | #define HAVE_ATA | 14 | #define CONFIG_STORAGE STORAGE_ATA |
15 | 15 | ||
16 | /* define this if you have recording possibility */ | 16 | /* define this if you have recording possibility */ |
17 | #define HAVE_RECORDING | 17 | #define HAVE_RECORDING |
diff --git a/firmware/export/config-logikdax.h b/firmware/export/config-logikdax.h index f9ee4b94a0..160058ff7f 100644 --- a/firmware/export/config-logikdax.h +++ b/firmware/export/config-logikdax.h | |||
@@ -139,4 +139,8 @@ | |||
139 | #define ICODE_ATTR_ALAC | 139 | #define ICODE_ATTR_ALAC |
140 | #define IBSS_ATTR_SHORTEN_DECODED0 | 140 | #define IBSS_ATTR_SHORTEN_DECODED0 |
141 | 141 | ||
142 | #define CONFIG_STORAGE STORAGE_NAND | ||
143 | |||
144 | #define CONFIG_NAND NAND_TCC | ||
145 | |||
142 | #endif /* SIMULATOR */ | 146 | #endif /* SIMULATOR */ |
diff --git a/firmware/export/config-m200.h b/firmware/export/config-m200.h index 2733ad577d..b3b71ee778 100644 --- a/firmware/export/config-m200.h +++ b/firmware/export/config-m200.h | |||
@@ -124,4 +124,8 @@ | |||
124 | #define ICODE_ATTR_ALAC | 124 | #define ICODE_ATTR_ALAC |
125 | #define IBSS_ATTR_SHORTEN_DECODED0 | 125 | #define IBSS_ATTR_SHORTEN_DECODED0 |
126 | 126 | ||
127 | #define CONFIG_STORAGE STORAGE_NAND | ||
128 | |||
129 | #define CONFIG_NAND NAND_TCC | ||
130 | |||
127 | #endif /* SIMULATOR */ | 131 | #endif /* SIMULATOR */ |
diff --git a/firmware/export/config-mrobe100.h b/firmware/export/config-mrobe100.h index 99e7757af8..051f15824f 100644 --- a/firmware/export/config-mrobe100.h +++ b/firmware/export/config-mrobe100.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MODEL_NAME "Olympus m:robe MR-100" | 9 | #define MODEL_NAME "Olympus m:robe MR-100" |
10 | 10 | ||
11 | /* define this if you use an ATA controller */ | 11 | /* define this if you use an ATA controller */ |
12 | #define HAVE_ATA | 12 | #define CONFIG_STORAGE STORAGE_ATA |
13 | 13 | ||
14 | /* define this if you have a bitmap LCD display */ | 14 | /* define this if you have a bitmap LCD display */ |
15 | #define HAVE_LCD_BITMAP | 15 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index 8e20c9478c..572d018328 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define MODEL_NUMBER 22 | 33 | #define MODEL_NUMBER 22 |
34 | 34 | ||
35 | /* define this if you use an ATA controller */ | 35 | /* define this if you use an ATA controller */ |
36 | #define HAVE_ATA | 36 | #define CONFIG_STORAGE STORAGE_ATA |
37 | 37 | ||
38 | /* define this if you have a bitmap LCD display */ | 38 | /* define this if you have a bitmap LCD display */ |
39 | #define HAVE_LCD_BITMAP | 39 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h index 12deb9cf71..38bc5d7b01 100644 --- a/firmware/export/config-ondavx747.h +++ b/firmware/export/config-ondavx747.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define MODEL_NUMBER 35 | 34 | #define MODEL_NUMBER 35 |
35 | 35 | ||
36 | /* define this if you use an ATA controller */ | 36 | /* define this if you use an ATA controller */ |
37 | //#define HAVE_ATA | 37 | //#define CONFIG_STORAGE STORAGE_ATA |
38 | 38 | ||
39 | /* define this if you have a bitmap LCD display */ | 39 | /* define this if you have a bitmap LCD display */ |
40 | #define HAVE_LCD_BITMAP | 40 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-ondavx767.h b/firmware/export/config-ondavx767.h index 9c2d237b01..bbead76137 100644 --- a/firmware/export/config-ondavx767.h +++ b/firmware/export/config-ondavx767.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define MODEL_NUMBER 36 | 34 | #define MODEL_NUMBER 36 |
35 | 35 | ||
36 | /* define this if you use an ATA controller */ | 36 | /* define this if you use an ATA controller */ |
37 | //#define HAVE_ATA | 37 | //#define CONFIG_STORAGE STORAGE_ATA |
38 | 38 | ||
39 | /* define this if you have a bitmap LCD display */ | 39 | /* define this if you have a bitmap LCD display */ |
40 | #define HAVE_LCD_BITMAP | 40 | #define HAVE_LCD_BITMAP |
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 8d3b040745..634433fcdb 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define HAVE_ONDIO_ADC | 106 | #define HAVE_ONDIO_ADC |
107 | 107 | ||
108 | /* Define this for MMC support instead of ATA harddisk */ | 108 | /* Define this for MMC support instead of ATA harddisk */ |
109 | #define HAVE_MMC | 109 | #define CONFIG_STORAGE STORAGE_MMC |
110 | 110 | ||
111 | /* Define this to support mounting FAT16 partitions */ | 111 | /* Define this to support mounting FAT16 partitions */ |
112 | #define HAVE_FAT16SUPPORT | 112 | #define HAVE_FAT16SUPPORT |
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index fc99bf459d..3443b839b6 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -89,7 +89,7 @@ | |||
89 | #define HAVE_ONDIO_ADC | 89 | #define HAVE_ONDIO_ADC |
90 | 90 | ||
91 | /* Define this for MMC support instead of ATA harddisk */ | 91 | /* Define this for MMC support instead of ATA harddisk */ |
92 | #define HAVE_MMC | 92 | #define CONFIG_STORAGE STORAGE_MMC |
93 | 93 | ||
94 | /* Define this to support mounting FAT16 partitions */ | 94 | /* Define this to support mounting FAT16 partitions */ |
95 | #define HAVE_FAT16SUPPORT | 95 | #define HAVE_FAT16SUPPORT |
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index d94ca82735..9008212a17 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* define this if you use an ATA controller */ | 1 | /* define this if you use an ATA controller */ |
2 | #define HAVE_ATA | 2 | #define CONFIG_STORAGE STORAGE_ATA |
3 | 3 | ||
4 | #define MODEL_NAME "Archos Player/Studio" | 4 | #define MODEL_NAME "Archos Player/Studio" |
5 | 5 | ||
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index f6ddb88af6..e5fa3361cc 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* define this if you use an ATA controller */ | 1 | /* define this if you use an ATA controller */ |
2 | #define HAVE_ATA | 2 | #define CONFIG_STORAGE STORAGE_ATA |
3 | 3 | ||
4 | #define MODEL_NAME "Archos Recorder" | 4 | #define MODEL_NAME "Archos Recorder" |
5 | 5 | ||
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 5d62ec464c..3244f19f1d 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* define this if you use an ATA controller */ | 1 | /* define this if you use an ATA controller */ |
2 | #define HAVE_ATA | 2 | #define CONFIG_STORAGE STORAGE_ATA |
3 | 3 | ||
4 | #define MODEL_NAME "Archos Recorder v2" | 4 | #define MODEL_NAME "Archos Recorder v2" |
5 | 5 | ||
diff --git a/firmware/export/config-sa9200.h b/firmware/export/config-sa9200.h index 433e28db82..b9fd4575bc 100755 --- a/firmware/export/config-sa9200.h +++ b/firmware/export/config-sa9200.h | |||
@@ -94,7 +94,7 @@ | |||
94 | #define HAVE_FLASH_STORAGE | 94 | #define HAVE_FLASH_STORAGE |
95 | 95 | ||
96 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ | 96 | /* define this if the flash memory uses the SecureDigital Memory Card protocol */ |
97 | #define HAVE_ATA_SD | 97 | #define CONFIG_STORAGE STORAGE_SD |
98 | 98 | ||
99 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ | 99 | #define BATTERY_CAPACITY_DEFAULT 750 /* default battery capacity */ |
100 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ | 100 | #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ |
diff --git a/firmware/export/config-tpj1022.h b/firmware/export/config-tpj1022.h index 1b49e0ebb9..6cc85fdfc9 100644 --- a/firmware/export/config-tpj1022.h +++ b/firmware/export/config-tpj1022.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define MODEL_NUMBER 15 | 10 | #define MODEL_NUMBER 15 |
11 | 11 | ||
12 | /* define this if you use an ATA controller */ | 12 | /* define this if you use an ATA controller */ |
13 | #define HAVE_ATA | 13 | #define CONFIG_STORAGE STORAGE_ATA |
14 | 14 | ||
15 | /* define this if you have recording possibility */ | 15 | /* define this if you have recording possibility */ |
16 | /*#define HAVE_RECORDING*/ /* TODO: add support for this */ | 16 | /*#define HAVE_RECORDING*/ /* TODO: add support for this */ |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 01141f3866..c12f6ce4d2 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -28,6 +28,12 @@ | |||
28 | 28 | ||
29 | /* symbolic names for multiple choice configurations: */ | 29 | /* symbolic names for multiple choice configurations: */ |
30 | 30 | ||
31 | /* CONFIG_STORAGE (note these are combineable bit-flags) */ | ||
32 | #define STORAGE_ATA 0x01 | ||
33 | #define STORAGE_MMC 0x02 | ||
34 | #define STORAGE_SD 0x04 | ||
35 | #define STORAGE_NAND 0x08 | ||
36 | |||
31 | /* CONFIG_TUNER (note these are combineable bit-flags) */ | 37 | /* CONFIG_TUNER (note these are combineable bit-flags) */ |
32 | #define S1A0903X01 0x01 /* Samsung */ | 38 | #define S1A0903X01 0x01 /* Samsung */ |
33 | #define TEA5767 0x02 /* Philips */ | 39 | #define TEA5767 0x02 /* Philips */ |
@@ -180,8 +186,9 @@ | |||
180 | #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ | 186 | #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ |
181 | /* else HW controlled LED (iRiver H1x0) */ | 187 | /* else HW controlled LED (iRiver H1x0) */ |
182 | 188 | ||
183 | /* CONFIG_FLASH */ | 189 | /* CONFIG_NAND */ |
184 | #define FLASH_IFP7XX 1 | 190 | #define NAND_IFP7XX 1 |
191 | #define NAND_TCC 2 | ||
185 | 192 | ||
186 | /* CONFIG_RTC */ | 193 | /* CONFIG_RTC */ |
187 | #define RTC_M41ST84W 1 /* Archos Recorder */ | 194 | #define RTC_M41ST84W 1 /* Archos Recorder */ |
diff --git a/firmware/export/hotswap.h b/firmware/export/hotswap.h index d01c467adf..6872ca86db 100644 --- a/firmware/export/hotswap.h +++ b/firmware/export/hotswap.h | |||
@@ -41,14 +41,14 @@ typedef struct | |||
41 | unsigned int blocksize; /* block size in bytes */ | 41 | unsigned int blocksize; /* block size in bytes */ |
42 | } tCardInfo; | 42 | } tCardInfo; |
43 | 43 | ||
44 | #ifdef HAVE_ATA_SD | 44 | #if (CONFIG_STORAGE & STORAGE_SD) |
45 | #include "ata-sd-target.h" | 45 | #include "ata-sd-target.h" |
46 | #define card_detect card_detect_target | 46 | #define card_detect card_detect_target |
47 | #define card_get_info card_get_info_target | 47 | #define card_get_info card_get_info_target |
48 | #ifdef HAVE_HOTSWAP | 48 | #ifdef HAVE_HOTSWAP |
49 | #define card_enable_monitoring card_enable_monitoring_target | 49 | #define card_enable_monitoring card_enable_monitoring_target |
50 | #endif | 50 | #endif |
51 | #else /* HAVE_MMC */ | 51 | #else /* STORAGE_MMC */ |
52 | #include "ata_mmc.h" | 52 | #include "ata_mmc.h" |
53 | #define card_detect mmc_detect | 53 | #define card_detect mmc_detect |
54 | #define card_get_info mmc_card_info | 54 | #define card_get_info mmc_card_info |
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index acdee22a12..70c4b70d7a 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h | |||
@@ -142,7 +142,7 @@ extern int trickle_sec; /* trickle charge: How many seconds per minute | |||
142 | #define CURRENT_USB 500 /* usual current in mA in USB mode */ | 142 | #define CURRENT_USB 500 /* usual current in mA in USB mode */ |
143 | #ifdef HAVE_REMOTE_LCD | 143 | #ifdef HAVE_REMOTE_LCD |
144 | # define CURRENT_REMOTE 8 /* add. current when H100-remote connected */ | 144 | # define CURRENT_REMOTE 8 /* add. current when H100-remote connected */ |
145 | #endif /* HAVE_MMC */ | 145 | #endif /* HAVE_REMOTE_LCD */ |
146 | 146 | ||
147 | # define CURRENT_MIN_CHG 70 /* minimum charge current */ | 147 | # define CURRENT_MIN_CHG 70 /* minimum charge current */ |
148 | # define MIN_CHG_V 8500 /* at 8.5v charger voltage get CURRENT_MIN_CHG */ | 148 | # define MIN_CHG_V 8500 /* at 8.5v charger voltage get CURRENT_MIN_CHG */ |
@@ -152,7 +152,7 @@ extern int trickle_sec; /* trickle charge: How many seconds per minute | |||
152 | # define CURRENT_MAX_CHG 350 /* maximum charging current */ | 152 | # define CURRENT_MAX_CHG 350 /* maximum charging current */ |
153 | # endif | 153 | # endif |
154 | # define MAX_CHG_V 10250 /* anything over 10.25v gives CURRENT_MAX_CHG */ | 154 | # define MAX_CHG_V 10250 /* anything over 10.25v gives CURRENT_MAX_CHG */ |
155 | #endif /* not HAVE_MMC */ | 155 | #endif /* not ONDIO */ |
156 | 156 | ||
157 | extern unsigned short power_history[POWER_HISTORY_LEN]; | 157 | extern unsigned short power_history[POWER_HISTORY_LEN]; |
158 | extern const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT]; | 158 | extern const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT]; |
diff --git a/firmware/hotswap.c b/firmware/hotswap.c index cb8a539c01..97c162ce39 100644 --- a/firmware/hotswap.c +++ b/firmware/hotswap.c | |||
@@ -20,7 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
22 | #include "config.h" | 22 | #include "config.h" |
23 | #ifdef HAVE_MMC | 23 | #if (CONFIG_STORAGE & STORAGE_MMC) |
24 | #include "ata_mmc.h" | 24 | #include "ata_mmc.h" |
25 | #else | 25 | #else |
26 | #include "hotswap.h" | 26 | #include "hotswap.h" |
diff --git a/firmware/include/dir.h b/firmware/include/dir.h index 69403a7572..5aa6cde35a 100644 --- a/firmware/include/dir.h +++ b/firmware/include/dir.h | |||
@@ -28,10 +28,10 @@ | |||
28 | 28 | ||
29 | /* how to name volumes, first char must be outside of legal file names, | 29 | /* how to name volumes, first char must be outside of legal file names, |
30 | a number gets appended to enumerate, if applicable */ | 30 | a number gets appended to enumerate, if applicable */ |
31 | #ifdef HAVE_MMC | 31 | #if (CONFIG_STORAGE & STORAGE_MMC) |
32 | #define VOL_NAMES "<MMC%d>" | 32 | #define VOL_NAMES "<MMC%d>" |
33 | #define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */ | 33 | #define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */ |
34 | #elif defined(HAVE_HOTSWAP) | 34 | #elif (CONFIG_STORAGE & STORAGE_SD) |
35 | #define VOL_NAMES "<microSD%d>" | 35 | #define VOL_NAMES "<microSD%d>" |
36 | #define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */ | 36 | #define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */ |
37 | #else | 37 | #else |
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 86fadff2a2..6e0c03c94a 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -492,7 +492,7 @@ static int runcurrent(void) | |||
492 | { | 492 | { |
493 | int current; | 493 | int current; |
494 | 494 | ||
495 | #if MEM == 8 && !defined(HAVE_MMC) | 495 | #if MEM == 8 && !(defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM)) |
496 | /* assuming 192 kbps, the running time is 22% longer with 8MB */ | 496 | /* assuming 192 kbps, the running time is 22% longer with 8MB */ |
497 | current = (CURRENT_NORMAL*100/122); | 497 | current = (CURRENT_NORMAL*100/122); |
498 | #else | 498 | #else |
@@ -1059,7 +1059,7 @@ static void power_thread(void) | |||
1059 | /* initialize the voltages for the exponential filter */ | 1059 | /* initialize the voltages for the exponential filter */ |
1060 | avgbat = battery_adc_voltage() + 15; | 1060 | avgbat = battery_adc_voltage() + 15; |
1061 | 1061 | ||
1062 | #ifndef HAVE_MMC /* this adjustment is only needed for HD based */ | 1062 | #ifdef HAVE_DISK_STORAGE /* this adjustment is only needed for HD based */ |
1063 | /* The battery voltage is usually a little lower directly after | 1063 | /* The battery voltage is usually a little lower directly after |
1064 | turning on, because the disk was used heavily. Raise it by 5% */ | 1064 | turning on, because the disk was used heavily. Raise it by 5% */ |
1065 | #ifdef HAVE_CHARGING | 1065 | #ifdef HAVE_CHARGING |
@@ -1067,7 +1067,7 @@ static void power_thread(void) | |||
1067 | #endif | 1067 | #endif |
1068 | avgbat += (percent_to_volt_discharge[battery_type][6] - | 1068 | avgbat += (percent_to_volt_discharge[battery_type][6] - |
1069 | percent_to_volt_discharge[battery_type][5]) / 2; | 1069 | percent_to_volt_discharge[battery_type][5]) / 2; |
1070 | #endif /* not HAVE_MMC */ | 1070 | #endif /* HAVE_DISK_STORAGE */ |
1071 | 1071 | ||
1072 | avgbat = avgbat * BATT_AVE_SAMPLES; | 1072 | avgbat = avgbat * BATT_AVE_SAMPLES; |
1073 | battery_millivolts = avgbat / BATT_AVE_SAMPLES; | 1073 | battery_millivolts = avgbat / BATT_AVE_SAMPLES; |
diff --git a/firmware/usb.c b/firmware/usb.c index e5c7565d39..9064987ed1 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -71,7 +71,7 @@ static int countdown; | |||
71 | 71 | ||
72 | static int usb_state; | 72 | static int usb_state; |
73 | 73 | ||
74 | #if defined(HAVE_MMC) && defined(USB_FULL_INIT) | 74 | #if (CONFIG_STORAGE & STORAGE_MMC) && defined(USB_FULL_INIT) |
75 | static int usb_mmc_countdown = 0; | 75 | static int usb_mmc_countdown = 0; |
76 | #endif | 76 | #endif |
77 | 77 | ||
@@ -435,7 +435,7 @@ static void usb_tick(void) | |||
435 | } | 435 | } |
436 | } | 436 | } |
437 | } | 437 | } |
438 | #ifdef HAVE_MMC | 438 | #if (CONFIG_STORAGE & STORAGE_MMC) |
439 | if(usb_mmc_countdown > 0) | 439 | if(usb_mmc_countdown > 0) |
440 | { | 440 | { |
441 | usb_mmc_countdown--; | 441 | usb_mmc_countdown--; |
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 8c1b02b183..198ff46a56 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c | |||
@@ -39,7 +39,7 @@ | |||
39 | * by not overlapping ata_write_sector() with USB transfers. This does reduce | 39 | * by not overlapping ata_write_sector() with USB transfers. This does reduce |
40 | * write performance, so we only do it for the affected DAPs | 40 | * write performance, so we only do it for the affected DAPs |
41 | */ | 41 | */ |
42 | #ifdef HAVE_ATA_SD | 42 | #if (CONFIG_STORAGE & STORAGE_SD) |
43 | #define SERIALIZE_WRITES | 43 | #define SERIALIZE_WRITES |
44 | #endif | 44 | #endif |
45 | /* Enable the following define to export only the SD card slot. This | 45 | /* Enable the following define to export only the SD card slot. This |
@@ -668,7 +668,7 @@ static void handle_scsi(struct command_block_wrapper* cbw) | |||
668 | block_size = SECTOR_SIZE; | 668 | block_size = SECTOR_SIZE; |
669 | block_count = RAMDISK_SIZE; | 669 | block_count = RAMDISK_SIZE; |
670 | #else | 670 | #else |
671 | #if defined(HAVE_ATA_SD) || defined(HAVE_HOTSWAP) | 671 | #if (CONFIG_STORAGE & STORAGE_SD) || defined(HAVE_HOTSWAP) |
672 | tCardInfo* cinfo = card_get_info(lun); | 672 | tCardInfo* cinfo = card_get_info(lun); |
673 | if(cinfo->initialized && cinfo->numblocks > 0) { | 673 | if(cinfo->initialized && cinfo->numblocks > 0) { |
674 | block_size = cinfo->blocksize; | 674 | block_size = cinfo->blocksize; |