[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rockbox-cvs
Subject:    gevaerts: r18950 - in trunk: apps apps/plugins bootloader firmware
From:       mailer () svn ! rockbox ! org
Date:       2008-10-31 21:25:05
Message-ID: 200810312125.m9VLP5lY002376 () giant ! haxx ! se
[Download RAW message or body]

Date: 2008-10-31 22:25:04 +0100 (Fri, 31 Oct 2008)
New Revision: 18950

Log Message:
cleanup storage defines

Modified:
   trunk/apps/debug_menu.c
   trunk/apps/main.c
   trunk/apps/misc.c
   trunk/apps/mpeg.c
   trunk/apps/mpeg.h
   trunk/apps/plugins/SOURCES
   trunk/apps/plugins/alpine_cdc.c
   trunk/apps/plugins/splitedit.c
   trunk/apps/plugins/test_disk.c
   trunk/apps/plugins/wavplay.c
   trunk/apps/plugins/wavrecord.c
   trunk/apps/screens.c
   trunk/apps/screens.h
   trunk/apps/talk.c
   trunk/bootloader/main-pp.c
   trunk/firmware/SOURCES
   trunk/firmware/drivers/fat.c
   trunk/firmware/drivers/serial.c
   trunk/firmware/export/ata_idle_notify.h
   trunk/firmware/export/config-c100.h
   trunk/firmware/export/config-c200.h
   trunk/firmware/export/config-clip.h
   trunk/firmware/export/config-cowond2.h
   trunk/firmware/export/config-creativezv.h
   trunk/firmware/export/config-creativezvm.h
   trunk/firmware/export/config-creativezvm60gb.h
   trunk/firmware/export/config-e200.h
   trunk/firmware/export/config-e200v2.h
   trunk/firmware/export/config-fmrecorder.h
   trunk/firmware/export/config-gigabeat-s.h
   trunk/firmware/export/config-gigabeat.h
   trunk/firmware/export/config-h10.h
   trunk/firmware/export/config-h100.h
   trunk/firmware/export/config-h10_5gb.h
   trunk/firmware/export/config-h120.h
   trunk/firmware/export/config-h300.h
   trunk/firmware/export/config-hdd1630.h
   trunk/firmware/export/config-iaudio7.h
   trunk/firmware/export/config-iaudiom3.h
   trunk/firmware/export/config-iaudiom5.h
   trunk/firmware/export/config-iaudiox5.h
   trunk/firmware/export/config-ifp7xx.h
   trunk/firmware/export/config-ipod1g2g.h
   trunk/firmware/export/config-ipod3g.h
   trunk/firmware/export/config-ipod4g.h
   trunk/firmware/export/config-ipodcolor.h
   trunk/firmware/export/config-ipodmini.h
   trunk/firmware/export/config-ipodmini2g.h
   trunk/firmware/export/config-ipodnano.h
   trunk/firmware/export/config-ipodvideo.h
   trunk/firmware/export/config-logikdax.h
   trunk/firmware/export/config-m200.h
   trunk/firmware/export/config-mrobe100.h
   trunk/firmware/export/config-mrobe500.h
   trunk/firmware/export/config-ondavx747.h
   trunk/firmware/export/config-ondavx767.h
   trunk/firmware/export/config-ondiofm.h
   trunk/firmware/export/config-ondiosp.h
   trunk/firmware/export/config-player.h
   trunk/firmware/export/config-recorder.h
   trunk/firmware/export/config-recorderv2.h
   trunk/firmware/export/config-sa9200.h
   trunk/firmware/export/config-tpj1022.h
   trunk/firmware/export/config.h
   trunk/firmware/export/hotswap.h
   trunk/firmware/export/powermgmt.h
   trunk/firmware/hotswap.c
   trunk/firmware/include/dir.h
   trunk/firmware/powermgmt.c
   trunk/firmware/usb.c
   trunk/firmware/usbstack/usb_storage.c

Modified: trunk/apps/debug_menu.c
===================================================================
--- trunk/apps/debug_menu.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/debug_menu.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -63,7 +63,7 @@
 #include "fat.h"
 #include "mas.h"
 #include "eeprom_24cxx.h"
-#if defined(HAVE_MMC) || defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
 #include "hotswap.h"
 #endif
 #if CONFIG_TUNER
@@ -1730,8 +1730,8 @@
 #endif
 
 #ifndef SIMULATOR
-#if defined(HAVE_MMC) || defined(HAVE_ATA_SD)
-#if defined(HAVE_MMC)
+#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #define CARDTYPE "MMC"
 #else
 #define CARDTYPE "microSD"
@@ -1812,7 +1812,7 @@
         {
             simplelist_addline(SIMPLELIST_ADD_LINE, "Not Found!");
         }
-#ifndef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_SD)
         else /* card->initialized < 0 */
         {
             simplelist_addline(SIMPLELIST_ADD_LINE, "Init Error! (%d)", card->initialized);
@@ -1826,7 +1826,7 @@
     }
     return btn;
 }
-#else /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */
+#else /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */
 static int disk_callback(int btn, struct gui_synclist *lists)
 {
     (void)lists;
@@ -1960,13 +1960,13 @@
     }
     return false;
 }
