xref: /openbmc/u-boot/include/config_fallbacks.h (revision e23b19f4)
1 /*
2  * Copyright 2012 Texas Instruments
3  *
4  * This file is licensed under the terms of the GNU General Public
5  * License Version 2. This file is licensed "as is" without any
6  * warranty of any kind, whether express or implied.
7  */
8 
9 #ifndef __CONFIG_FALLBACKS_H
10 #define __CONFIG_FALLBACKS_H
11 
12 #ifdef CONFIG_SPL
13 #ifdef CONFIG_SPL_PAD_TO
14 #ifdef CONFIG_SPL_MAX_SIZE
15 #if CONFIG_SPL_PAD_TO && CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
16 #error CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
17 #endif
18 #endif
19 #else
20 #ifdef CONFIG_SPL_MAX_SIZE
21 #define CONFIG_SPL_PAD_TO	CONFIG_SPL_MAX_SIZE
22 #else
23 #define CONFIG_SPL_PAD_TO	0
24 #endif
25 #endif
26 #endif
27 
28 #ifndef CONFIG_SYS_BAUDRATE_TABLE
29 #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
30 #endif
31 
32 /* Rather than repeat this expression each time, add a define for it */
33 #if defined(CONFIG_IDE) || \
34 	defined(CONFIG_SATA) || \
35 	defined(CONFIG_SCSI) || \
36 	defined(CONFIG_CMD_USB) || \
37 	defined(CONFIG_CMD_PART) || \
38 	defined(CONFIG_CMD_GPT) || \
39 	defined(CONFIG_MMC) || \
40 	defined(CONFIG_NVME) || \
41 	defined(CONFIG_SYSTEMACE) || \
42 	(defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)) || \
43 	defined(CONFIG_SANDBOX)
44 #define HAVE_BLOCK_DEVICE
45 #endif
46 
47 #if (CONFIG_IS_ENABLED(PARTITION_UUIDS) || \
48 	CONFIG_IS_ENABLED(EFI_PARTITION) || \
49 	CONFIG_IS_ENABLED(EFI_LOADER) || \
50 	defined(CONFIG_RANDOM_UUID) || \
51 	defined(CONFIG_CMD_UUID) || \
52 	defined(CONFIG_BOOTP_PXE)) && \
53 	!defined(CONFIG_LIB_UUID)
54 #define CONFIG_LIB_UUID
55 #endif
56 
57 #if (defined(CONFIG_RANDOM_UUID) || \
58 	defined(CONFIG_CMD_UUID)) && \
59 	(!defined(CONFIG_LIB_RAND) && \
60 	!defined(CONFIG_LIB_HW_RAND))
61 #define CONFIG_LIB_RAND
62 #endif
63 
64 /* Console I/O Buffer Size */
65 #ifndef CONFIG_SYS_CBSIZE
66 #if defined(CONFIG_CMD_KGDB)
67 #define CONFIG_SYS_CBSIZE	1024
68 #else
69 #define CONFIG_SYS_CBSIZE	256
70 #endif
71 #endif
72 
73 #ifndef CONFIG_SYS_PBSIZE
74 #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
75 #endif
76 
77 #ifndef CONFIG_SYS_MAXARGS
78 #define CONFIG_SYS_MAXARGS	16
79 #endif
80 
81 #ifndef CONFIG_FIT_SIGNATURE
82 #define CONFIG_IMAGE_FORMAT_LEGACY
83 #endif
84 
85 #ifdef CONFIG_DISABLE_IMAGE_LEGACY
86 #undef CONFIG_IMAGE_FORMAT_LEGACY
87 #endif
88 
89 #ifdef CONFIG_DM_I2C
90 # ifdef CONFIG_SYS_I2C
91 #  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
92 # endif
93 #endif
94 
95 #ifndef CONFIG_CMDLINE
96 #undef CONFIG_CMDLINE_EDITING
97 #undef CONFIG_SYS_LONGHELP
98 #endif
99 
100 #endif	/* __CONFIG_FALLBACKS_H */
101