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 | |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 10 | /* |
| 11 | * Size of malloc() pool |
| 12 | */ |
Marek Vasut | 7f8d436 | 2018-02-16 16:41:18 +0100 | [diff] [blame] | 13 | #ifdef CONFIG_DFU_OVER_USB |
Stephen Warren | 8dc8f33 | 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 | 9d84fff | 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 | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 21 | #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 22 | |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 23 | #ifndef CONFIG_SPL_BUILD |
Thierry Reding | c3c6782 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 24 | #ifndef BOOT_TARGET_DEVICES |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 25 | #define BOOT_TARGET_DEVICES(func) \ |
| 26 | func(MMC, mmc, 1) \ |
| 27 | func(MMC, mmc, 0) \ |
| 28 | func(USB, usb, 0) \ |
| 29 | func(PXE, pxe, na) \ |
| 30 | func(DHCP, dhcp, na) |
Thierry Reding | c3c6782 | 2019-04-15 11:32:24 +0200 | [diff] [blame] | 31 | #endif |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 32 | #include <config_distro_bootcmd.h> |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 33 | #else |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 34 | #define BOOTENV |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 35 | #endif |
| 36 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 37 | #ifdef CONFIG_TEGRA_KEYBOARD |
| 38 | #define STDIN_KBD_KBC ",tegra-kbc" |
| 39 | #else |
| 40 | #define STDIN_KBD_KBC "" |
| 41 | #endif |
| 42 | |
| 43 | #ifdef CONFIG_USB_KEYBOARD |
| 44 | #define STDIN_KBD_USB ",usbkbd" |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 45 | #else |
| 46 | #define STDIN_KBD_USB "" |
| 47 | #endif |
| 48 | |
Simon Glass | ea797e5 | 2015-04-14 21:03:31 -0600 | [diff] [blame] | 49 | #ifdef CONFIG_LCD |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 50 | #define STDOUT_LCD ",lcd" |
| 51 | #else |
| 52 | #define STDOUT_LCD "" |
| 53 | #endif |
| 54 | |
Simon Glass | 3e2b2d9 | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 55 | #ifdef CONFIG_DM_VIDEO |
| 56 | #define STDOUT_VIDEO ",vidconsole" |
| 57 | #else |
| 58 | #define STDOUT_VIDEO "" |
| 59 | #endif |
| 60 | |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 61 | #ifdef CONFIG_CROS_EC_KEYB |
| 62 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 63 | #else |
| 64 | #define STDOUT_CROS_EC "" |
| 65 | #endif |
| 66 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 67 | #define TEGRA_DEVICE_SETTINGS \ |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 68 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Simon Glass | 3e2b2d9 | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 69 | "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ |
| 70 | "stderr=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 71 | "" |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 72 | |
Stephen Warren | 26b02f1 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 73 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 74 | #define BOARD_EXTRA_ENV_SETTINGS |
| 75 | #endif |
| 76 | |
Stephen Warren | f61f129 | 2015-04-01 15:40:53 -0600 | [diff] [blame] | 77 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 78 | |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 79 | #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 80 | #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 81 | #endif |
| 82 | |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 83 | #ifdef CONFIG_ARM64 |
| 84 | #define FDT_HIGH "ffffffffffffffff" |
| 85 | #define INITRD_HIGH "ffffffffffffffff" |
| 86 | #else |
| 87 | #define FDT_HIGH "ffffffff" |
| 88 | #define INITRD_HIGH "ffffffff" |
| 89 | #endif |
| 90 | |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 91 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 92 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 3530510 | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 93 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 94 | "fdt_high=" FDT_HIGH "\0" \ |
| 95 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 96 | BOOTENV \ |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 97 | BOARD_EXTRA_ENV_SETTINGS \ |
| 98 | CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 99 | |
Allen Martin | 21f5b93 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 100 | #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI) |
Simon Glass | 1121b1b | 2014-10-13 23:42:13 -0600 | [diff] [blame] | 101 | #define CONFIG_TEGRA_SPI |
Allen Martin | b98691c | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 102 | #endif |
| 103 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 104 | /* overrides for SPL build here */ |
| 105 | #ifdef CONFIG_SPL_BUILD |
| 106 | |
Simon Glass | 8e84244 | 2017-05-31 17:57:21 -0600 | [diff] [blame] | 107 | #define CONFIG_SKIP_LOWLEVEL_INIT_ONLY |
Axel Lin | 53e512a | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 108 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 109 | /* remove I2C support */ |
Simon Glass | 026fefb | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 110 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 111 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 112 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 113 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 114 | /* remove USB */ |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 115 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 116 | #undef CONFIG_USB_EHCI_TEGRA |
| 117 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 118 | |
| 119 | #endif /* CONFIG_SPL_BUILD */ |
| 120 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 121 | #endif /* __TEGRA_COMMON_POST_H */ |