-#endif /* !defined(HAVE_MMC) && !defined(HAVE_ATA_SD) */
+#endif /* !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD) */
 
 static bool dbg_disk_info(void)
 {
     struct simplelist_info info;
     simplelist_info_init(&info, "Disk Info", 1, NULL);
-#if defined(HAVE_MMC) || defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
     char title[16];
     int card = 0;
     info.callback_data = (void*)&card;
@@ -2146,7 +2146,7 @@
 
     return false;
 }
-#elif defined(CPU_PP) && !defined(HAVE_ATA_SD)
+#elif defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD)
 static bool dbg_save_roms(void)
 {
     int fd;
@@ -2467,7 +2467,7 @@
 };
 static const struct the_menu_item menuitems[] = {
 #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || \
-    (defined(CPU_PP) && !defined(HAVE_ATA_SD))
+    (defined(CPU_PP) && !(CONFIG_STORAGE & STORAGE_SD))
         { "Dump ROM contents", dbg_save_roms },
 #endif
 #if CONFIG_CPU == SH7034 || defined(CPU_COLDFIRE) || defined(CPU_PP) \
@@ -2504,7 +2504,7 @@
 #endif
 #ifndef SIMULATOR
         { "View disk info", dbg_disk_info },
-#if !defined(HAVE_MMC) && !defined(HAVE_ATA_SD)
+#if !(CONFIG_STORAGE & STORAGE_MMC) && !(CONFIG_STORAGE & STORAGE_SD)
         { "Dump ATA identify info", dbg_identify_info},
 #endif
 #endif

Modified: trunk/apps/main.c
===================================================================
--- trunk/apps/main.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/main.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -89,7 +89,7 @@
 #if CONFIG_TUNER
 #include "radio.h"
 #endif
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #include "ata_mmc.h"
 #endif
 
@@ -377,7 +377,7 @@
 #ifdef DEBUG
     debug_init();
 #else
-#if !defined(HAVE_FMADC) && !defined(HAVE_MMC)
+#if !defined(HAVE_FMADC) && !(CONFIG_STORAGE & STORAGE_MMC)
     serial_setup();
 #endif
 #endif
@@ -456,7 +456,7 @@
 #endif
         /* enter USB mode early, before trying to mount */
         if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED)
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
             if (!mmc_touched() ||
                 (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED))
 #endif

Modified: trunk/apps/misc.c
===================================================================
--- trunk/apps/misc.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/misc.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -61,7 +61,7 @@
 #include "playlist.h"
 #include "yesno.h"
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #include "ata_mmc.h"
 #endif
 #include "tree.h"
@@ -910,7 +910,7 @@
         case SYS_USB_CONNECTED:
             if (callback != NULL)
                 callback(parameter);
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
             if (!mmc_touched() ||
                 (mmc_remove_request() == SYS_HOTSWAP_EXTRACTED))
 #endif

Modified: trunk/apps/mpeg.c
===================================================================
--- trunk/apps/mpeg.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/mpeg.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1603,7 +1603,8 @@
                 /* Don't read more than until the end of the buffer */
                 amount_to_read = MIN(audiobuflen - audiobuf_write,
                                      amount_to_read);
-#ifdef HAVE_MMC /* MMC is slow, so don't read too large chunks */
+#if (CONFIG_STORAGE & STORAGE_MMC)
+    /* MMC is slow, so don't read too large chunks */
                 amount_to_read = MIN(0x40000, amount_to_read);
 #elif MEM == 8
                 amount_to_read = MIN(0x100000, amount_to_read);
@@ -1912,7 +1913,8 @@
 
                     amount_to_save = MIN(amount_to_save,
                                          audiobuflen - audiobuf_read);
-#ifdef HAVE_MMC /* MMC is slow, so don't save too large chunks at once */
+#if (CONFIG_STORAGE & STORAGE_MMC)
+    /* MMC is slow, so don't save too large chunks at once */
                     amount_to_save = MIN(0x40000, amount_to_save);
 #elif MEM == 8
                     amount_to_save = MIN(0x100000, amount_to_save);

Modified: trunk/apps/mpeg.h
===================================================================
--- trunk/apps/mpeg.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/mpeg.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -32,7 +32,7 @@
 #define MPEG_RECORDING_LOW_WATER        0x80000
 #define MPEG_LOW_WATER_CHUNKSIZE        0x40000
 #define MPEG_LOW_WATER_SWAP_CHUNKSIZE   0x10000
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #define MPEG_PLAY_PENDING_THRESHOLD     0x20000
 #define MPEG_PLAY_PENDING_SWAPSIZE      0x20000
 #else

Modified: trunk/apps/plugins/SOURCES
===================================================================
--- trunk/apps/plugins/SOURCES	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/SOURCES	2008-10-31 21:25:04 UTC (rev 18950)
@@ -120,7 +120,8 @@
 mp3_encoder.c
 wav2wv.c
 #else                              /* hardware codec platforms */
-#ifndef HAVE_MMC                   /* not for Ondio, has no remote control pin */
+#if !defined(ARCHOS_ONDIOSP) && !defined(ARCHOS_ONDIOFM)
+    /* not for Ondio, has no remote control pin */
 alpine_cdc.c
 #endif
 splitedit.c

Modified: trunk/apps/plugins/alpine_cdc.c
===================================================================
--- trunk/apps/plugins/alpine_cdc.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/alpine_cdc.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -34,7 +34,7 @@
 #include "plugin.h"
 
 /* Only build for (correct) target */
-#if CONFIG_CPU==SH7034 && !defined(HAVE_MMC)
+#if CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC)
 
 PLUGIN_HEADER
 
