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 #define TEGRA_DEVICE_SETTINGS \
44 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \
45 "stdout=serial" STDOUT_LCD "\0" \
46 "stderr=serial" STDOUT_LCD "\0" \
49 #ifndef BOARD_EXTRA_ENV_SETTINGS
50 #define BOARD_EXTRA_ENV_SETTINGS
53 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
55 #define CONFIG_EXTRA_ENV_SETTINGS \
56 TEGRA_DEVICE_SETTINGS \
57 MEM_LAYOUT_ENV_SETTINGS \
58 "fdt_high=ffffffff\0" \
59 "initrd_high=ffffffff\0" \
61 BOARD_EXTRA_ENV_SETTINGS
63 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
64 #define CONFIG_TEGRA_SPI
67 /* overrides for SPL build here */
68 #ifdef CONFIG_SPL_BUILD
70 #define CONFIG_SKIP_LOWLEVEL_INIT
72 /* remove I2C support */
73 #ifdef CONFIG_SYS_I2C_TEGRA
74 #undef CONFIG_SYS_I2C_TEGRA
80 /* remove MMC support */
84 #ifdef CONFIG_GENERIC_MMC
85 #undef CONFIG_GENERIC_MMC
87 #ifdef CONFIG_TEGRA_MMC
88 #undef CONFIG_TEGRA_MMC
94 /* remove partitions/filesystems */
95 #ifdef CONFIG_DOS_PARTITION
96 #undef CONFIG_DOS_PARTITION
98 #ifdef CONFIG_EFI_PARTITION
99 #undef CONFIG_EFI_PARTITION
101 #ifdef CONFIG_CMD_FS_GENERIC
102 #undef CONFIG_CMD_FS_GENERIC
104 #ifdef CONFIG_CMD_EXT4
105 #undef CONFIG_CMD_EXT4
107 #ifdef CONFIG_CMD_EXT2
108 #undef CONFIG_CMD_EXT2
110 #ifdef CONFIG_CMD_FAT
111 #undef CONFIG_CMD_FAT
113 #ifdef CONFIG_FS_EXT4
114 #undef CONFIG_FS_EXT4
121 #ifdef CONFIG_USB_EHCI
122 #undef CONFIG_USB_EHCI
124 #ifdef CONFIG_USB_EHCI_TEGRA
125 #undef CONFIG_USB_EHCI_TEGRA
127 #ifdef CONFIG_USB_STORAGE
128 #undef CONFIG_USB_STORAGE
130 #ifdef CONFIG_CMD_USB
131 #undef CONFIG_CMD_USB
134 /* remove part command support */
135 #ifdef CONFIG_PARTITION_UUIDS
136 #undef CONFIG_PARTITION_UUIDS
139 #ifdef CONFIG_CMD_PART
140 #undef CONFIG_CMD_PART
143 #endif /* CONFIG_SPL_BUILD */
145 #endif /* __TEGRA_COMMON_POST_H */