Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010-2012 |
| 3 | * NVIDIA Corporation <www.nvidia.com> |
| 4 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 8 | #ifndef __TEGRA_COMMON_POST_H |
| 9 | #define __TEGRA_COMMON_POST_H |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 10 | |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 11 | /* |
| 12 | * Size of malloc() pool |
| 13 | */ |
| 14 | #ifdef CONFIG_USB_FUNCTION_DFU |
Stephen Warren | 8dc8f33 | 2015-09-04 22:03:49 -0600 | [diff] [blame] | 15 | #define CONFIG_SYS_MALLOC_LEN (SZ_4M + \ |
| 16 | CONFIG_SYS_DFU_DATA_BUF_SIZE + \ |
| 17 | CONFIG_SYS_DFU_MAX_FILE_SIZE) |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 18 | #else |
| 19 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */ |
| 20 | #endif |
| 21 | |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 22 | #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ |
Stephen Warren | 9d84fff | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 23 | |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 24 | #ifndef CONFIG_SPL_BUILD |
| 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) |
| 31 | #include <config_distro_bootcmd.h> |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 32 | #else |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 33 | #define BOOTENV |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 34 | #endif |
| 35 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 36 | #ifdef CONFIG_TEGRA_KEYBOARD |
| 37 | #define STDIN_KBD_KBC ",tegra-kbc" |
| 38 | #else |
| 39 | #define STDIN_KBD_KBC "" |
| 40 | #endif |
| 41 | |
| 42 | #ifdef CONFIG_USB_KEYBOARD |
| 43 | #define STDIN_KBD_USB ",usbkbd" |
| 44 | #define CONFIG_SYS_USB_EVENT_POLL |
| 45 | #define CONFIG_PREBOOT "usb start" |
| 46 | #else |
| 47 | #define STDIN_KBD_USB "" |
| 48 | #endif |
| 49 | |
Simon Glass | ea797e5 | 2015-04-14 21:03:31 -0600 | [diff] [blame] | 50 | #ifdef CONFIG_LCD |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 51 | #define STDOUT_LCD ",lcd" |
| 52 | #else |
| 53 | #define STDOUT_LCD "" |
| 54 | #endif |
| 55 | |
Simon Glass | 3e2b2d9 | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 56 | #ifdef CONFIG_DM_VIDEO |
| 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 \ |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 69 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Simon Glass | 3e2b2d9 | 2016-01-30 16:37:49 -0700 | [diff] [blame] | 70 | "stdout=serial" STDOUT_LCD STDOUT_VIDEO "\0" \ |
| 71 | "stderr=serial" STDOUT_LCD 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 | |
Stephen Warren | f61f129 | 2015-04-01 15:40:53 -0600 | [diff] [blame] | 78 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 79 | |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 80 | #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 81 | #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 82 | #endif |
| 83 | |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 84 | #ifdef CONFIG_ARM64 |
| 85 | #define FDT_HIGH "ffffffffffffffff" |
| 86 | #define INITRD_HIGH "ffffffffffffffff" |
| 87 | #else |
| 88 | #define FDT_HIGH "ffffffff" |
| 89 | #define INITRD_HIGH "ffffffff" |
| 90 | #endif |
| 91 | |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 92 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 93 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 3530510 | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 94 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | ab0cc6b | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 95 | "fdt_high=" FDT_HIGH "\0" \ |
| 96 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 97 | BOOTENV \ |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 98 | BOARD_EXTRA_ENV_SETTINGS \ |
| 99 | CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 100 | |
Allen Martin | 21f5b93 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 101 | #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] | 102 | #define CONFIG_TEGRA_SPI |
Allen Martin | b98691c | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 103 | #endif |
| 104 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 105 | /* overrides for SPL build here */ |
| 106 | #ifdef CONFIG_SPL_BUILD |
| 107 | |
Axel Lin | 53e512a | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 108 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 109 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 110 | /* remove I2C support */ |
Simon Glass | 026fefb | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 111 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 112 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 113 | #endif |
| 114 | #ifdef CONFIG_CMD_I2C |
| 115 | #undef CONFIG_CMD_I2C |
| 116 | #endif |
| 117 | |
| 118 | /* remove MMC support */ |
| 119 | #ifdef CONFIG_MMC |
| 120 | #undef CONFIG_MMC |
| 121 | #endif |
| 122 | #ifdef CONFIG_GENERIC_MMC |
| 123 | #undef CONFIG_GENERIC_MMC |
| 124 | #endif |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 125 | #ifdef CONFIG_TEGRA_MMC |
| 126 | #undef CONFIG_TEGRA_MMC |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 127 | #endif |
| 128 | #ifdef CONFIG_CMD_MMC |
| 129 | #undef CONFIG_CMD_MMC |
| 130 | #endif |
| 131 | |
| 132 | /* remove partitions/filesystems */ |
| 133 | #ifdef CONFIG_DOS_PARTITION |
| 134 | #undef CONFIG_DOS_PARTITION |
| 135 | #endif |
| 136 | #ifdef CONFIG_EFI_PARTITION |
| 137 | #undef CONFIG_EFI_PARTITION |
| 138 | #endif |
Stephen Warren | 480860c | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 139 | #ifdef CONFIG_CMD_FS_GENERIC |
| 140 | #undef CONFIG_CMD_FS_GENERIC |
| 141 | #endif |
| 142 | #ifdef CONFIG_CMD_EXT4 |
| 143 | #undef CONFIG_CMD_EXT4 |
| 144 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 145 | #ifdef CONFIG_CMD_EXT2 |
| 146 | #undef CONFIG_CMD_EXT2 |
| 147 | #endif |
| 148 | #ifdef CONFIG_CMD_FAT |
| 149 | #undef CONFIG_CMD_FAT |
| 150 | #endif |
Stephen Warren | 480860c | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 151 | #ifdef CONFIG_FS_EXT4 |
| 152 | #undef CONFIG_FS_EXT4 |
| 153 | #endif |
| 154 | #ifdef CONFIG_FS_FAT |
| 155 | #undef CONFIG_FS_FAT |
| 156 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 157 | |
| 158 | /* remove USB */ |
| 159 | #ifdef CONFIG_USB_EHCI |
| 160 | #undef CONFIG_USB_EHCI |
| 161 | #endif |
| 162 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 163 | #undef CONFIG_USB_EHCI_TEGRA |
| 164 | #endif |
| 165 | #ifdef CONFIG_USB_STORAGE |
| 166 | #undef CONFIG_USB_STORAGE |
| 167 | #endif |
| 168 | #ifdef CONFIG_CMD_USB |
| 169 | #undef CONFIG_CMD_USB |
| 170 | #endif |
| 171 | |
Stephen Warren | 91623dd | 2012-09-25 13:32:26 +0000 | [diff] [blame] | 172 | /* remove part command support */ |
| 173 | #ifdef CONFIG_PARTITION_UUIDS |
| 174 | #undef CONFIG_PARTITION_UUIDS |
| 175 | #endif |
| 176 | |
| 177 | #ifdef CONFIG_CMD_PART |
| 178 | #undef CONFIG_CMD_PART |
| 179 | #endif |
| 180 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 181 | #endif /* CONFIG_SPL_BUILD */ |
| 182 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 183 | #endif /* __TEGRA_COMMON_POST_H */ |