@@ -1199,4 +1199,4 @@
     return (main(parameter)==0) ? PLUGIN_OK : PLUGIN_ERROR;
 }
 
-#endif /* CONFIG_CPU==SH7034 && !defined(HAVE_MMC) */
+#endif /* CONFIG_CPU==SH7034 && !(CONFIG_STORAGE & STORAGE_MMC) */

Modified: trunk/apps/plugins/splitedit.c
===================================================================
--- trunk/apps/plugins/splitedit.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/splitedit.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1044,7 +1044,7 @@
                     case LOOP_MODE_TO:
                         rb->audio_pause();
                         rb->audio_ff_rewind(range_start);
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 /* MMC is slow - wait some time to allow track reload to finish */
                         rb->sleep(HZ/20);
                         if (mp3->elapsed > play_end) /* reload in progress */
@@ -1056,7 +1056,7 @@
                     case LOOP_MODE_FROM:
                         rb->audio_pause();
                         rb->audio_ff_rewind(xpos_to_time(split_x));
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 /* MMC is slow - wait some time to allow track reload to finish */
                         rb->sleep(HZ/20);
                         if (mp3->elapsed > play_end) /* reload in progress */

Modified: trunk/apps/plugins/test_disk.c
===================================================================
--- trunk/apps/plugins/test_disk.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/test_disk.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -29,7 +29,7 @@
 #define TEST_FILE   TESTBASEDIR "/test_disk.tmp"
 #define FRND_SEED   0x78C3     /* arbirary */
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #define TEST_SIZE (20*1024*1024)
 #else
 #define TEST_SIZE (300*1024*1024)

Modified: trunk/apps/plugins/wavplay.c
===================================================================
--- trunk/apps/plugins/wavplay.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/wavplay.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -3574,7 +3574,7 @@
     while (!(SSR0 & SCI_TEND)); /* wait for end of transfer */
     BRR0 = 0;                   /* maximum speed, ~3 MBit/s */
 
-#ifndef HAVE_MMC
+#if !(CONFIG_STORAGE & STORAGE_MMC)
     low_water =   5 /* seconds */
                 * 2 /* bytes per sample */
                 * channels 
