blob: 991ffbb7dff0827c17fe1998025c0d98f32c4a2a [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Stephen Warrenbea26742012-05-16 06:21:00 +00002/*
3 * (C) Copyright 2010-2012
4 * NVIDIA Corporation <www.nvidia.com>
Stephen Warrenbea26742012-05-16 06:21:00 +00005 */
6
Tom Warren29f3e3f2012-09-04 17:00:24 -07007#ifndef __TEGRA_COMMON_POST_H
8#define __TEGRA_COMMON_POST_H
Stephen Warrenbea26742012-05-16 06:21:00 +00009
Simon Glass93bb62a2023-02-05 15:36:46 -070010#if IS_ENABLED(CONFIG_CMD_USB)
Tom Rini3fa03bc2021-07-09 10:11:54 -040011# define BOOT_TARGET_USB(func) func(USB, usb, 0)
12#else
13# define BOOT_TARGET_USB(func)
14#endif
15
Thierry Reding147fac62019-04-15 11:32:24 +020016#ifndef BOOT_TARGET_DEVICES
Stephen Warren8dca9ff2014-07-30 16:37:15 -060017#define BOOT_TARGET_DEVICES(func) \
18 func(MMC, mmc, 1) \
19 func(MMC, mmc, 0) \
Tom Rini3fa03bc2021-07-09 10:11:54 -040020 BOOT_TARGET_USB(func) \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060021 func(PXE, pxe, na) \
22 func(DHCP, dhcp, na)
Thierry Reding147fac62019-04-15 11:32:24 +020023#endif
Stephen Warren8dca9ff2014-07-30 16:37:15 -060024#include <config_distro_bootcmd.h>
Stephen Warrenbea26742012-05-16 06:21:00 +000025
Allen Martin7992bfb2012-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 Martin7992bfb2012-10-24 08:32:05 +000034#else
35#define STDIN_KBD_USB ""
36#endif
37
Simon Glassb86986c2022-10-18 07:46:31 -060038#ifdef CONFIG_VIDEO
Simon Glass135a87e2016-01-30 16:37:49 -070039#define STDOUT_VIDEO ",vidconsole"
40#else
41#define STDOUT_VIDEO ""
42#endif
43
Simon Glassbbe0d4d2015-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 Martin7992bfb2012-10-24 08:32:05 +000050#define TEGRA_DEVICE_SETTINGS \
Simon Glassbbe0d4d2015-06-05 14:39:32 -060051 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Simon Glassbaefc722022-10-18 06:10:04 -060052 "stdout=serial" STDOUT_VIDEO "\0" \
53 "stderr=serial" STDOUT_VIDEO "\0" \
Stephen Warrenc35eb562013-01-22 06:20:07 +000054 ""
Allen Martin7992bfb2012-10-24 08:32:05 +000055
Stephen Warrenb9b53a62014-01-23 13:17:01 -070056#ifndef BOARD_EXTRA_ENV_SETTINGS
57#define BOARD_EXTRA_ENV_SETTINGS
58#endif
59
Tom Warren7aaa5a62015-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 Rini0613c362022-12-04 10:03:50 -050068#define CFG_EXTRA_ENV_SETTINGS \
Tom Warren29f3e3f2012-09-04 17:00:24 -070069 TEGRA_DEVICE_SETTINGS \
Stephen Warren938176a2012-10-02 09:26:51 +000070 MEM_LAYOUT_ENV_SETTINGS \
Tom Warren7aaa5a62015-03-04 16:36:00 -070071 "fdt_high=" FDT_HIGH "\0" \
72 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060073 BOOTENV \
Tom Rini6c3c05f2022-03-30 18:07:25 -040074 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrenbea26742012-05-16 06:21:00 +000075
Tom Warren29f3e3f2012-09-04 17:00:24 -070076#endif /* __TEGRA_COMMON_POST_H */