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
11 #ifndef CONFIG_SPL_BUILD
12 #define BOOT_TARGET_DEVICES(func) \
18 #include <config_distro_bootcmd.h>
23 #ifdef CONFIG_TEGRA_KEYBOARD
24 #define STDIN_KBD_KBC ",tegra-kbc"
26 #define STDIN_KBD_KBC ""
29 #ifdef CONFIG_USB_KEYBOARD
30 #define STDIN_KBD_USB ",usbkbd"
31 #define CONFIG_SYS_USB_EVENT_POLL
32 #define CONFIG_PREBOOT "usb start"
34 #define STDIN_KBD_USB ""
38 #define STDOUT_LCD ",lcd"
43 #ifdef CONFIG_CROS_EC_KEYB
44 #define STDOUT_CROS_EC ",cros-ec-keyb"
46 #define STDOUT_CROS_EC ""
49 #define TEGRA_DEVICE_SETTINGS \
50 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
51 "stdout=serial" STDOUT_LCD "\0" \
52 "stderr=serial" STDOUT_LCD "\0" \
55 #ifndef BOARD_EXTRA_ENV_SETTINGS
56 #define BOARD_EXTRA_ENV_SETTINGS
59 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
61 #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
62 #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
66 #define FDT_HIGH "ffffffffffffffff"
67 #define INITRD_HIGH "ffffffffffffffff"
69 #define FDT_HIGH "ffffffff"
70 #define INITRD_HIGH "ffffffff"
73 #define CONFIG_EXTRA_ENV_SETTINGS \
74 TEGRA_DEVICE_SETTINGS \
75 MEM_LAYOUT_ENV_SETTINGS \
76 "fdt_high=" FDT_HIGH "\0" \
77 "initrd_high=" INITRD_HIGH "\0" \
79 BOARD_EXTRA_ENV_SETTINGS \
80 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
82 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
83 #define CONFIG_TEGRA_SPI
86 /* overrides for SPL build here */
87 #ifdef CONFIG_SPL_BUILD
89 #define CONFIG_SKIP_LOWLEVEL_INIT
91 /* remove I2C support */
92 #ifdef CONFIG_SYS_I2C_TEGRA
93 #undef CONFIG_SYS_I2C_TEGRA
99 /* remove MMC support */
103 #ifdef CONFIG_GENERIC_MMC
104 #undef CONFIG_GENERIC_MMC
106 #ifdef CONFIG_TEGRA_MMC
107 #undef CONFIG_TEGRA_MMC
109 #ifdef CONFIG_CMD_MMC
110 #undef CONFIG_CMD_MMC
113 /* remove partitions/filesystems */
114 #ifdef CONFIG_DOS_PARTITION
115 #undef CONFIG_DOS_PARTITION
117 #ifdef CONFIG_EFI_PARTITION
118 #undef CONFIG_EFI_PARTITION
120 #ifdef CONFIG_CMD_FS_GENERIC
121 #undef CONFIG_CMD_FS_GENERIC
123 #ifdef CONFIG_CMD_EXT4
124 #undef CONFIG_CMD_EXT4
126 #ifdef CONFIG_CMD_EXT2
127 #undef CONFIG_CMD_EXT2
129 #ifdef CONFIG_CMD_FAT
130 #undef CONFIG_CMD_FAT
132 #ifdef CONFIG_FS_EXT4
133 #undef CONFIG_FS_EXT4
140 #ifdef CONFIG_USB_EHCI
141 #undef CONFIG_USB_EHCI
143 #ifdef CONFIG_USB_EHCI_TEGRA
144 #undef CONFIG_USB_EHCI_TEGRA
146 #ifdef CONFIG_USB_STORAGE
147 #undef CONFIG_USB_STORAGE
149 #ifdef CONFIG_CMD_USB
150 #undef CONFIG_CMD_USB
153 /* remove part command support */
154 #ifdef CONFIG_PARTITION_UUIDS
155 #undef CONFIG_PARTITION_UUIDS
158 #ifdef CONFIG_CMD_PART
159 #undef CONFIG_CMD_PART
162 #endif /* CONFIG_SPL_BUILD */
164 #endif /* __TEGRA_COMMON_POST_H */