@@ -3603,7 +3603,7 @@
             else
             {
                 wanted = MIN(free_space, aud_size - aud_write);
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
                 wanted = MIN(wanted, 256*1024);
 #elif MEM == 8
                 wanted = MIN(wanted, 1024*1024);

Modified: trunk/apps/plugins/wavrecord.c
===================================================================
--- trunk/apps/plugins/wavrecord.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/plugins/wavrecord.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -3587,7 +3587,7 @@
             if (to_save > aud_size)
             {
                 rec_tick_enable(false);
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
                 rb->splash(HZ, "Data overrun (slow MMC)");
 #else
                 rb->splash(HZ, "Data overrun");
@@ -3597,7 +3597,7 @@
                 break;
             }
             write_now = MIN(to_save, aud_size - aud_read);
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
             write_now = MIN(write_now, 256*1024);
 #else
             write_now = MIN(write_now, 1024*1024);
@@ -3802,7 +3802,7 @@
     return rc;
 
 #if 0
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
     return record_file("/<MMC1>/test.wav");
 #else
     return record_file("/test.wav");

Modified: trunk/apps/screens.c
===================================================================
--- trunk/apps/screens.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/screens.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -68,7 +68,7 @@
 #include <bitmaps/remote_usblogo.h>
 #endif
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #include "ata_mmc.h"
 #endif
 #if CONFIG_CODEC == SWCODEC
@@ -145,9 +145,9 @@
     usb_acknowledge(SYS_USB_CONNECTED_ACK);
     while(usb_wait_for_disconnect_w_tmo(&button_queue, HZ)) {
         if(usb_inserted()) {
-#ifdef HAVE_MMC /* USB-MMC bridge can report activity */
+#if (CONFIG_STORAGE & STORAGE_MMC) /* USB-MMC bridge can report activity */
             led(mmc_usb_active(HZ));
-#endif /* HAVE_MMC */
+#endif /* STORAGE_MMC */
             gui_syncstatusbar_draw(&statusbars, false);
         }
     }
@@ -161,7 +161,7 @@
 #endif /* USB_NONE */
 }
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 int mmc_remove_request(void)
 {
     struct queue_event ev;

Modified: trunk/apps/screens.h
===================================================================
--- trunk/apps/screens.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/screens.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -34,7 +34,7 @@
 void charging_splash(void);
 #endif
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 int mmc_remove_request(void);
 #endif
 

Modified: trunk/apps/talk.c
===================================================================
--- trunk/apps/talk.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/apps/talk.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -187,7 +187,7 @@
         return NULL;
     clipbuf = (unsigned char *) p_voicefile + p_voicefile->index[id].offset;
 
-#ifdef HAVE_MMC /* dynamic loading, on demand */
+#if (CONFIG_STORAGE & STORAGE_MMC) /* dynamic loading, on demand */
     if (!(clipsize & LOADED_MASK))
     {   /* clip used for the first time, needs loading */
         lseek(filehandle, p_voicefile->index[id].offset, SEEK_SET);
@@ -225,7 +225,7 @@
     if (file_size > audiobufend - audiobuf) /* won't fit? */
         goto load_err;
 
-#ifdef HAVE_MMC /* load only the header for now */
+#if (CONFIG_STORAGE & STORAGE_MMC) /* load only the header for now */
     load_size = offsetof(struct voicefile, index);
 #else /* load the full file */
     load_size = file_size; 
@@ -266,7 +266,7 @@
         structec_convert(&p_voicefile->index[i], "ll", 1, true);
 #endif
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
     /* load the index table, now that we know its size from the header */
     load_size = (p_voicefile->id1_max + p_voicefile->id2_max)
                 * sizeof(struct clip_entry);
@@ -520,7 +520,7 @@
         return;
     }
 
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
     if (filehandle >= 0) /* MMC: An old voice file might still be open */
     {
         close(filehandle);
@@ -577,7 +577,7 @@
 #if CONFIG_CODEC != SWCODEC
     mp3_play_stop();
 #endif
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
     if (filehandle >= 0) /* only relevant for MMC */
     {
         close(filehandle);

Modified: trunk/bootloader/main-pp.c
===================================================================
--- trunk/bootloader/main-pp.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/bootloader/main-pp.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -80,7 +80,7 @@
 char version[] = APPSVERSION;
         
 /* Locations and sizes in hidden partition on Sansa */
-#if defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_SD)
 #define PPMI_SECTOR_OFFSET  1024
 #define PPMI_SECTORS        1
 #define MI4_HEADER_SECTORS  1
@@ -361,7 +361,7 @@
     return EOK;
 }
 
-#if defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_SD)
 /* Load mi4 firmware from a hidden disk partition */
 int load_mi4_part(unsigned char* buf, struct partinfo* pinfo,
                   unsigned int buffer_size, bool disable_rebuild)
@@ -506,7 +506,7 @@
     printf(MODEL_NAME);
 
     i=ata_init();
-#if !defined(HAVE_ATA_SD)
+#if !(CONFIG_STORAGE & STORAGE_SD)
     if (i==0) {
         identify_info=ata_get_identify();
         /* Show model */
@@ -550,7 +550,7 @@
         */
         printf("Loading original firmware...");
 
-#if defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_SD)
         /* First try a (hidden) firmware partition */
         printf("Trying firmware partition");
         pinfo = disk_partinfo(1);

Modified: trunk/firmware/SOURCES
===================================================================
--- trunk/firmware/SOURCES	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/SOURCES	2008-10-31 21:25:04 UTC (rev 18950)
@@ -109,15 +109,17 @@
 
 /* Storage */
 #ifndef SIMULATOR
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 drivers/ata_mmc.c
-#elif defined(HAVE_FLASH_DISK)
+#elif (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND & NAND_IFP7XX)
 drivers/ata_flash.c
-#elif defined(HAVE_ATA)
+#elif (CONFIG_STORAGE & STORAGE_NAND) && (CONFIG_NAND & NAND_TCC)
+target/arm/ata-nand-telechips.c
+#elif (CONFIG_STORAGE & STORAGE_ATA)
 drivers/ata.c
-#endif /* HAVE_MMC */
+#endif /* CONFIG_STORAGE */
 drivers/fat.c
-#if defined(HAVE_MMC) || defined(HAVE_ATA_SD)
+#if (CONFIG_STORAGE & STORAGE_MMC) || (CONFIG_STORAGE & STORAGE_SD)
 hotswap.c
 #endif
 #endif /* SIMULATOR */
@@ -981,7 +983,6 @@
 #ifdef LOGIK_DAX
 #ifndef SIMULATOR
 drivers/nand_id.c
-target/arm/ata-nand-telechips.c
 target/arm/lcd-ssd1815.c
 target/arm/tcc77x/adc-tcc77x.c
 target/arm/tcc77x/kernel-tcc77x.c
@@ -1004,7 +1005,6 @@
 #ifndef SIMULATOR
 drivers/nand_id.c
 target/arm/lcd-ssd1815.c
-target/arm/ata-nand-telechips.c
 target/arm/tcc77x/adc-tcc77x.c
 target/arm/tcc77x/kernel-tcc77x.c
 target/arm/tcc77x/powermgmt-tcc77x.c
@@ -1025,7 +1025,6 @@
 #ifdef SANSA_C100
 #ifndef SIMULATOR
 drivers/nand_id.c
-target/arm/ata-nand-telechips.c
 target/arm/tcc77x/adc-tcc77x.c
 target/arm/tcc77x/kernel-tcc77x.c
 target/arm/tcc77x/c100/lcd-S6B33B2.c
@@ -1071,7 +1070,6 @@
 #ifndef SIMULATOR
 drivers/nand_id.c
 drivers/pcf50606.c
-target/arm/ata-nand-telechips.c
 target/arm/tcc77x/system-tcc77x.c
 target/arm/tcc77x/kernel-tcc77x.c
 target/arm/tcc77x/timer-tcc77x.c
@@ -1096,7 +1094,6 @@
 drivers/nand_id.c
 drivers/pcf50606.c
 target/arm/lcd-as-memframe.S
-target/arm/ata-nand-telechips.c
 target/arm/tcc780x/adc-tcc780x.c
 target/arm/tcc780x/system-tcc780x.c
 target/arm/tcc780x/cowond2/button-cowond2.c

Modified: trunk/firmware/drivers/fat.c
===================================================================
--- trunk/firmware/drivers/fat.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/drivers/fat.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -204,7 +204,7 @@
 static struct fat_cache_entry fat_cache[FAT_CACHE_SIZE];
 static struct mutex cache_mutex SHAREDBSS_ATTR;
 
-#if defined(HAVE_HOTSWAP) && !defined(HAVE_MMC) /* A better condition ?? */
+#if defined(HAVE_HOTSWAP) && !(CONFIG_STORAGE & STORAGE_MMC) /* A better condition ?? */
 void fat_lock(void)
 {
     mutex_lock(&cache_mutex);

Modified: trunk/firmware/drivers/serial.c
===================================================================
--- trunk/firmware/drivers/serial.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/drivers/serial.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -39,7 +39,7 @@
 /* iFP7xx has no remote */
 
 #if !defined(HAVE_FMADC) /* Recorder FM/V2 has no remote control pin */ \
- && !defined(HAVE_MMC)   /* MMC takes serial port 1, so don't mess with it */
+ && !(CONFIG_STORAGE & STORAGE_MMC)   /* MMC takes serial port 1, so don't mess with it */
 
 /* Received byte identifiers */
 #define PLAY  0xC1
@@ -146,7 +146,7 @@
     return ret;
 }
 
-#endif /* !HAVE_FMADC && !HAVE_MMC */
+#endif /* !HAVE_FMADC && !STORAGE_MMC */
 #elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL)
 
 void serial_tx(const unsigned char *buf)

Modified: trunk/firmware/export/ata_idle_notify.h
===================================================================
--- trunk/firmware/export/ata_idle_notify.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/ata_idle_notify.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -44,7 +44,8 @@
 };
 
 #define USING_ATA_CALLBACK  !defined(SIMULATOR)             \
-                            && !defined(HAVE_FLASH_DISK)    \
+                            && ! ((CONFIG_STORAGE & STORAGE_NAND) \
+                               && (CONFIG_NAND & NAND_IFP7XX)) \
                             && !defined(BOOTLOADER)
 
 typedef bool (*ata_idle_notify)(void);

Modified: trunk/firmware/export/config-c100.h
===================================================================
--- trunk/firmware/export/config-c100.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-c100.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -120,4 +120,8 @@
 #define BOOTFILE "rockbox." BOOTFILE_EXT
 #define BOOTDIR "/"
 
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
 #endif /* SIMULATOR */

Modified: trunk/firmware/export/config-c200.h
===================================================================
--- trunk/firmware/export/config-c200.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-c200.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -115,7 +115,7 @@
 #define HAVE_FLASH_STORAGE
 
 /* define this if the flash memory uses the SecureDigital Memory Card protocol */
-#define HAVE_ATA_SD
+#define CONFIG_STORAGE STORAGE_SD
 
 #define BATTERY_CAPACITY_DEFAULT 530    /* default battery capacity */
 #define BATTERY_CAPACITY_MIN 530        /* min. capacity selectable */

Modified: trunk/firmware/export/config-clip.h
===================================================================
--- trunk/firmware/export/config-clip.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-clip.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -95,7 +95,7 @@
 #define HAVE_FLASH_STORAGE
 
 /* define this if the flash memory uses the SecureDigital Memory Card protocol */
-#define HAVE_ATA_SD
+#define CONFIG_STORAGE STORAGE_SD
 
 #define BATTERY_CAPACITY_DEFAULT 750    /* default battery capacity */
 #define BATTERY_CAPACITY_MIN 750        /* min. capacity selectable */

Modified: trunk/firmware/export/config-cowond2.h
===================================================================
--- trunk/firmware/export/config-cowond2.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-cowond2.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -145,4 +145,8 @@
 #define BOOTFILE "rockbox." BOOTFILE_EXT
 #define BOOTDIR "/.rockbox"
 
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
 #endif /* SIMULATOR */

Modified: trunk/firmware/export/config-creativezv.h
===================================================================
--- trunk/firmware/export/config-creativezv.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-creativezv.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -37,7 +37,7 @@
 #define MODEL_NUMBER 28
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-creativezvm.h
===================================================================
--- trunk/firmware/export/config-creativezvm.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-creativezvm.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -37,7 +37,7 @@
 #define MODEL_NUMBER 26
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-creativezvm60gb.h
===================================================================
--- trunk/firmware/export/config-creativezvm60gb.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-creativezvm60gb.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -37,7 +37,7 @@
 #define MODEL_NUMBER 27
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-e200.h
===================================================================
--- trunk/firmware/export/config-e200.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-e200.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -112,7 +112,7 @@
 #define HAVE_FLASH_STORAGE
 
 /* define this if the flash memory uses the SecureDigital Memory Card protocol */
-#define HAVE_ATA_SD
+#define CONFIG_STORAGE STORAGE_SD
 
 #define BATTERY_CAPACITY_DEFAULT 750    /* default battery capacity */
 #define BATTERY_CAPACITY_MIN 750        /* min. capacity selectable */

Modified: trunk/firmware/export/config-e200v2.h
===================================================================
--- trunk/firmware/export/config-e200v2.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-e200v2.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -115,7 +115,7 @@
 #define HAVE_FLASH_STORAGE
 
 /* define this if the flash memory uses the SecureDigital Memory Card protocol */
-#define HAVE_ATA_SD
+#define CONFIG_STORAGE STORAGE_SD
 
 #define BATTERY_CAPACITY_DEFAULT 750    /* default battery capacity */
 #define BATTERY_CAPACITY_MIN 750        /* min. capacity selectable */

Modified: trunk/firmware/export/config-fmrecorder.h
===================================================================
--- trunk/firmware/export/config-fmrecorder.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-fmrecorder.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1,5 +1,5 @@
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 #define MODEL_NAME "Archos FM Recorder"
 

Modified: trunk/firmware/export/config-gigabeat-s.h
===================================================================
--- trunk/firmware/export/config-gigabeat-s.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-gigabeat-s.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -13,7 +13,7 @@
 #define MODEL_NUMBER 21
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-gigabeat.h
===================================================================
--- trunk/firmware/export/config-gigabeat.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-gigabeat.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 18
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-h10.h
===================================================================
--- trunk/firmware/export/config-h10.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-h10.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "iriver H10 20GB"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-h100.h
===================================================================
--- trunk/firmware/export/config-h100.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-h100.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -15,7 +15,7 @@
 #define MODEL_NUMBER 1
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-h10_5gb.h
===================================================================
--- trunk/firmware/export/config-h10_5gb.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-h10_5gb.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "iriver H10 5/6GB"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-h120.h
===================================================================
--- trunk/firmware/export/config-h120.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-h120.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -10,7 +10,7 @@
 #define MODEL_NUMBER 0
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-h300.h
===================================================================
--- trunk/firmware/export/config-h300.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-h300.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -10,7 +10,7 @@
 #define MODEL_NUMBER 2
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-hdd1630.h
===================================================================
--- trunk/firmware/export/config-hdd1630.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-hdd1630.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "Philips GoGear HDD1630"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 /* #define HAVE_RECORDING */

Modified: trunk/firmware/export/config-iaudio7.h
===================================================================
--- trunk/firmware/export/config-iaudio7.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-iaudio7.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -155,6 +155,10 @@
 #define BOOTFILE "rockbox." BOOTFILE_EXT
 #define BOOTDIR "/"
 
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
 #ifdef BOOTLOADER
 #define TCCBOOT
 #endif

Modified: trunk/firmware/export/config-iaudiom3.h
===================================================================
--- trunk/firmware/export/config-iaudiom3.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-iaudiom3.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "iAudio M3"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-iaudiom5.h
===================================================================
--- trunk/firmware/export/config-iaudiom5.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-iaudiom5.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "iAudio M5"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-iaudiox5.h
===================================================================
--- trunk/firmware/export/config-iaudiox5.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-iaudiox5.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "iAudio X5"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-ifp7xx.h
===================================================================
--- trunk/firmware/export/config-ifp7xx.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ifp7xx.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -31,8 +31,10 @@
 
 #define CONFIG_KEYPAD IRIVER_IFP7XX_PAD
 
-#define CONFIG_FLASH FLASH_IFP7XX
+#define CONFIG_STORAGE STORAGE_NAND
 
+#define CONFIG_NAND NAND_IFP7XX
+
 #define HAVE_FAT16SUPPORT
 
 /* Define this if you do software codec */
@@ -50,8 +52,6 @@
 /* Define this if you have the WM8975 audio codec */
 /* #define HAVE_WM8975 */
 
-#define HAVE_FLASH_DISK
-
 /* Virtual LED (icon) */
 #define CONFIG_LED LED_VIRTUAL
 

Modified: trunk/firmware/export/config-ipod1g2g.h
===================================================================
--- trunk/firmware/export/config-ipod1g2g.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipod1g2g.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 19
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility
 #define HAVE_RECORDING */

Modified: trunk/firmware/export/config-ipod3g.h
===================================================================
--- trunk/firmware/export/config-ipod3g.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipod3g.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -12,7 +12,7 @@
 #define MODEL_NUMBER 7
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 /*#define HAVE_RECORDING*/

Modified: trunk/firmware/export/config-ipod4g.h
===================================================================
--- trunk/firmware/export/config-ipod4g.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipod4g.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 8
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-ipodcolor.h
===================================================================
--- trunk/firmware/export/config-ipodcolor.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipodcolor.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 3
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-ipodmini.h
===================================================================
--- trunk/firmware/export/config-ipodmini.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipodmini.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 9
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 /*#define HAVE_RECORDING*/

Modified: trunk/firmware/export/config-ipodmini2g.h
===================================================================
--- trunk/firmware/export/config-ipodmini2g.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipodmini2g.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 11
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 /*#define HAVE_RECORDING*/

Modified: trunk/firmware/export/config-ipodnano.h
===================================================================
--- trunk/firmware/export/config-ipodnano.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipodnano.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 4
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-ipodvideo.h
===================================================================
--- trunk/firmware/export/config-ipodvideo.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ipodvideo.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -11,7 +11,7 @@
 #define MODEL_NUMBER 5
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 #define HAVE_RECORDING

Modified: trunk/firmware/export/config-logikdax.h
===================================================================
--- trunk/firmware/export/config-logikdax.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-logikdax.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -139,4 +139,8 @@
 #define ICODE_ATTR_ALAC
 #define IBSS_ATTR_SHORTEN_DECODED0
 
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
 #endif /* SIMULATOR */

Modified: trunk/firmware/export/config-m200.h
===================================================================
--- trunk/firmware/export/config-m200.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-m200.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -124,4 +124,8 @@
 #define ICODE_ATTR_ALAC
 #define IBSS_ATTR_SHORTEN_DECODED0
 
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
 #endif /* SIMULATOR */

Modified: trunk/firmware/export/config-mrobe100.h
===================================================================
--- trunk/firmware/export/config-mrobe100.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-mrobe100.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -9,7 +9,7 @@
 #define MODEL_NAME   "Olympus m:robe MR-100"
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-mrobe500.h
===================================================================
--- trunk/firmware/export/config-mrobe500.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-mrobe500.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -33,7 +33,7 @@
 #define MODEL_NUMBER 22
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-ondavx747.h
===================================================================
--- trunk/firmware/export/config-ondavx747.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ondavx747.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -34,7 +34,7 @@
 #define MODEL_NUMBER 35
 
 /* define this if you use an ATA controller */
-//#define HAVE_ATA
+//#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-ondavx767.h
===================================================================
--- trunk/firmware/export/config-ondavx767.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ondavx767.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -34,7 +34,7 @@
 #define MODEL_NUMBER 36
 
 /* define this if you use an ATA controller */
-//#define HAVE_ATA
+//#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have a bitmap LCD display */
 #define HAVE_LCD_BITMAP

Modified: trunk/firmware/export/config-ondiofm.h
===================================================================
--- trunk/firmware/export/config-ondiofm.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ondiofm.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -106,7 +106,7 @@
 #define HAVE_ONDIO_ADC
 
 /* Define this for MMC support instead of ATA harddisk */
-#define HAVE_MMC
+#define CONFIG_STORAGE STORAGE_MMC
 
 /* Define this to support mounting FAT16 partitions */
 #define HAVE_FAT16SUPPORT

Modified: trunk/firmware/export/config-ondiosp.h
===================================================================
--- trunk/firmware/export/config-ondiosp.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-ondiosp.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -89,7 +89,7 @@
 #define HAVE_ONDIO_ADC
 
 /* Define this for MMC support instead of ATA harddisk */
-#define HAVE_MMC
+#define CONFIG_STORAGE STORAGE_MMC
 
 /* Define this to support mounting FAT16 partitions */
 #define HAVE_FAT16SUPPORT

Modified: trunk/firmware/export/config-player.h
===================================================================
--- trunk/firmware/export/config-player.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-player.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1,5 +1,5 @@
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 #define MODEL_NAME   "Archos Player/Studio"
 

Modified: trunk/firmware/export/config-recorder.h
===================================================================
--- trunk/firmware/export/config-recorder.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-recorder.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1,5 +1,5 @@
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 #define MODEL_NAME  "Archos Recorder"
 

Modified: trunk/firmware/export/config-recorderv2.h
===================================================================
--- trunk/firmware/export/config-recorderv2.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-recorderv2.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -1,5 +1,5 @@
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 #define MODEL_NAME   "Archos Recorder v2"
 

Modified: trunk/firmware/export/config-sa9200.h
===================================================================
--- trunk/firmware/export/config-sa9200.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-sa9200.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -94,7 +94,7 @@
 #define HAVE_FLASH_STORAGE
 
 /* define this if the flash memory uses the SecureDigital Memory Card protocol */
-#define HAVE_ATA_SD
+#define CONFIG_STORAGE STORAGE_SD
 
 #define BATTERY_CAPACITY_DEFAULT 750    /* default battery capacity */
 #define BATTERY_CAPACITY_MIN 750        /* min. capacity selectable */

Modified: trunk/firmware/export/config-tpj1022.h
===================================================================
--- trunk/firmware/export/config-tpj1022.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config-tpj1022.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -10,7 +10,7 @@
 #define MODEL_NUMBER 15
 
 /* define this if you use an ATA controller */
-#define HAVE_ATA
+#define CONFIG_STORAGE STORAGE_ATA
 
 /* define this if you have recording possibility */
 /*#define HAVE_RECORDING*/ /* TODO: add support for this */

Modified: trunk/firmware/export/config.h
===================================================================
--- trunk/firmware/export/config.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/config.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -28,6 +28,12 @@
 
 /* symbolic names for multiple choice configurations: */
 
+/* CONFIG_STORAGE (note these are combineable bit-flags) */
+#define STORAGE_ATA  0x01
+#define STORAGE_MMC  0x02
+#define STORAGE_SD   0x04
+#define STORAGE_NAND 0x08
+
 /* CONFIG_TUNER (note these are combineable bit-flags) */
 #define S1A0903X01 0x01 /* Samsung */
 #define TEA5767    0x02 /* Philips */
@@ -180,8 +186,9 @@
 #define LED_VIRTUAL  2 /* Virtual LED (icon) (Archos Ondio) */
 /* else                   HW controlled LED (iRiver H1x0) */
 
-/* CONFIG_FLASH */
-#define FLASH_IFP7XX 1
+/* CONFIG_NAND */
+#define NAND_IFP7XX 1
+#define NAND_TCC    2
 
 /* CONFIG_RTC */
 #define RTC_M41ST84W 1 /* Archos Recorder */

Modified: trunk/firmware/export/hotswap.h
===================================================================
--- trunk/firmware/export/hotswap.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/hotswap.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -41,14 +41,14 @@
     unsigned int blocksize;       /* block size in bytes */
 } tCardInfo;
 
-#ifdef HAVE_ATA_SD
+#if (CONFIG_STORAGE & STORAGE_SD)
 #include "ata-sd-target.h"
 #define card_detect            card_detect_target
 #define card_get_info          card_get_info_target
 #ifdef HAVE_HOTSWAP
 #define card_enable_monitoring card_enable_monitoring_target
 #endif
-#else /* HAVE_MMC */
+#else /* STORAGE_MMC */
 #include "ata_mmc.h"
 #define card_detect            mmc_detect
 #define card_get_info          mmc_card_info

Modified: trunk/firmware/export/powermgmt.h
===================================================================
--- trunk/firmware/export/powermgmt.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/export/powermgmt.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -142,7 +142,7 @@
 #define CURRENT_USB        500  /* usual current in mA in USB mode */
 #ifdef HAVE_REMOTE_LCD
 # define CURRENT_REMOTE      8  /* add. current when H100-remote connected */
-#endif /* HAVE_MMC */
+#endif /* HAVE_REMOTE_LCD */
 
 # define CURRENT_MIN_CHG    70  /* minimum charge current */
 # define MIN_CHG_V        8500  /* at 8.5v charger voltage get CURRENT_MIN_CHG */
@@ -152,7 +152,7 @@
 #  define CURRENT_MAX_CHG  350  /* maximum charging current */
 # endif
 # define MAX_CHG_V       10250  /* anything over 10.25v gives CURRENT_MAX_CHG */
-#endif /* not HAVE_MMC */
+#endif /* not ONDIO */
 
 extern unsigned short power_history[POWER_HISTORY_LEN];
 extern const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT];

