Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2010-2012 |
| 4 | * NVIDIA Corporation <www.nvidia.com> |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 7 | #ifndef __TEGRA_COMMON_POST_H |
| 8 | #define __TEGRA_COMMON_POST_H |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 9 | |
Simon Glass | 93bb62a | 2023-02-05 15:36:46 -0700 | [diff] [blame] | 10 | #if IS_ENABLED(CONFIG_CMD_USB) |
Tom Rini | 3fa03bc | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 11 | # define BOOT_TARGET_USB(func) func(USB, usb, 0) |
| 12 | #else |
| 13 | # define BOOT_TARGET_USB(func) |
| 14 | #endif |
| 15 | |
Thierry Reding | 147fac6 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 16 | #ifndef BOOT_TARGET_DEVICES |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 17 | #define BOOT_TARGET_DEVICES(func) \ |
| 18 | func(MMC, mmc, 1) \ |
| 19 | func(MMC, mmc, 0) \ |
Tom Rini | 3fa03bc | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 20 | BOOT_TARGET_USB(func) \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 21 | func(PXE, pxe, na) \ |
| 22 | func(DHCP, dhcp, na) |
Thierry Reding | 147fac6 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 23 | #endif |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 24 | #include <config_distro_bootcmd.h> |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 25 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 26 | #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 Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 34 | #else |
| 35 | #define STDIN_KBD_USB "" |
| 36 | #endif |
| 37 | |
Simon Glass | b86986c | 2022-10-18 07:46:31 -0600 | [diff] [blame] | 38 | #ifdef CONFIG_VIDEO |
Simon Glass | 135a87e | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 39 | #define STDOUT_VIDEO ",vidconsole" |
| 40 | #else |
| 41 | #define STDOUT_VIDEO "" |
| 42 | #endif |
| 43 | |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 44 | #ifdef CONFIG_CROS_EC_KEYB |
| 45 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 46 | #else |
| 47 | #define STDOUT_CROS_EC "" |
| 48 | #endif |
| 49 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 50 | #define TEGRA_DEVICE_SETTINGS \ |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 51 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Simon Glass | baefc72 | 2022-10-18 06:10:04 -0600 | [diff] [blame] | 52 | "stdout=serial" STDOUT_VIDEO "\0" \ |
| 53 | "stderr=serial" STDOUT_VIDEO "\0" \ |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 54 | "" |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 55 | |
Stephen Warren | b9b53a6 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 56 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 57 | #define BOARD_EXTRA_ENV_SETTINGS |
| 58 | #endif |
| 59 | |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 60 | #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 Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 68 | #define CFG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 69 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 938176a | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 70 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 71 | "fdt_high=" FDT_HIGH "\0" \ |
| 72 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 73 | BOOTENV \ |
Tom Rini | 6c3c05f | 2022-03-30 18:07:25 -0400 | [diff] [blame] | 74 | BOARD_EXTRA_ENV_SETTINGS |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 75 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 76 | #endif /* __TEGRA_COMMON_POST_H */ |