summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-07-07 11:48:46 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-07-07 12:05:18 -0400
commit181fe7530a6b45568167a0d539f6806c62338165 (patch)
tree46fa7c1a02c2a924d6b9e95e9140fd57b5230e23
parentea80d1cc9cdaf1af5e1e5a42d878f3f231a3a65b (diff)
downloadrockbox-181fe7530a.tar.gz
rockbox-181fe7530a.zip
Fix most of the (extensive) red in ea80d1cc9ca
Change-Id: Ie494df80caa222423a52977031920d54bd058c3c
-rw-r--r--firmware/export/config.h33
-rw-r--r--firmware/export/config/ihifi760.h1
-rw-r--r--firmware/export/config/ihifi770.h6
-rw-r--r--firmware/export/config/ihifi770c.h6
-rw-r--r--firmware/export/config/ihifi800.h6
-rw-r--r--firmware/export/config/ihifi960.h1
-rw-r--r--firmware/export/config/rk27generic.h1
-rw-r--r--firmware/target/mips/ingenic_x1000/sd-x1000.c7
8 files changed, 35 insertions, 26 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index cad25facb0..c6bd74ba34 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -868,6 +868,18 @@ Lyre prototype 1 */
#define CONFIG_STORAGE_MULTI
#endif
+#if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
+#define HAVE_MULTIDRIVE
+#endif
+
+#if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
+#error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
+#endif
+
+#ifndef NUM_DRIVES
+#define NUM_DRIVES 1
+#endif
+
#if !defined(HAVE_MULTIVOLUME)
#if defined(HAVE_MULTIDRIVE)
/* Multidrive strongly implies multivolume */
@@ -886,13 +898,6 @@ Lyre prototype 1 */
#else
#define NUM_VOLUMES_PER_DRIVE 1
#endif
-#if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
-#define HAVE_MULTIDRIVE
-#endif
-
-#if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
-#error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
-#endif
/* note to remove multi-partition booting this could be changed to MULTIDRIVE */
#if defined(HAVE_BOOTDATA) && defined(BOOT_REDIR) && defined(HAVE_MULTIVOLUME)
@@ -905,10 +910,6 @@ Lyre prototype 1 */
# define MULTIBOOT_MIN_VOLUME 0
#endif
-#ifndef NUM_DRIVES
-#define NUM_DRIVES 1
-#endif
-
#define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE)
#if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
@@ -942,31 +943,35 @@ Lyre prototype 1 */
#ifdef HAVE_BOOTLOADER_USB_MODE
/* Priority in bootloader is wanted */
#define HAVE_PRIORITY_SCHEDULING
+
#if (CONFIG_CPU == S5L8702)
#define USB_DRIVER_CLOSE
#else
#define USB_STATUS_BY_EVENT
#define USB_DETECT_BY_REQUEST
#endif
+
#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
#define INCLUDE_TIMEOUT_API
#define USB_DRIVER_CLOSE
#endif
+
#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105
#define INCLUDE_TIMEOUT_API
#define USB_DRIVER_CLOSE
#endif
+
#if CONFIG_CPU == X1000
#define USB_DRIVER_CLOSE
#endif
-#endif
+
+#endif /* BOOTLOADER_USB_MODE */
#else /* !BOOTLOADER */
#define HAVE_EXTENDED_MESSAGING_AND_NAME
#define HAVE_WAKEUP_EXT_CB
-
#if defined(ASSEMBLER_THREADS) \
|| defined(HAVE_WIN32_FIBER_THREADS) \
|| defined(HAVE_SIGALTSTACK_THREADS)
@@ -1001,7 +1006,7 @@ Lyre prototype 1 */
#endif /* CONFIG_USB == */
#endif /* HAVE_USBSTACK */
-#endif /* BOOTLOADER */
+#endif /* !BOOTLOADER */
#if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) \
|| (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \
diff --git a/firmware/export/config/ihifi760.h b/firmware/export/config/ihifi760.h
index b4a1e6ade0..5ba19a55c3 100644
--- a/firmware/export/config/ihifi760.h
+++ b/firmware/export/config/ihifi760.h
@@ -49,6 +49,7 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
diff --git a/firmware/export/config/ihifi770.h b/firmware/export/config/ihifi770.h
index 82a9b1b1eb..68f6c71b90 100644
--- a/firmware/export/config/ihifi770.h
+++ b/firmware/export/config/ihifi770.h
@@ -50,11 +50,12 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
-#define HAVE_HOTSWAP
+// #define HAVE_HOTSWAP
#define SECTOR_SIZE 512
@@ -182,7 +183,4 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-/* disabled for now */
-#undef HAVE_HOTSWAP
-
#endif /* SIMULATOR */
diff --git a/firmware/export/config/ihifi770c.h b/firmware/export/config/ihifi770c.h
index 1e945610bc..a34d1b85c2 100644
--- a/firmware/export/config/ihifi770c.h
+++ b/firmware/export/config/ihifi770c.h
@@ -50,11 +50,12 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
-#define HAVE_HOTSWAP
+// #define HAVE_HOTSWAP
#define SECTOR_SIZE 512
@@ -182,7 +183,4 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-/* disabled for now */
-#undef HAVE_HOTSWAP
-
#endif /* SIMULATOR */
diff --git a/firmware/export/config/ihifi800.h b/firmware/export/config/ihifi800.h
index 9c1614c30c..e0cd1e1161 100644
--- a/firmware/export/config/ihifi800.h
+++ b/firmware/export/config/ihifi800.h
@@ -50,11 +50,12 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
-#define HAVE_HOTSWAP
+//#define HAVE_HOTSWAP
#define SECTOR_SIZE 512
@@ -183,7 +184,4 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-/* disabled for now */
-#undef HAVE_HOTSWAP
-
#endif /* SIMULATOR */
diff --git a/firmware/export/config/ihifi960.h b/firmware/export/config/ihifi960.h
index f8bd46d1ea..c0af676f28 100644
--- a/firmware/export/config/ihifi960.h
+++ b/firmware/export/config/ihifi960.h
@@ -49,6 +49,7 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h
index 5a18f7a35e..23768c1d2e 100644
--- a/firmware/export/config/rk27generic.h
+++ b/firmware/export/config/rk27generic.h
@@ -56,6 +56,7 @@
#define HAVE_FLASH_STORAGE
#define CONFIG_STORAGE (STORAGE_SD | STORAGE_NAND)
+#define NUM_DRIVES 1 /* NAND doesn't work yet */
#define CONFIG_NAND NAND_RK27XX
#define HAVE_SW_TONE_CONTROLS
diff --git a/firmware/target/mips/ingenic_x1000/sd-x1000.c b/firmware/target/mips/ingenic_x1000/sd-x1000.c
index 679a25a222..4312937ee8 100644
--- a/firmware/target/mips/ingenic_x1000/sd-x1000.c
+++ b/firmware/target/mips/ingenic_x1000/sd-x1000.c
@@ -187,6 +187,9 @@ long sd_last_disk_activity(void)
bool sd_present(IF_MD_NONVOID(int drive))
{
+#ifndef HAVE_MULTIDRIVE
+ int drive = 0;
+#endif
/* Seems that volume_properties() in firmware/common/disk.c may pass
* drive = -1 when the SD card is not inserted, so just return false.
*/
@@ -198,6 +201,10 @@ bool sd_present(IF_MD_NONVOID(int drive))
bool sd_removable(IF_MD_NONVOID(int drive))
{
+#ifndef HAVE_MULTIDRIVE
+ int drive = 0;
+#endif
+
/* Same reason as sd_present() */
if(drive < 0)
return false;