Merge branch '2022-12-23-complete-phase1-CONFIG-migration' into next
[platform/kernel/u-boot.git] / include / configs / tegra-common-post.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2010-2012
4  * NVIDIA Corporation <www.nvidia.com>
5  */
6
7 #ifndef __TEGRA_COMMON_POST_H
8 #define __TEGRA_COMMON_POST_H
9
10 #if CONFIG_IS_ENABLED(CMD_USB)
11 # define BOOT_TARGET_USB(func) func(USB, usb, 0)
12 #else
13 # define BOOT_TARGET_USB(func)
14 #endif
15
16 #ifndef BOOT_TARGET_DEVICES
17 #define BOOT_TARGET_DEVICES(func) \
18         func(MMC, mmc, 1) \
19         func(MMC, mmc, 0) \
20         BOOT_TARGET_USB(func) \
21         func(PXE, pxe, na) \
22         func(DHCP, dhcp, na)
23 #endif
24 #include <config_distro_bootcmd.h>
25
26 #ifdef CONFIG_TEGRA_KEYBOARD
27 #define STDIN_KBD_KBC ",tegra-kbc"
28 #else
29 #define STDIN_KBD_KBC ""
30 #endif
31
32 #ifdef CONFIG_USB_KEYBOARD
33 #define STDIN_KBD_USB ",usbkbd"
34 #else
35 #define STDIN_KBD_USB ""
36 #endif
37
38 #ifdef CONFIG_VIDEO
39 #define STDOUT_VIDEO ",vidconsole"
40 #else
41 #define STDOUT_VIDEO ""
42 #endif
43
44 #ifdef CONFIG_CROS_EC_KEYB
45 #define STDOUT_CROS_EC  ",cros-ec-keyb"
46 #else
47 #define STDOUT_CROS_EC  ""
48 #endif
49
50 #define TEGRA_DEVICE_SETTINGS \
51         "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
52         "stdout=serial" STDOUT_VIDEO "\0" \
53         "stderr=serial" STDOUT_VIDEO "\0" \
54         ""
55
56 #ifndef BOARD_EXTRA_ENV_SETTINGS
57 #define BOARD_EXTRA_ENV_SETTINGS
58 #endif
59
60 #ifdef CONFIG_ARM64
61 #define FDT_HIGH "ffffffffffffffff"
62 #define INITRD_HIGH "ffffffffffffffff"
63 #else
64 #define FDT_HIGH "ffffffff"
65 #define INITRD_HIGH "ffffffff"
66 #endif
67
68 #define CFG_EXTRA_ENV_SETTINGS \
69         TEGRA_DEVICE_SETTINGS \
70         MEM_LAYOUT_ENV_SETTINGS \
71         "fdt_high=" FDT_HIGH "\0" \
72         "initrd_high=" INITRD_HIGH "\0" \
73         BOOTENV \
74         BOARD_EXTRA_ENV_SETTINGS
75
76 #endif /* __TEGRA_COMMON_POST_H */