Modified: trunk/firmware/hotswap.c
===================================================================
--- trunk/firmware/hotswap.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/hotswap.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -20,7 +20,7 @@
  ****************************************************************************/
 #include <stdbool.h>
 #include "config.h"
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #include "ata_mmc.h"
 #else
 #include "hotswap.h"

Modified: trunk/firmware/include/dir.h
===================================================================
--- trunk/firmware/include/dir.h	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/include/dir.h	2008-10-31 21:25:04 UTC (rev 18950)
@@ -28,10 +28,10 @@
 
 /* how to name volumes, first char must be outside of legal file names,
    a number gets appended to enumerate, if applicable */
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
 #define VOL_NAMES "<MMC%d>"
 #define VOL_ENUM_POS 4 /* position of %d, to avoid runtime calculation */
-#elif defined(HAVE_HOTSWAP)
+#elif (CONFIG_STORAGE & STORAGE_SD)
 #define VOL_NAMES "<microSD%d>"
 #define VOL_ENUM_POS 8 /* position of %d, to avoid runtime calculation */
 #else

Modified: trunk/firmware/powermgmt.c
===================================================================
--- trunk/firmware/powermgmt.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/powermgmt.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -492,7 +492,7 @@
 {
     int current;
 
-#if MEM == 8 && !defined(HAVE_MMC)
+#if MEM == 8 && !(defined(ARCHOS_ONDIOSP) || defined(ARCHOS_ONDIOFM))
     /* assuming 192 kbps, the running time is 22% longer with 8MB */
     current = (CURRENT_NORMAL*100/122);
 #else
@@ -1059,7 +1059,7 @@
     /* initialize the voltages for the exponential filter */
     avgbat = battery_adc_voltage() + 15;
 
-#ifndef HAVE_MMC  /* this adjustment is only needed for HD based */
+#ifdef HAVE_DISK_STORAGE /* this adjustment is only needed for HD based */
         /* The battery voltage is usually a little lower directly after
            turning on, because the disk was used heavily. Raise it by 5% */
 #ifdef HAVE_CHARGING
@@ -1067,7 +1067,7 @@
 #endif
         avgbat += (percent_to_volt_discharge[battery_type][6] -
                    percent_to_volt_discharge[battery_type][5]) / 2;
-#endif /* not HAVE_MMC */
+#endif /* HAVE_DISK_STORAGE */
 
     avgbat = avgbat * BATT_AVE_SAMPLES;
     battery_millivolts = avgbat / BATT_AVE_SAMPLES;

Modified: trunk/firmware/usb.c
===================================================================
--- trunk/firmware/usb.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/usb.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -71,7 +71,7 @@
 
 static int usb_state;
 
-#if defined(HAVE_MMC) && defined(USB_FULL_INIT)
+#if (CONFIG_STORAGE & STORAGE_MMC) && defined(USB_FULL_INIT)
 static int usb_mmc_countdown = 0;
 #endif
 
@@ -435,7 +435,7 @@
             }
         }
     }
