Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2010-2012 |
| 4 | * NVIDIA Corporation <www.nvidia.com> |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 7 | #ifndef __TEGRA_COMMON_POST_H |
| 8 | #define __TEGRA_COMMON_POST_H |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 9 | |
Simon Glass | 5ca5dd5 | 2023-02-05 15:36:46 -0700 | [diff] [blame] | 10 | #if IS_ENABLED(CONFIG_CMD_USB) |
Jonas Schwöbel | 3b0b129 | 2023-06-30 10:29:01 +0300 | [diff] [blame] | 11 | #define BOOT_TARGET_USB(func) func(USB, usb, 0) |
Tom Rini | b4ab8a0 | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 12 | #else |
Jonas Schwöbel | 3b0b129 | 2023-06-30 10:29:01 +0300 | [diff] [blame] | 13 | #define BOOT_TARGET_USB(func) |
Tom Rini | b4ab8a0 | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 14 | #endif |
| 15 | |
Jonas Schwöbel | 3b0b129 | 2023-06-30 10:29:01 +0300 | [diff] [blame] | 16 | #if CONFIG_IS_ENABLED(CMD_DHCP) && CONFIG_IS_ENABLED(CMD_PXE) |
| 17 | #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) |
| 18 | #else |
| 19 | #define BOOT_TARGET_PXE(func) |
| 20 | #endif |
| 21 | |
| 22 | #if CONFIG_IS_ENABLED(CMD_DHCP) |
| 23 | #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) |
| 24 | #else |
| 25 | #define BOOT_TARGET_DHCP(func) |
| 26 | #endif |
| 27 | |
Thierry Reding | c3c6782 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 28 | #ifndef BOOT_TARGET_DEVICES |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 29 | #define BOOT_TARGET_DEVICES(func) \ |
| 30 | func(MMC, mmc, 1) \ |
| 31 | func(MMC, mmc, 0) \ |
Tom Rini | b4ab8a0 | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 32 | BOOT_TARGET_USB(func) \ |
Jonas Schwöbel | 3b0b129 | 2023-06-30 10:29:01 +0300 | [diff] [blame] | 33 | BOOT_TARGET_PXE(func) \ |
| 34 | BOOT_TARGET_DHCP(func) |
Thierry Reding | c3c6782 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 35 | #endif |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 36 | #include <config_distro_bootcmd.h> |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 37 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 38 | #ifdef CONFIG_TEGRA_KEYBOARD |
| 39 | #define STDIN_KBD_KBC ",tegra-kbc" |
| 40 | #else |
| 41 | #define STDIN_KBD_KBC "" |
| 42 | #endif |
| 43 | |
| 44 | #ifdef CONFIG_USB_KEYBOARD |
| 45 | #define STDIN_KBD_USB ",usbkbd" |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 46 | #else |
| 47 | #define STDIN_KBD_USB "" |
| 48 | #endif |
| 49 | |
Svyatoslav Ryhel | 2c04e52 | 2023-06-30 10:29:00 +0300 | [diff] [blame] | 50 | #ifdef CONFIG_BUTTON_KEYBOARD |
| 51 | #define STDIN_BTN_KBD ",button-kbd" |
| 52 | #else |
| 53 | #define STDIN_BTN_KBD "" |
| 54 | #endif |
| 55 | |
Simon Glass | 52cb504 | 2022-10-18 07:46:31 -0600 | [diff] [blame] | 56 | #ifdef CONFIG_VIDEO |
Simon Glass | 3e2b2d9 | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 57 | #define STDOUT_VIDEO ",vidconsole" |
| 58 | #else |
| 59 | #define STDOUT_VIDEO "" |
| 60 | #endif |
| 61 | |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 62 | #ifdef CONFIG_CROS_EC_KEYB |
| 63 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 64 | #else |
| 65 | #define STDOUT_CROS_EC "" |
| 66 | #endif |
| 67 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 68 | #define TEGRA_DEVICE_SETTINGS \ |
Svyatoslav Ryhel | 2c04e52 | 2023-06-30 10:29:00 +0300 | [diff] [blame] | 69 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC STDIN_BTN_KBD "\0" \ |
Simon Glass | c162e02 | 2022-10-18 06:10:04 -0600 | [diff] [blame] | 70 | "stdout=serial" STDOUT_VIDEO "\0" \ |
| 71 | "stderr=serial" STDOUT_VIDEO "\0" \ |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 72 | "" |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 73 | |
Stephen Warren | 26b02f1 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 74 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 75 | #define BOARD_EXTRA_ENV_SETTINGS |
| 76 | #endif |
| 77 | |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 78 | #ifdef CONFIG_ARM64 |
| 79 | #define FDT_HIGH "ffffffffffffffff" |
| 80 | #define INITRD_HIGH "ffffffffffffffff" |
| 81 | #else |
| 82 | #define FDT_HIGH "ffffffff" |
| 83 | #define INITRD_HIGH "ffffffff" |
| 84 | #endif |
| 85 | |
Tom Rini | c9edebe | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 86 | #define CFG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 87 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 3530510 | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 88 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 89 | "fdt_high=" FDT_HIGH "\0" \ |
| 90 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 91 | BOOTENV \ |
Tom Rini | 23581a6 | 2022-03-30 18:07:25 -0400 | [diff] [blame] | 92 | BOARD_EXTRA_ENV_SETTINGS |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 93 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 94 | #endif /* __TEGRA_COMMON_POST_H */ |