Prepare v2023.10
[platform/kernel/u-boot.git] / include / configs / tegra-common-post.h
index 755a41f..0d0965e 100644 (file)
@@ -7,14 +7,22 @@
 #ifndef __TEGRA_COMMON_POST_H
 #define __TEGRA_COMMON_POST_H
 
-#define CONFIG_SYS_NONCACHED_MEMORY    (1 << 20)       /* 1 MiB */
+#if IS_ENABLED(CONFIG_CMD_USB)
+#define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_USB(func)
+#endif
 
-#ifndef CONFIG_SPL_BUILD
+#if CONFIG_IS_ENABLED(CMD_DHCP) && CONFIG_IS_ENABLED(CMD_PXE)
+#define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
+#else
+#define BOOT_TARGET_PXE(func)
+#endif
 
-#if CONFIG_IS_ENABLED(CMD_USB)
-# define BOOT_TARGET_USB(func) func(USB, usb, 0)
+#if CONFIG_IS_ENABLED(CMD_DHCP)
+#define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
 #else
-# define BOOT_TARGET_USB(func)
+#define BOOT_TARGET_DHCP(func)
 #endif
 
 #ifndef BOOT_TARGET_DEVICES
        func(MMC, mmc, 1) \
        func(MMC, mmc, 0) \
        BOOT_TARGET_USB(func) \
-       func(PXE, pxe, na) \
-       func(DHCP, dhcp, na)
+       BOOT_TARGET_PXE(func) \
+       BOOT_TARGET_DHCP(func)
 #endif
 #include <config_distro_bootcmd.h>
-#else
-#define BOOTENV
-#endif
 
 #ifdef CONFIG_TEGRA_KEYBOARD
 #define STDIN_KBD_KBC ",tegra-kbc"
 #define STDIN_KBD_USB ""
 #endif
 
-#ifdef CONFIG_LCD
-#define STDOUT_LCD ",lcd"
+#ifdef CONFIG_BUTTON_KEYBOARD
+#define STDIN_BTN_KBD ",button-kbd"
 #else
-#define STDOUT_LCD ""
+#define STDIN_BTN_KBD ""
 #endif
 
-#ifdef CONFIG_DM_VIDEO
+#ifdef CONFIG_VIDEO
 #define STDOUT_VIDEO ",vidconsole"
 #else
 #define STDOUT_VIDEO ""
@@ -61,9 +66,9 @@
 #endif
 
 #define TEGRA_DEVICE_SETTINGS \
-       "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
-       "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
-       "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
+       "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC STDIN_BTN_KBD "\0" \
+       "stdout=serial" STDOUT_VIDEO "\0" \
+       "stderr=serial" STDOUT_VIDEO "\0" \
        ""
 
 #ifndef BOARD_EXTRA_ENV_SETTINGS
@@ -78,7 +83,7 @@
 #define INITRD_HIGH "ffffffff"
 #endif
 
-#define CONFIG_EXTRA_ENV_SETTINGS \
+#define CFG_EXTRA_ENV_SETTINGS \
        TEGRA_DEVICE_SETTINGS \
        MEM_LAYOUT_ENV_SETTINGS \
        "fdt_high=" FDT_HIGH "\0" \
@@ -86,8 +91,4 @@
        BOOTENV \
        BOARD_EXTRA_ENV_SETTINGS
 
-#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
-#define CONFIG_TEGRA_SPI
-#endif
-
 #endif /* __TEGRA_COMMON_POST_H */