xref: /openbmc/u-boot/include/config_fallbacks.h (revision 72f09606d80f6786ae7f20f4b0e621ddb576302e)
126750c8aSTom Rini /*
226750c8aSTom Rini  * Copyright 2012 Texas Instruments
326750c8aSTom Rini  *
426750c8aSTom Rini  * This file is licensed under the terms of the GNU General Public
526750c8aSTom Rini  * License Version 2. This file is licensed "as is" without any
626750c8aSTom Rini  * warranty of any kind, whether express or implied.
726750c8aSTom Rini  */
826750c8aSTom Rini 
926750c8aSTom Rini #ifndef __CONFIG_FALLBACKS_H
1026750c8aSTom Rini #define __CONFIG_FALLBACKS_H
1126750c8aSTom Rini 
126113d3f2SBenoît Thébaudeau #ifdef CONFIG_SPL
136113d3f2SBenoît Thébaudeau #ifdef CONFIG_SPL_PAD_TO
146113d3f2SBenoît Thébaudeau #ifdef CONFIG_SPL_MAX_SIZE
156113d3f2SBenoît Thébaudeau #if CONFIG_SPL_PAD_TO && CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
166113d3f2SBenoît Thébaudeau #error CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
176113d3f2SBenoît Thébaudeau #endif
186113d3f2SBenoît Thébaudeau #endif
196113d3f2SBenoît Thébaudeau #else
206113d3f2SBenoît Thébaudeau #ifdef CONFIG_SPL_MAX_SIZE
216113d3f2SBenoît Thébaudeau #define CONFIG_SPL_PAD_TO	CONFIG_SPL_MAX_SIZE
226113d3f2SBenoît Thébaudeau #else
236113d3f2SBenoît Thébaudeau #define CONFIG_SPL_PAD_TO	0
246113d3f2SBenoît Thébaudeau #endif
256113d3f2SBenoît Thébaudeau #endif
266113d3f2SBenoît Thébaudeau #endif
276113d3f2SBenoît Thébaudeau 
2826750c8aSTom Rini #ifndef CONFIG_SYS_BAUDRATE_TABLE
2926750c8aSTom Rini #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
3026750c8aSTom Rini #endif
3126750c8aSTom Rini 
320dbb9a93SSekhar Nori #if defined(CONFIG_ENV_IS_IN_FAT) && !defined(CONFIG_FS_FAT)
3303e2ecf6SStephen Warren #define CONFIG_FS_FAT
3403e2ecf6SStephen Warren #endif
3503e2ecf6SStephen Warren 
3603e2ecf6SStephen Warren #if (defined(CONFIG_CMD_EXT4) || defined(CONFIG_CMD_EXT2)) && \
3703e2ecf6SStephen Warren 						!defined(CONFIG_FS_EXT4)
3803e2ecf6SStephen Warren #define CONFIG_FS_EXT4
3903e2ecf6SStephen Warren #endif
4003e2ecf6SStephen Warren 
4103e2ecf6SStephen Warren #if defined(CONFIG_CMD_EXT4_WRITE) && !defined(CONFIG_EXT4_WRITE)
4203e2ecf6SStephen Warren #define CONFIG_EXT4_WRITE
4303e2ecf6SStephen Warren #endif
4403e2ecf6SStephen Warren 
452c1af9dcSStephen Warren /* Rather than repeat this expression each time, add a define for it */
46fc843a02SSimon Glass #if defined(CONFIG_IDE) || \
4710e40d54SSimon Glass 	defined(CONFIG_SATA) || \
48c649e3c9SSimon Glass 	defined(CONFIG_SCSI) || \
492c1af9dcSStephen Warren 	defined(CONFIG_CMD_USB) || \
504123c4eaSStephen Warren 	defined(CONFIG_CMD_PART) || \
51f9cd3d3aSEgbert Eich 	defined(CONFIG_CMD_GPT) || \
522c1af9dcSStephen Warren 	defined(CONFIG_MMC) || \
53fceadc14SBin Meng 	defined(CONFIG_NVME) || \
54f4d8de48SHenrik Nordström 	defined(CONFIG_SYSTEMACE) || \
55f4d8de48SHenrik Nordström 	defined(CONFIG_SANDBOX)
562c1af9dcSStephen Warren #define HAVE_BLOCK_DEVICE
572c1af9dcSStephen Warren #endif
582c1af9dcSStephen Warren 
59b331cd62SPatrick Delaunay #if (CONFIG_IS_ENABLED(PARTITION_UUIDS) || \
60bd42a942SPatrick Delaunay 	CONFIG_IS_ENABLED(EFI_PARTITION) || \
614e4815feSPrzemyslaw Marczak 	defined(CONFIG_RANDOM_UUID) || \
6289c8230dSPrzemyslaw Marczak 	defined(CONFIG_CMD_UUID) || \
634e4815feSPrzemyslaw Marczak 	defined(CONFIG_BOOTP_PXE)) && \
644e4815feSPrzemyslaw Marczak 	!defined(CONFIG_LIB_UUID)
654e4815feSPrzemyslaw Marczak #define CONFIG_LIB_UUID
664e4815feSPrzemyslaw Marczak #endif
674e4815feSPrzemyslaw Marczak 
6889c8230dSPrzemyslaw Marczak #if (defined(CONFIG_RANDOM_UUID) || \
6989c8230dSPrzemyslaw Marczak 	defined(CONFIG_CMD_UUID)) && \
7089c8230dSPrzemyslaw Marczak 	(!defined(CONFIG_LIB_RAND) && \
7189c8230dSPrzemyslaw Marczak 	!defined(CONFIG_LIB_HW_RAND))
724e4815feSPrzemyslaw Marczak #define CONFIG_LIB_RAND
734e4815feSPrzemyslaw Marczak #endif
744e4815feSPrzemyslaw Marczak 
75*72f09606SThomas Petazzoni /* Console I/O Buffer Size */
76*72f09606SThomas Petazzoni #ifndef CONFIG_SYS_CBSIZE
77*72f09606SThomas Petazzoni #if defined(CONFIG_CMD_KGDB)
78*72f09606SThomas Petazzoni #define CONFIG_SYS_CBSIZE	1024
79*72f09606SThomas Petazzoni #else
80*72f09606SThomas Petazzoni #define CONFIG_SYS_CBSIZE	256
81*72f09606SThomas Petazzoni #endif
82*72f09606SThomas Petazzoni #endif
83*72f09606SThomas Petazzoni 
8431cc2c85SFabio Estevam #ifndef CONFIG_SYS_PBSIZE
8531cc2c85SFabio Estevam #define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + 128)
8631cc2c85SFabio Estevam #endif
8731cc2c85SFabio Estevam 
8821d29f7fSHeiko Schocher #ifndef CONFIG_FIT_SIGNATURE
8921d29f7fSHeiko Schocher #define CONFIG_IMAGE_FORMAT_LEGACY
9021d29f7fSHeiko Schocher #endif
9121d29f7fSHeiko Schocher 
9221d29f7fSHeiko Schocher #ifdef CONFIG_DISABLE_IMAGE_LEGACY
9321d29f7fSHeiko Schocher #undef CONFIG_IMAGE_FORMAT_LEGACY
9421d29f7fSHeiko Schocher #endif
9521d29f7fSHeiko Schocher 
96c6202d85SSimon Glass #ifdef CONFIG_DM_I2C
97c6202d85SSimon Glass # ifdef CONFIG_SYS_I2C
98c6202d85SSimon Glass #  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
99c6202d85SSimon Glass # endif
100c6202d85SSimon Glass #endif
101c6202d85SSimon Glass 
1029a6598daSSimon Glass #ifndef CONFIG_CMDLINE
1039a6598daSSimon Glass #undef CONFIG_CMDLINE_EDITING
1049a6598daSSimon Glass #undef CONFIG_SYS_LONGHELP
1059a6598daSSimon Glass #endif
1069a6598daSSimon Glass 
10726750c8aSTom Rini #endif	/* __CONFIG_FALLBACKS_H */
108