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
11 * Size of malloc() pool
13 #ifdef CONFIG_DFU_OVER_USB
14 #define CONFIG_SYS_MALLOC_LEN (SZ_4M + \
15 CONFIG_SYS_DFU_DATA_BUF_SIZE + \
16 CONFIG_SYS_DFU_MAX_FILE_SIZE)
18 #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */
21 #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */
23 #ifndef CONFIG_SPL_BUILD
24 #define BOOT_TARGET_DEVICES(func) \
30 #include <config_distro_bootcmd.h>
35 #ifdef CONFIG_TEGRA_KEYBOARD
36 #define STDIN_KBD_KBC ",tegra-kbc"
38 #define STDIN_KBD_KBC ""
41 #ifdef CONFIG_USB_KEYBOARD
42 #define STDIN_KBD_USB ",usbkbd"
43 #define CONFIG_PREBOOT "usb start"
45 #define STDIN_KBD_USB ""
49 #define STDOUT_LCD ",lcd"
54 #ifdef CONFIG_DM_VIDEO
55 #define STDOUT_VIDEO ",vidconsole"
57 #define STDOUT_VIDEO ""
60 #ifdef CONFIG_CROS_EC_KEYB
61 #define STDOUT_CROS_EC ",cros-ec-keyb"
63 #define STDOUT_CROS_EC ""
66 #define TEGRA_DEVICE_SETTINGS \
67 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
68 "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
69 "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \
72 #ifndef BOARD_EXTRA_ENV_SETTINGS
73 #define BOARD_EXTRA_ENV_SETTINGS
76 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
78 #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
79 #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
83 #define FDT_HIGH "ffffffffffffffff"
84 #define INITRD_HIGH "ffffffffffffffff"
86 #define FDT_HIGH "ffffffff"
87 #define INITRD_HIGH "ffffffff"
90 #define CONFIG_EXTRA_ENV_SETTINGS \
91 TEGRA_DEVICE_SETTINGS \
92 MEM_LAYOUT_ENV_SETTINGS \
93 "fdt_high=" FDT_HIGH "\0" \
94 "initrd_high=" INITRD_HIGH "\0" \
96 BOARD_EXTRA_ENV_SETTINGS \
97 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
99 #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
100 #define CONFIG_TEGRA_SPI
103 /* overrides for SPL build here */
104 #ifdef CONFIG_SPL_BUILD
106 #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY
108 /* remove I2C support */
109 #ifdef CONFIG_SYS_I2C_TEGRA
110 #undef CONFIG_SYS_I2C_TEGRA
114 #ifdef CONFIG_USB_EHCI_TEGRA
115 #undef CONFIG_USB_EHCI_TEGRA
118 #endif /* CONFIG_SPL_BUILD */
120 #endif /* __TEGRA_COMMON_POST_H */