-#ifdef HAVE_MMC
+#if (CONFIG_STORAGE & STORAGE_MMC)
     if(usb_mmc_countdown > 0)
     {
         usb_mmc_countdown--;

Modified: trunk/firmware/usbstack/usb_storage.c
===================================================================
--- trunk/firmware/usbstack/usb_storage.c	2008-10-31 20:06:08 UTC (rev 18949)
+++ trunk/firmware/usbstack/usb_storage.c	2008-10-31 21:25:04 UTC (rev 18950)
@@ -39,7 +39,7 @@
  * by not overlapping ata_write_sector() with USB transfers. This does reduce
  * write performance, so we only do it for the affected DAPs
  */
-#ifdef HAVE_ATA_SD
+#if (CONFIG_STORAGE & STORAGE_SD)
 #define SERIALIZE_WRITES
 #endif
 /* Enable the following define to export only the SD card slot. This
@@ -668,7 +668,7 @@
     block_size = SECTOR_SIZE;
     block_count = RAMDISK_SIZE;
 #else
-#if defined(HAVE_ATA_SD) || defined(HAVE_HOTSWAP)
+#if (CONFIG_STORAGE & STORAGE_SD) || defined(HAVE_HOTSWAP)
     tCardInfo* cinfo = card_get_info(lun);
     if(cinfo->initialized && cinfo->numblocks > 0) {
         block_size = cinfo->blocksize;

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic