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 | |
Stephen Warren | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 10 | /* |
| 11 | * Size of malloc() pool |
| 12 | */ |
Marek Vasut | bb4059a | 2018-02-16 16:41:18 +0100 | [diff] [blame] | 13 | #ifdef CONFIG_DFU_OVER_USB |
Stephen Warren | f69d72e | 2015-09-04 22:03:49 -0600 | [diff] [blame] | 14 | #define CONFIG_SYS_MALLOC_LEN (SZ_4M + \ |
| 15 | CONFIG_SYS_DFU_DATA_BUF_SIZE + \ |
| 16 | CONFIG_SYS_DFU_MAX_FILE_SIZE) |
Stephen Warren | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 17 | #else |
| 18 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */ |
| 19 | #endif |
| 20 | |
Stephen Warren | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 21 | #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ |
Stephen Warren | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 22 | |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 23 | #ifndef CONFIG_SPL_BUILD |
Tom Rini | 3fa03bc | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 24 | |
| 25 | #if CONFIG_IS_ENABLED(CMD_USB) |
| 26 | # define BOOT_TARGET_USB(func) func(USB, usb, 0) |
| 27 | #else |
| 28 | # define BOOT_TARGET_USB(func) |
| 29 | #endif |
| 30 | |
Thierry Reding | 147fac6 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 31 | #ifndef BOOT_TARGET_DEVICES |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 32 | #define BOOT_TARGET_DEVICES(func) \ |
| 33 | func(MMC, mmc, 1) \ |
| 34 | func(MMC, mmc, 0) \ |
Tom Rini | 3fa03bc | 2021-07-09 10:11:54 -0400 | [diff] [blame] | 35 | BOOT_TARGET_USB(func) \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 36 | func(PXE, pxe, na) \ |
| 37 | func(DHCP, dhcp, na) |
Thierry Reding | 147fac6 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 38 | #endif |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 39 | #include <config_distro_bootcmd.h> |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 40 | #else |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 41 | #define BOOTENV |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 42 | #endif |
| 43 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 44 | #ifdef CONFIG_TEGRA_KEYBOARD |
| 45 | #define STDIN_KBD_KBC ",tegra-kbc" |
| 46 | #else |
| 47 | #define STDIN_KBD_KBC "" |
| 48 | #endif |
| 49 | |
| 50 | #ifdef CONFIG_USB_KEYBOARD |
| 51 | #define STDIN_KBD_USB ",usbkbd" |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 52 | #else |
| 53 | #define STDIN_KBD_USB "" |
| 54 | #endif |
| 55 | |
Simon Glass | ec022ef | 2015-04-14 21:03:31 -0600 | [diff] [blame] | 56 | #ifdef CONFIG_LCD |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 57 | #define STDOUT_LCD ",lcd" |
| 58 | #else |
| 59 | #define STDOUT_LCD "" |
| 60 | #endif |
| 61 | |
Simon Glass | 135a87e | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 62 | #ifdef CONFIG_DM_VIDEO |
| 63 | #define STDOUT_VIDEO ",vidconsole" |
| 64 | #else |
| 65 | #define STDOUT_VIDEO "" |
| 66 | #endif |
| 67 | |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 68 | #ifdef CONFIG_CROS_EC_KEYB |
| 69 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 70 | #else |
| 71 | #define STDOUT_CROS_EC "" |
| 72 | #endif |
| 73 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 74 | #define TEGRA_DEVICE_SETTINGS \ |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 75 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Simon Glass | 135a87e | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 76 | "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ |
| 77 | "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 78 | "" |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 79 | |
Stephen Warren | b9b53a6 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 80 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 81 | #define BOARD_EXTRA_ENV_SETTINGS |
| 82 | #endif |
| 83 | |
Stephen Warren | 48cfca2 | 2015-04-01 15:40:53 -0600 | [diff] [blame] | 84 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 85 | |
Simon Glass | e379b03 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 86 | #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 87 | #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 88 | #endif |
| 89 | |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 90 | #ifdef CONFIG_ARM64 |
| 91 | #define FDT_HIGH "ffffffffffffffff" |
| 92 | #define INITRD_HIGH "ffffffffffffffff" |
| 93 | #else |
| 94 | #define FDT_HIGH "ffffffff" |
| 95 | #define INITRD_HIGH "ffffffff" |
| 96 | #endif |
| 97 | |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 98 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 99 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 938176a | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 100 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 101 | "fdt_high=" FDT_HIGH "\0" \ |
| 102 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 103 | BOOTENV \ |
Simon Glass | e379b03 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 104 | BOARD_EXTRA_ENV_SETTINGS \ |
| 105 | CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 106 | |
Allen Martin | 77c42e8 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 107 | #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI) |
Simon Glass | fda6fac | 2014-10-13 23:42:13 -0600 | [diff] [blame] | 108 | #define CONFIG_TEGRA_SPI |
Allen Martin | 78f47b7 | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 109 | #endif |
| 110 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 111 | /* overrides for SPL build here */ |
| 112 | #ifdef CONFIG_SPL_BUILD |
| 113 | |
Simon Glass | 06cc85a | 2017-05-31 17:57:21 -0600 | [diff] [blame] | 114 | #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY |
Axel Lin | 60985bb | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 115 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 116 | /* remove I2C support */ |
Simon Glass | 1f2ba72 | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 117 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 118 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 119 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 120 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 121 | /* remove USB */ |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 122 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 123 | #undef CONFIG_USB_EHCI_TEGRA |
| 124 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 125 | |
| 126 | #endif /* CONFIG_SPL_BUILD */ |
| 127 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 128 | #endif /* __TEGRA_COMMON_POST_H */ |