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 ""
37 #ifdef CONFIG_VIDEO_TEGRA
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_EXTRA_ENV_SETTINGS \
54 TEGRA_DEVICE_SETTINGS \
55 MEM_LAYOUT_ENV_SETTINGS \
56 "fdt_high=ffffffff\0" \
57 "initrd_high=ffffffff\0" \
59 BOARD_EXTRA_ENV_SETTINGS
61 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
62 #define CONFIG_TEGRA_SPI
65 /* overrides for SPL build here */
66 #ifdef CONFIG_SPL_BUILD
68 #define CONFIG_SKIP_LOWLEVEL_INIT
70 /* remove I2C support */
71 #ifdef CONFIG_SYS_I2C_TEGRA
72 #undef CONFIG_SYS_I2C_TEGRA
78 /* remove MMC support */
82 #ifdef CONFIG_GENERIC_MMC
83 #undef CONFIG_GENERIC_MMC
85 #ifdef CONFIG_TEGRA_MMC
86 #undef CONFIG_TEGRA_MMC
92 /* remove partitions/filesystems */
93 #ifdef CONFIG_DOS_PARTITION
94 #undef CONFIG_DOS_PARTITION
96 #ifdef CONFIG_EFI_PARTITION
97 #undef CONFIG_EFI_PARTITION
99 #ifdef CONFIG_CMD_FS_GENERIC
100 #undef CONFIG_CMD_FS_GENERIC
102 #ifdef CONFIG_CMD_EXT4
103 #undef CONFIG_CMD_EXT4
105 #ifdef CONFIG_CMD_EXT2
106 #undef CONFIG_CMD_EXT2
108 #ifdef CONFIG_CMD_FAT
109 #undef CONFIG_CMD_FAT
111 #ifdef CONFIG_FS_EXT4
112 #undef CONFIG_FS_EXT4
119 #ifdef CONFIG_USB_EHCI
120 #undef CONFIG_USB_EHCI
122 #ifdef CONFIG_USB_EHCI_TEGRA
123 #undef CONFIG_USB_EHCI_TEGRA
125 #ifdef CONFIG_USB_STORAGE
126 #undef CONFIG_USB_STORAGE
128 #ifdef CONFIG_CMD_USB
129 #undef CONFIG_CMD_USB
132 /* remove part command support */
133 #ifdef CONFIG_PARTITION_UUIDS
134 #undef CONFIG_PARTITION_UUIDS
137 #ifdef CONFIG_CMD_PART
138 #undef CONFIG_CMD_PART
141 #endif /* CONFIG_SPL_BUILD */
143 #endif /* __TEGRA_COMMON_POST_H */