2 * (C) Copyright 2010-2012
3 * NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __TEGRA_COMMON_POST_H
9 #define __TEGRA_COMMON_POST_H
12 * Size of malloc() pool
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)
19 #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */
22 #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
24 #ifndef CONFIG_SPL_BUILD
25 #define BOOT_TARGET_DEVICES(func) \
31 #include <config_distro_bootcmd.h>
36 #ifdef CONFIG_TEGRA_KEYBOARD
37 #define STDIN_KBD_KBC ",tegra-kbc"
39 #define STDIN_KBD_KBC ""
42 #ifdef CONFIG_USB_KEYBOARD
43 #define STDIN_KBD_USB ",usbkbd"
44 #define CONFIG_SYS_USB_EVENT_POLL
45 #define CONFIG_PREBOOT "usb start"
47 #define STDIN_KBD_USB ""
51 #define STDOUT_LCD ",lcd"
56 #ifdef CONFIG_CROS_EC_KEYB
57 #define STDOUT_CROS_EC ",cros-ec-keyb"
59 #define STDOUT_CROS_EC ""
62 #define TEGRA_DEVICE_SETTINGS \
63 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
64 "stdout=serial" STDOUT_LCD "\0" \
65 "stderr=serial" STDOUT_LCD "\0" \
68 #ifndef BOARD_EXTRA_ENV_SETTINGS
69 #define BOARD_EXTRA_ENV_SETTINGS
72 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
74 #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
75 #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
79 #define FDT_HIGH "ffffffffffffffff"
80 #define INITRD_HIGH "ffffffffffffffff"
82 #define FDT_HIGH "ffffffff"
83 #define INITRD_HIGH "ffffffff"
86 #define CONFIG_EXTRA_ENV_SETTINGS \
87 TEGRA_DEVICE_SETTINGS \
88 MEM_LAYOUT_ENV_SETTINGS \
89 "fdt_high=" FDT_HIGH "\0" \
90 "initrd_high=" INITRD_HIGH "\0" \
92 BOARD_EXTRA_ENV_SETTINGS \
93 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
95 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
96 #define CONFIG_TEGRA_SPI
99 /* overrides for SPL build here */
100 #ifdef CONFIG_SPL_BUILD
102 #define CONFIG_SKIP_LOWLEVEL_INIT
104 /* remove I2C support */
105 #ifdef CONFIG_SYS_I2C_TEGRA
106 #undef CONFIG_SYS_I2C_TEGRA
108 #ifdef CONFIG_CMD_I2C
109 #undef CONFIG_CMD_I2C
112 /* remove MMC support */
116 #ifdef CONFIG_GENERIC_MMC
117 #undef CONFIG_GENERIC_MMC
119 #ifdef CONFIG_TEGRA_MMC
120 #undef CONFIG_TEGRA_MMC
122 #ifdef CONFIG_CMD_MMC
123 #undef CONFIG_CMD_MMC
126 /* remove partitions/filesystems */
127 #ifdef CONFIG_DOS_PARTITION
128 #undef CONFIG_DOS_PARTITION
130 #ifdef CONFIG_EFI_PARTITION
131 #undef CONFIG_EFI_PARTITION
133 #ifdef CONFIG_CMD_FS_GENERIC
134 #undef CONFIG_CMD_FS_GENERIC
136 #ifdef CONFIG_CMD_EXT4
137 #undef CONFIG_CMD_EXT4
139 #ifdef CONFIG_CMD_EXT2
140 #undef CONFIG_CMD_EXT2
142 #ifdef CONFIG_CMD_FAT
143 #undef CONFIG_CMD_FAT
145 #ifdef CONFIG_FS_EXT4
146 #undef CONFIG_FS_EXT4
153 #ifdef CONFIG_USB_EHCI
154 #undef CONFIG_USB_EHCI
156 #ifdef CONFIG_USB_EHCI_TEGRA
157 #undef CONFIG_USB_EHCI_TEGRA
159 #ifdef CONFIG_USB_STORAGE
160 #undef CONFIG_USB_STORAGE
162 #ifdef CONFIG_CMD_USB
163 #undef CONFIG_CMD_USB
166 /* remove part command support */
167 #ifdef CONFIG_PARTITION_UUIDS
168 #undef CONFIG_PARTITION_UUIDS
171 #ifdef CONFIG_CMD_PART
172 #undef CONFIG_CMD_PART
175 #endif /* CONFIG_SPL_BUILD */
177 #endif /* __TEGRA_COMMON_POST_H */