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