summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:49:38 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-11-01 16:49:38 +0000
commit526304e1cec3fd532c9712b330b2ee469586cf13 (patch)
treec976faad54edabf0677573b33bccc022e8591b6f /firmware
parentad9db4de3dee9db8f08b5a28f731b066c35e41e6 (diff)
downloadrockbox-526304e1cec3fd532c9712b330b2ee469586cf13.tar.gz
rockbox-526304e1cec3fd532c9712b330b2ee469586cf13.zip
fix reds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18962 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config-c100.h8
-rw-r--r--firmware/export/config-cowond2.h7
-rw-r--r--firmware/export/config-iaudio7.h8
-rw-r--r--firmware/export/config-logikdax.h8
-rw-r--r--firmware/export/config-m200.h8
-rw-r--r--firmware/export/storage.h10
6 files changed, 30 insertions, 19 deletions
diff --git a/firmware/export/config-c100.h b/firmware/export/config-c100.h
index 9a2664202a..cedc7c3aed 100644
--- a/firmware/export/config-c100.h
+++ b/firmware/export/config-c100.h
@@ -39,6 +39,10 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
@@ -120,8 +124,4 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/"
-#define CONFIG_STORAGE STORAGE_NAND
-
-#define CONFIG_NAND NAND_TCC
-
#endif /* SIMULATOR */
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h
index 749eb0b882..18a80f2791 100644
--- a/firmware/export/config-cowond2.h
+++ b/firmware/export/config-cowond2.h
@@ -48,6 +48,10 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
/* Some (2Gb?) D2s seem to be FAT16 formatted */
#define HAVE_FAT16SUPPORT
@@ -145,8 +149,5 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-#define CONFIG_STORAGE STORAGE_NAND
-
-#define CONFIG_NAND NAND_TCC
#endif /* SIMULATOR */
diff --git a/firmware/export/config-iaudio7.h b/firmware/export/config-iaudio7.h
index ca6212d305..a5dd30d568 100644
--- a/firmware/export/config-iaudio7.h
+++ b/firmware/export/config-iaudio7.h
@@ -69,6 +69,10 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
/* LCD dimensions */
#define LCD_WIDTH 160
#define LCD_HEIGHT 128
@@ -155,10 +159,6 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/"
-#define CONFIG_STORAGE STORAGE_NAND
-
-#define CONFIG_NAND NAND_TCC
-
#ifdef BOOTLOADER
#define TCCBOOT
#endif
diff --git a/firmware/export/config-logikdax.h b/firmware/export/config-logikdax.h
index 160058ff7f..da5a9e2bae 100644
--- a/firmware/export/config-logikdax.h
+++ b/firmware/export/config-logikdax.h
@@ -45,6 +45,10 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
@@ -139,8 +143,4 @@
#define ICODE_ATTR_ALAC
#define IBSS_ATTR_SHORTEN_DECODED0
-#define CONFIG_STORAGE STORAGE_NAND
-
-#define CONFIG_NAND NAND_TCC
-
#endif /* SIMULATOR */
diff --git a/firmware/export/config-m200.h b/firmware/export/config-m200.h
index b3b71ee778..cab1c9927b 100644
--- a/firmware/export/config-m200.h
+++ b/firmware/export/config-m200.h
@@ -38,6 +38,10 @@
/* define this if you have a flash memory storage */
#define HAVE_FLASH_STORAGE
+#define CONFIG_STORAGE STORAGE_NAND
+
+#define CONFIG_NAND NAND_TCC
+
/* LCD dimensions */
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
@@ -124,8 +128,4 @@
#define ICODE_ATTR_ALAC
#define IBSS_ATTR_SHORTEN_DECODED0
-#define CONFIG_STORAGE STORAGE_NAND
-
-#define CONFIG_NAND NAND_TCC
-
#endif /* SIMULATOR */
diff --git a/firmware/export/storage.h b/firmware/export/storage.h
index 95e42f67f4..8a0219c523 100644
--- a/firmware/export/storage.h
+++ b/firmware/export/storage.h
@@ -102,6 +102,7 @@ static inline int storage_soft_reset(void)
}
static inline int storage_init(void)
{
+#ifndef SIMULATOR
#if (CONFIG_STORAGE & STORAGE_ATA)
return ata_init();
#elif (CONFIG_STORAGE & STORAGE_SD)
@@ -113,6 +114,15 @@ static inline int storage_init(void)
#else
#error No storage driver!
#endif
+#else
+ return 0;
+#endif
+}
+static inline void storage_close(void)
+{
+#if (CONFIG_STORAGE & STORAGE_ATA)
+ ata_close();
+#endif
}
static inline int storage_read_sectors(IF_MV2(int drive,) unsigned long start, int count, void* buf)
{