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 #if IS_ENABLED(CONFIG_CMD_USB)
11 #define BOOT_TARGET_USB(func) func(USB, usb, 0)
13 #define BOOT_TARGET_USB(func)
16 #if CONFIG_IS_ENABLED(CMD_DHCP) && CONFIG_IS_ENABLED(CMD_PXE)
17 #define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
19 #define BOOT_TARGET_PXE(func)
22 #if CONFIG_IS_ENABLED(CMD_DHCP)
23 #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
25 #define BOOT_TARGET_DHCP(func)
28 #ifndef BOOT_TARGET_DEVICES
29 #define BOOT_TARGET_DEVICES(func) \
32 BOOT_TARGET_USB(func) \
33 BOOT_TARGET_PXE(func) \
34 BOOT_TARGET_DHCP(func)
36 #include <config_distro_bootcmd.h>
38 #ifdef CONFIG_TEGRA_KEYBOARD
39 #define STDIN_KBD_KBC ",tegra-kbc"
41 #define STDIN_KBD_KBC ""
44 #ifdef CONFIG_USB_KEYBOARD
45 #define STDIN_KBD_USB ",usbkbd"
47 #define STDIN_KBD_USB ""
50 #ifdef CONFIG_BUTTON_KEYBOARD
51 #define STDIN_BTN_KBD ",button-kbd"
53 #define STDIN_BTN_KBD ""
57 #define STDOUT_VIDEO ",vidconsole"
59 #define STDOUT_VIDEO ""
62 #ifdef CONFIG_CROS_EC_KEYB
63 #define STDOUT_CROS_EC ",cros-ec-keyb"
65 #define STDOUT_CROS_EC ""
68 #define TEGRA_DEVICE_SETTINGS \
69 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC STDIN_BTN_KBD "\0" \
70 "stdout=serial" STDOUT_VIDEO "\0" \
71 "stderr=serial" STDOUT_VIDEO "\0" \
74 #ifndef BOARD_EXTRA_ENV_SETTINGS
75 #define BOARD_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 CFG_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
94 #endif /* __TEGRA_COMMON_POST_H */