blob: 0fdb5a81605d180dfef9429327ac2b22254a2ef7 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stephen Warrende17c292012-05-16 06:21:00 +00002/*
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
Stephen Warrende17c292012-05-16 06:21:00 +00005 */
6
Tom Warren22562a42012-09-04 17:00:24 -07007#ifndef __TEGRA_COMMON_POST_H
8#define __TEGRA_COMMON_POST_H
Stephen Warrende17c292012-05-16 06:21:00 +00009
Tom Rinib4ab8a02021-07-09 10:11:54 -040010#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
Thierry Redingc3c67822019-04-15 11:32:24 +020016#ifndef BOOT_TARGET_DEVICES
Stephen Warren5c30d752014-07-30 16:37:15 -060017#define BOOT_TARGET_DEVICES(func) \
18 func(MMC, mmc, 1) \
19 func(MMC, mmc, 0) \
Tom Rinib4ab8a02021-07-09 10:11:54 -040020 BOOT_TARGET_USB(func) \
Stephen Warren5c30d752014-07-30 16:37:15 -060021 func(PXE, pxe, na) \
22 func(DHCP, dhcp, na)
Thierry Redingc3c67822019-04-15 11:32:24 +020023#endif
Stephen Warren5c30d752014-07-30 16:37:15 -060024#include <config_distro_bootcmd.h>
Stephen Warrende17c292012-05-16 06:21:00 +000025
Allen Martin50df8702012-10-24 08:32:05 +000026#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"
Allen Martin50df8702012-10-24 08:32:05 +000034#else
35#define STDIN_KBD_USB ""
36#endif
37
Simon Glass52cb5042022-10-18 07:46:31 -060038#ifdef CONFIG_VIDEO
Simon Glass3e2b2d92016-01-30 16:37:49 -070039#define STDOUT_VIDEO ",vidconsole"
40#else
41#define STDOUT_VIDEO ""
42#endif
43
Simon Glass576e45c2015-06-05 14:39:32 -060044#ifdef CONFIG_CROS_EC_KEYB
45#define STDOUT_CROS_EC ",cros-ec-keyb"
46#else
47#define STDOUT_CROS_EC ""
48#endif
49
Allen Martin50df8702012-10-24 08:32:05 +000050#define TEGRA_DEVICE_SETTINGS \
Simon Glass576e45c2015-06-05 14:39:32 -060051 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Simon Glassc162e022022-10-18 06:10:04 -060052 "stdout=serial" STDOUT_VIDEO "\0" \
53 "stderr=serial" STDOUT_VIDEO "\0" \
Stephen Warren3f264792013-01-22 06:20:07 +000054 ""
Allen Martin50df8702012-10-24 08:32:05 +000055
Stephen Warren26b02f12014-01-23 13:17:01 -070056#ifndef BOARD_EXTRA_ENV_SETTINGS
57#define BOARD_EXTRA_ENV_SETTINGS
58#endif
59
Tom Warrenab0cc6b2015-03-04 16:36:00 -070060#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
Tom Rinic9edebe2022-12-04 10:03:50 -050068#define CFG_EXTRA_ENV_SETTINGS \
Tom Warren22562a42012-09-04 17:00:24 -070069 TEGRA_DEVICE_SETTINGS \
Stephen Warren35305102012-10-02 09:26:51 +000070 MEM_LAYOUT_ENV_SETTINGS \
Tom Warrenab0cc6b2015-03-04 16:36:00 -070071 "fdt_high=" FDT_HIGH "\0" \
72 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren5c30d752014-07-30 16:37:15 -060073 BOOTENV \
Tom Rini23581a62022-03-30 18:07:25 -040074 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrende17c292012-05-16 06:21:00 +000075
Tom Warren22562a42012-09-04 17:00:24 -070076#endif /* __TEGRA_COMMON_POST_H */