Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2010-2012 |
| 3 | * NVIDIA Corporation <www.nvidia.com> |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 8 | #ifndef __TEGRA_COMMON_POST_H |
| 9 | #define __TEGRA_COMMON_POST_H |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 10 | |
Stephen Warren | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 11 | /* |
| 12 | * Size of malloc() pool |
| 13 | */ |
| 14 | #ifdef CONFIG_USB_FUNCTION_DFU |
Stephen Warren | f69d72e | 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 | 99d9696 | 2015-09-04 22:03:48 -0600 | [diff] [blame] | 18 | #else |
| 19 | #define CONFIG_SYS_MALLOC_LEN (4 << 20) /* 4MB */ |
| 20 | #endif |
| 21 | |
| 22 | #ifndef CONFIG_ARM64 |
| 23 | #define CONFIG_SYS_NONCACHED_MEMORY (1 << 20) /* 1 MiB */ |
| 24 | #endif |
| 25 | |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 26 | #ifndef CONFIG_SPL_BUILD |
| 27 | #define BOOT_TARGET_DEVICES(func) \ |
| 28 | func(MMC, mmc, 1) \ |
| 29 | func(MMC, mmc, 0) \ |
| 30 | func(USB, usb, 0) \ |
| 31 | func(PXE, pxe, na) \ |
| 32 | func(DHCP, dhcp, na) |
| 33 | #include <config_distro_bootcmd.h> |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 34 | #else |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 35 | #define BOOTENV |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 36 | #endif |
| 37 | |
Allen Martin | 7992bfb | 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" |
| 46 | #define CONFIG_SYS_USB_EVENT_POLL |
| 47 | #define CONFIG_PREBOOT "usb start" |
| 48 | #else |
| 49 | #define STDIN_KBD_USB "" |
| 50 | #endif |
| 51 | |
Simon Glass | ec022ef | 2015-04-14 21:03:31 -0600 | [diff] [blame] | 52 | #ifdef CONFIG_LCD |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 53 | #define STDOUT_LCD ",lcd" |
| 54 | #else |
| 55 | #define STDOUT_LCD "" |
| 56 | #endif |
| 57 | |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 58 | #ifdef CONFIG_CROS_EC_KEYB |
| 59 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 60 | #else |
| 61 | #define STDOUT_CROS_EC "" |
| 62 | #endif |
| 63 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 64 | #define TEGRA_DEVICE_SETTINGS \ |
Simon Glass | bbe0d4d | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 65 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 66 | "stdout=serial" STDOUT_LCD "\0" \ |
| 67 | "stderr=serial" STDOUT_LCD "\0" \ |
| 68 | "" |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 69 | |
Stephen Warren | b9b53a6 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 70 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 71 | #define BOARD_EXTRA_ENV_SETTINGS |
| 72 | #endif |
| 73 | |
Stephen Warren | 48cfca2 | 2015-04-01 15:40:53 -0600 | [diff] [blame] | 74 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 75 | |
Simon Glass | e379b03 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 76 | #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 77 | #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 78 | #endif |
| 79 | |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 80 | #ifdef CONFIG_ARM64 |
| 81 | #define FDT_HIGH "ffffffffffffffff" |
| 82 | #define INITRD_HIGH "ffffffffffffffff" |
| 83 | #else |
| 84 | #define FDT_HIGH "ffffffff" |
| 85 | #define INITRD_HIGH "ffffffff" |
| 86 | #endif |
| 87 | |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 88 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 89 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 938176a | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 90 | MEM_LAYOUT_ENV_SETTINGS \ |
Tom Warren | 7aaa5a6 | 2015-03-04 16:36:00 -0700 | [diff] [blame] | 91 | "fdt_high=" FDT_HIGH "\0" \ |
| 92 | "initrd_high=" INITRD_HIGH "\0" \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 93 | BOOTENV \ |
Simon Glass | e379b03 | 2015-06-05 14:39:44 -0600 | [diff] [blame] | 94 | BOARD_EXTRA_ENV_SETTINGS \ |
| 95 | CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 96 | |
Allen Martin | 77c42e8 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 97 | #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] | 98 | #define CONFIG_TEGRA_SPI |
Allen Martin | 78f47b7 | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 99 | #endif |
| 100 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 101 | /* overrides for SPL build here */ |
| 102 | #ifdef CONFIG_SPL_BUILD |
| 103 | |
Axel Lin | 60985bb | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 104 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 105 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 106 | /* remove I2C support */ |
Simon Glass | 1f2ba72 | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 107 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 108 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 109 | #endif |
| 110 | #ifdef CONFIG_CMD_I2C |
| 111 | #undef CONFIG_CMD_I2C |
| 112 | #endif |
| 113 | |
| 114 | /* remove MMC support */ |
| 115 | #ifdef CONFIG_MMC |
| 116 | #undef CONFIG_MMC |
| 117 | #endif |
| 118 | #ifdef CONFIG_GENERIC_MMC |
| 119 | #undef CONFIG_GENERIC_MMC |
| 120 | #endif |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 121 | #ifdef CONFIG_TEGRA_MMC |
| 122 | #undef CONFIG_TEGRA_MMC |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 123 | #endif |
| 124 | #ifdef CONFIG_CMD_MMC |
| 125 | #undef CONFIG_CMD_MMC |
| 126 | #endif |
| 127 | |
| 128 | /* remove partitions/filesystems */ |
| 129 | #ifdef CONFIG_DOS_PARTITION |
| 130 | #undef CONFIG_DOS_PARTITION |
| 131 | #endif |
| 132 | #ifdef CONFIG_EFI_PARTITION |
| 133 | #undef CONFIG_EFI_PARTITION |
| 134 | #endif |
Stephen Warren | 3786a94 | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 135 | #ifdef CONFIG_CMD_FS_GENERIC |
| 136 | #undef CONFIG_CMD_FS_GENERIC |
| 137 | #endif |
| 138 | #ifdef CONFIG_CMD_EXT4 |
| 139 | #undef CONFIG_CMD_EXT4 |
| 140 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 141 | #ifdef CONFIG_CMD_EXT2 |
| 142 | #undef CONFIG_CMD_EXT2 |
| 143 | #endif |
| 144 | #ifdef CONFIG_CMD_FAT |
| 145 | #undef CONFIG_CMD_FAT |
| 146 | #endif |
Stephen Warren | 3786a94 | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 147 | #ifdef CONFIG_FS_EXT4 |
| 148 | #undef CONFIG_FS_EXT4 |
| 149 | #endif |
| 150 | #ifdef CONFIG_FS_FAT |
| 151 | #undef CONFIG_FS_FAT |
| 152 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 153 | |
| 154 | /* remove USB */ |
| 155 | #ifdef CONFIG_USB_EHCI |
| 156 | #undef CONFIG_USB_EHCI |
| 157 | #endif |
| 158 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 159 | #undef CONFIG_USB_EHCI_TEGRA |
| 160 | #endif |
| 161 | #ifdef CONFIG_USB_STORAGE |
| 162 | #undef CONFIG_USB_STORAGE |
| 163 | #endif |
| 164 | #ifdef CONFIG_CMD_USB |
| 165 | #undef CONFIG_CMD_USB |
| 166 | #endif |
| 167 | |
Stephen Warren | 01ca286 | 2012-09-25 13:32:26 +0000 | [diff] [blame] | 168 | /* remove part command support */ |
| 169 | #ifdef CONFIG_PARTITION_UUIDS |
| 170 | #undef CONFIG_PARTITION_UUIDS |
| 171 | #endif |
| 172 | |
| 173 | #ifdef CONFIG_CMD_PART |
| 174 | #undef CONFIG_CMD_PART |
| 175 | #endif |
| 176 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 177 | #endif /* CONFIG_SPL_BUILD */ |
| 178 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 179 | #endif /* __TEGRA_COMMON_POST_H */ |