summaryrefslogtreecommitdiff
path: root/include/config_fallbacks.h
blob: 9695ee7ffb69b9a64af279a11aaf400a8f5420b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 * Copyright 2012 Texas Instruments
 *
 * This file is licensed under the terms of the GNU General Public
 * License Version 2. This file is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#ifndef __CONFIG_FALLBACKS_H
#define __CONFIG_FALLBACKS_H

#ifdef CONFIG_SPL
#ifdef CONFIG_SPL_PAD_TO
#ifdef CONFIG_SPL_MAX_SIZE
#if CONFIG_SPL_PAD_TO && CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
#error CONFIG_SPL_PAD_TO < CONFIG_SPL_MAX_SIZE
#endif
#endif
#else
#ifdef CONFIG_SPL_MAX_SIZE
#define CONFIG_SPL_PAD_TO	CONFIG_SPL_MAX_SIZE
#else
#define CONFIG_SPL_PAD_TO	0
#endif
#endif
#endif

#ifndef CONFIG_SYS_BAUDRATE_TABLE
#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
#endif

/* Rather than repeat this expression each time, add a define for it */
#if defined(CONFIG_IDE) || \
	defined(CONFIG_SATA) || \
	defined(CONFIG_SCSI) || \
	defined(CONFIG_CMD_USB) || \
	defined(CONFIG_CMD_PART) || \
	defined(CONFIG_CMD_GPT) || \
	defined(CONFIG_MMC) || \
	defined(CONFIG_NVME) || \
	defined(CONFIG_SYSTEMACE) || \
	(defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)) || \
	defined(CONFIG_SANDBOX)
#define HAVE_BLOCK_DEVICE
#endif

#if (CONFIG_IS_ENABLED(PARTITION_UUIDS) || \
	CONFIG_IS_ENABLED(EFI_PARTITION) || \
	CONFIG_IS_ENABLED(EFI_LOADER) || \
	defined(CONFIG_RANDOM_UUID) || \
	defined(CONFIG_CMD_UUID) || \
	defined(CONFIG_BOOTP_PXE)) && \
	!defined(CONFIG_LIB_UUID)
#define CONFIG_LIB_UUID
#endif

#if (defined(CONFIG_RANDOM_UUID) || \
	defined(CONFIG_CMD_UUID)) && \
	(!defined(CONFIG_LIB_RAND) && \
	!defined(CONFIG_LIB_HW_RAND))
#define CONFIG_LIB_RAND
#endif

/* Console I/O Buffer Size */
#ifndef CONFIG_SYS_CBSIZE
#if defined(CONFIG_CMD_KGDB)
#define CONFIG_SYS_CBSIZE	1024
#else
#define CONFIG_SYS_CBSIZE	256
#endif
#endif

#ifndef CONFIG_SYS_PBSIZE
#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
#endif

#ifndef CONFIG_SYS_MAXARGS
#define CONFIG_SYS_MAXARGS	16
#endif

#ifndef CONFIG_FIT_SIGNATURE
#define CONFIG_IMAGE_FORMAT_LEGACY
#endif

#ifdef CONFIG_DISABLE_IMAGE_LEGACY
#undef CONFIG_IMAGE_FORMAT_LEGACY
#endif

#ifdef CONFIG_DM_I2C
# ifdef CONFIG_SYS_I2C
#  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
# endif
#endif

#ifndef CONFIG_CMDLINE
#undef CONFIG_CMDLINE_EDITING
#undef CONFIG_SYS_LONGHELP
#endif

#endif	/* __CONFIG_FALLBACKS_H */