1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
7 #ifndef __TEGRA_COMMON_POST_H
8 #define __TEGRA_COMMON_POST_H
10 #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
12 #ifndef CONFIG_SPL_BUILD
14 #if CONFIG_IS_ENABLED(CMD_USB)
15 # define BOOT_TARGET_USB(func) func(USB, usb, 0)
17 # define BOOT_TARGET_USB(func)
20 #ifndef BOOT_TARGET_DEVICES
21 #define BOOT_TARGET_DEVICES(func) \
24 BOOT_TARGET_USB(func) \
28 #include <config_distro_bootcmd.h>
33 #ifdef CONFIG_TEGRA_KEYBOARD
34 #define STDIN_KBD_KBC ",tegra-kbc"
36 #define STDIN_KBD_KBC ""
39 #ifdef CONFIG_USB_KEYBOARD
40 #define STDIN_KBD_USB ",usbkbd"
42 #define STDIN_KBD_USB ""
46 #define STDOUT_LCD ",lcd"
51 #ifdef CONFIG_DM_VIDEO
52 #define STDOUT_VIDEO ",vidconsole"
54 #define STDOUT_VIDEO ""
57 #ifdef CONFIG_CROS_EC_KEYB
58 #define STDOUT_CROS_EC ",cros-ec-keyb"
60 #define STDOUT_CROS_EC ""
63 #define TEGRA_DEVICE_SETTINGS \
64 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
65 "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
66 "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
69 #ifndef BOARD_EXTRA_ENV_SETTINGS
70 #define BOARD_EXTRA_ENV_SETTINGS
73 #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
74 #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
78 #define FDT_HIGH "ffffffffffffffff"
79 #define INITRD_HIGH "ffffffffffffffff"
81 #define FDT_HIGH "ffffffff"
82 #define INITRD_HIGH "ffffffff"
85 #define CONFIG_EXTRA_ENV_SETTINGS \
86 TEGRA_DEVICE_SETTINGS \
87 MEM_LAYOUT_ENV_SETTINGS \
88 "fdt_high=" FDT_HIGH "\0" \
89 "initrd_high=" INITRD_HIGH "\0" \
91 BOARD_EXTRA_ENV_SETTINGS \
92 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
94 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
95 #define CONFIG_TEGRA_SPI
98 /* overrides for SPL build here */
99 #ifdef CONFIG_SPL_BUILD
102 #ifdef CONFIG_USB_EHCI_TEGRA
103 #undef CONFIG_USB_EHCI_TEGRA
106 #endif /* CONFIG_SPL_BUILD */
108 #endif /* __TEGRA_COMMON_POST_H */