summaryrefslogtreecommitdiff
path: root/firmware/export/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r--firmware/export/config.h51
1 files changed, 35 insertions, 16 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 5ea5c71c70..ede1825f88 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -868,22 +868,41 @@ Lyre prototype 1 */
868#define CONFIG_STORAGE_MULTI 868#define CONFIG_STORAGE_MULTI
869#endif 869#endif
870 870
871/* Explicit HAVE_MULTIVOLUME in the config file. Allow the maximum number */
872#ifdef HAVE_MULTIVOLUME
873#define NUM_VOLUMES_PER_DRIVE 4
874#else
875#define NUM_VOLUMES_PER_DRIVE 1
876#endif
877#if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE) 871#if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
878#define HAVE_MULTIDRIVE 872#define HAVE_MULTIDRIVE
879#endif 873#endif
880 874
881#if defined(HAVE_MULTIDRIVE) && !defined(HAVE_MULTIVOLUME) 875#if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
876#error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
877#endif
878
879#ifndef NUM_DRIVES
880#define NUM_DRIVES 1
881#endif
882
883#if !defined(HAVE_MULTIVOLUME)
884#if defined(HAVE_MULTIDRIVE)
885/* Multidrive strongly implies multivolume */
886#define HAVE_MULTIVOLUME
887#elif (CONFIG_STORAGE & STORAGE_SD)
888/* SD routinely have multiple partitions */
889#elif (CONFIG_STORAGE & STORAGE_ATA) && defined(HAVE_LBA48)
890/* ATA routinely haves multiple partitions, but don't bother if we can't do LBA48 */
882#define HAVE_MULTIVOLUME 891#define HAVE_MULTIVOLUME
883#endif 892#endif
893#endif
884 894
885#if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES) 895/* Bootloaders don't need multivolume awareness */
886#error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES 896#if defined(BOOTLOADER) && defined(HAVE_MULTIVOLUME) \
897 && !(CONFIG_PLATFORM & PLATFORM_HOSTED) && !defined(BOOT_REDIR)
898#undef HAVE_MULTIVOLUME
899#endif
900
901/* Number of volumes per drive */
902#if defined(HAVE_MULTIVOLUME) && !defined(SIMULATOR) && !(CONFIG_PLATFORM & PLATFORM_HOSTED)
903#define NUM_VOLUMES_PER_DRIVE 4
904#else
905#define NUM_VOLUMES_PER_DRIVE 1
887#endif 906#endif
888 907
889/* note to remove multi-partition booting this could be changed to MULTIDRIVE */ 908/* note to remove multi-partition booting this could be changed to MULTIDRIVE */
@@ -897,10 +916,6 @@ Lyre prototype 1 */
897# define MULTIBOOT_MIN_VOLUME 0 916# define MULTIBOOT_MIN_VOLUME 0
898#endif 917#endif
899 918
900#ifndef NUM_DRIVES
901#define NUM_DRIVES 1
902#endif
903
904#define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE) 919#define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE)
905 920
906#if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ) 921#if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
@@ -934,31 +949,35 @@ Lyre prototype 1 */
934#ifdef HAVE_BOOTLOADER_USB_MODE 949#ifdef HAVE_BOOTLOADER_USB_MODE
935/* Priority in bootloader is wanted */ 950/* Priority in bootloader is wanted */
936#define HAVE_PRIORITY_SCHEDULING 951#define HAVE_PRIORITY_SCHEDULING
952
937#if (CONFIG_CPU == S5L8702) 953#if (CONFIG_CPU == S5L8702)
938#define USB_DRIVER_CLOSE 954#define USB_DRIVER_CLOSE
939#else 955#else
940#define USB_STATUS_BY_EVENT 956#define USB_STATUS_BY_EVENT
941#define USB_DETECT_BY_REQUEST 957#define USB_DETECT_BY_REQUEST
942#endif 958#endif
959
943#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC 960#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
944#define INCLUDE_TIMEOUT_API 961#define INCLUDE_TIMEOUT_API
945#define USB_DRIVER_CLOSE 962#define USB_DRIVER_CLOSE
946#endif 963#endif
964
947#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105 965#if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105
948#define INCLUDE_TIMEOUT_API 966#define INCLUDE_TIMEOUT_API
949#define USB_DRIVER_CLOSE 967#define USB_DRIVER_CLOSE
950#endif 968#endif
969
951#if CONFIG_CPU == X1000 970#if CONFIG_CPU == X1000
952#define USB_DRIVER_CLOSE 971#define USB_DRIVER_CLOSE
953#endif 972#endif
954#endif 973
974#endif /* BOOTLOADER_USB_MODE */
955 975
956#else /* !BOOTLOADER */ 976#else /* !BOOTLOADER */
957 977
958#define HAVE_EXTENDED_MESSAGING_AND_NAME 978#define HAVE_EXTENDED_MESSAGING_AND_NAME
959#define HAVE_WAKEUP_EXT_CB 979#define HAVE_WAKEUP_EXT_CB
960 980
961
962#if defined(ASSEMBLER_THREADS) \ 981#if defined(ASSEMBLER_THREADS) \
963 || defined(HAVE_WIN32_FIBER_THREADS) \ 982 || defined(HAVE_WIN32_FIBER_THREADS) \
964 || defined(HAVE_SIGALTSTACK_THREADS) 983 || defined(HAVE_SIGALTSTACK_THREADS)
@@ -993,7 +1012,7 @@ Lyre prototype 1 */
993#endif /* CONFIG_USB == */ 1012#endif /* CONFIG_USB == */
994#endif /* HAVE_USBSTACK */ 1013#endif /* HAVE_USBSTACK */
995 1014
996#endif /* BOOTLOADER */ 1015#endif /* !BOOTLOADER */
997 1016
998#if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) \ 1017#if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) \
999 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \ 1018 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \