1
2
3
4
5
6
7
8#ifndef __TEGRA_COMMON_POST_H
9#define __TEGRA_COMMON_POST_H
10
11
12
13
14#ifdef CONFIG_USB_FUNCTION_DFU
15#define CONFIG_SYS_MALLOC_LEN (SZ_4M + \
16 CONFIG_SYS_DFU_DATA_BUF_SIZE + \
17 CONFIG_SYS_DFU_MAX_FILE_SIZE)
18#else
19#define CONFIG_SYS_MALLOC_LEN (4 << 20)
20#endif
21
22#define CONFIG_SYS_NONCACHED_MEMORY (1 << 20)
23
24#ifndef CONFIG_SPL_BUILD
25#define BOOT_TARGET_DEVICES(func) \
26 func(MMC, mmc, 1) \
27 func(MMC, mmc, 0) \
28 func(USB, usb, 0) \
29 func(PXE, pxe, na) \
30 func(DHCP, dhcp, na)
31#include <config_distro_bootcmd.h>
32#else
33#define BOOTENV
34#endif
35
36#ifdef CONFIG_TEGRA_KEYBOARD
37#define STDIN_KBD_KBC ",tegra-kbc"
38#else
39#define STDIN_KBD_KBC ""
40#endif
41
42#ifdef CONFIG_USB_KEYBOARD
43#define STDIN_KBD_USB ",usbkbd"
44#define CONFIG_SYS_USB_EVENT_POLL
45#define CONFIG_PREBOOT "usb start"
46#else
47#define STDIN_KBD_USB ""
48#endif
49
50#ifdef CONFIG_LCD
51#define STDOUT_LCD ",lcd"
52#else
53#define STDOUT_LCD ""
54#endif
55
56#ifdef CONFIG_DM_VIDEO
57#define STDOUT_VIDEO ",vidconsole"
58#else
59#define STDOUT_VIDEO ""
60#endif
61
62#ifdef CONFIG_CROS_EC_KEYB
63#define STDOUT_CROS_EC ",cros-ec-keyb"
64#else
65#define STDOUT_CROS_EC ""
66#endif
67
68#define TEGRA_DEVICE_SETTINGS \
69 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
70 "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
71 "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
72 ""
73
74#ifndef BOARD_EXTRA_ENV_SETTINGS
75#define BOARD_EXTRA_ENV_SETTINGS
76#endif
77
78#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
79
80#ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
81#define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
82#endif
83
84#ifdef CONFIG_ARM64
85#define FDT_HIGH "ffffffffffffffff"
86#define INITRD_HIGH "ffffffffffffffff"
87#else
88#define FDT_HIGH "ffffffff"
89#define INITRD_HIGH "ffffffff"
90#endif
91
92#define CONFIG_EXTRA_ENV_SETTINGS \
93 TEGRA_DEVICE_SETTINGS \
94 MEM_LAYOUT_ENV_SETTINGS \
95 "fdt_high=" FDT_HIGH "\0" \
96 "initrd_high=" INITRD_HIGH "\0" \
97 BOOTENV \
98 BOARD_EXTRA_ENV_SETTINGS \
99 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
100
101#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
102#define CONFIG_TEGRA_SPI
103#endif
104
105
106#ifdef CONFIG_SPL_BUILD
107
108#define CONFIG_SKIP_LOWLEVEL_INIT
109
110
111#ifdef CONFIG_SYS_I2C_TEGRA
112#undef CONFIG_SYS_I2C_TEGRA
113#endif
114#ifdef CONFIG_CMD_I2C
115#endif
116
117
118#ifdef CONFIG_GENERIC_MMC
119#undef CONFIG_GENERIC_MMC
120#endif
121#ifdef CONFIG_TEGRA_MMC
122#undef CONFIG_TEGRA_MMC
123#endif
124#ifdef CONFIG_CMD_MMC
125#endif
126
127
128#ifdef CONFIG_DOS_PARTITION
129#undef CONFIG_DOS_PARTITION
130#endif
131#ifdef CONFIG_EFI_PARTITION
132#undef CONFIG_EFI_PARTITION
133#endif
134#ifdef CONFIG_FS_EXT4
135#undef CONFIG_FS_EXT4
136#endif
137#ifdef CONFIG_FS_FAT
138#undef CONFIG_FS_FAT
139#endif
140
141
142#ifdef CONFIG_USB_EHCI
143#undef CONFIG_USB_EHCI
144#endif
145#ifdef CONFIG_USB_EHCI_TEGRA
146#undef CONFIG_USB_EHCI_TEGRA
147#endif
148#ifdef CONFIG_CMD_USB
149#endif
150
151
152#ifdef CONFIG_PARTITION_UUIDS
153#undef CONFIG_PARTITION_UUIDS
154#endif
155
156#ifdef CONFIG_CMD_PART
157#undef CONFIG_CMD_PART
158#endif
159
160#endif
161
162#endif
163