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 | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 11 | #ifndef CONFIG_SPL_BUILD |
| 12 | #define BOOT_TARGET_DEVICES(func) \ |
| 13 | func(MMC, mmc, 1) \ |
| 14 | func(MMC, mmc, 0) \ |
| 15 | func(USB, usb, 0) \ |
| 16 | func(PXE, pxe, na) \ |
| 17 | func(DHCP, dhcp, na) |
| 18 | #include <config_distro_bootcmd.h> |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 19 | #else |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 20 | #define BOOTENV |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 21 | #endif |
| 22 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 23 | #ifdef CONFIG_TEGRA_KEYBOARD |
| 24 | #define STDIN_KBD_KBC ",tegra-kbc" |
| 25 | #else |
| 26 | #define STDIN_KBD_KBC "" |
| 27 | #endif |
| 28 | |
| 29 | #ifdef CONFIG_USB_KEYBOARD |
| 30 | #define STDIN_KBD_USB ",usbkbd" |
| 31 | #define CONFIG_SYS_USB_EVENT_POLL |
| 32 | #define CONFIG_PREBOOT "usb start" |
| 33 | #else |
| 34 | #define STDIN_KBD_USB "" |
| 35 | #endif |
| 36 | |
Simon Glass | ea797e5 | 2015-04-14 21:03:31 -0600 | [diff] [blame] | 37 | #ifdef CONFIG_LCD |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 38 | #define STDOUT_LCD ",lcd" |
| 39 | #else |
| 40 | #define STDOUT_LCD "" |
| 41 | #endif |
| 42 | |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 43 | #ifdef CONFIG_CROS_EC_KEYB |
| 44 | #define STDOUT_CROS_EC ",cros-ec-keyb" |
| 45 | #else |
| 46 | #define STDOUT_CROS_EC "" |
| 47 | #endif |
| 48 | |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 49 | #define TEGRA_DEVICE_SETTINGS \ |
Simon Glass | 576e45c | 2015-06-05 14:39:32 -0600 | [diff] [blame] | 50 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \ |
Stephen Warren | 3f26479 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 51 | "stdout=serial" STDOUT_LCD "\0" \ |
| 52 | "stderr=serial" STDOUT_LCD "\0" \ |
| 53 | "" |
Allen Martin | 50df870 | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 54 | |
Stephen Warren | 26b02f1 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 55 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 56 | #define BOARD_EXTRA_ENV_SETTINGS |
| 57 | #endif |
| 58 | |
Stephen Warren | f61f129 | 2015-04-01 15:40:53 -0600 | [diff] [blame] | 59 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR |
| 60 | |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame^] | 61 | #ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 62 | #define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
| 63 | #endif |
| 64 | |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 65 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 66 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 3530510 | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 67 | MEM_LAYOUT_ENV_SETTINGS \ |
Stephen Warren | 8b75e98 | 2014-06-19 10:52:59 -0600 | [diff] [blame] | 68 | "fdt_high=ffffffff\0" \ |
| 69 | "initrd_high=ffffffff\0" \ |
Stephen Warren | 5c30d75 | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 70 | BOOTENV \ |
Simon Glass | 4a9dd32 | 2015-06-05 14:39:44 -0600 | [diff] [blame^] | 71 | BOARD_EXTRA_ENV_SETTINGS \ |
| 72 | CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS |
Stephen Warren | de17c29 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 73 | |
Allen Martin | 21f5b93 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 74 | #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] | 75 | #define CONFIG_TEGRA_SPI |
Allen Martin | b98691c | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 76 | #endif |
| 77 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 78 | /* overrides for SPL build here */ |
| 79 | #ifdef CONFIG_SPL_BUILD |
| 80 | |
Axel Lin | 53e512a | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 81 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 82 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 83 | /* remove I2C support */ |
Simon Glass | 026fefb | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 84 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 85 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 86 | #endif |
| 87 | #ifdef CONFIG_CMD_I2C |
| 88 | #undef CONFIG_CMD_I2C |
| 89 | #endif |
| 90 | |
| 91 | /* remove MMC support */ |
| 92 | #ifdef CONFIG_MMC |
| 93 | #undef CONFIG_MMC |
| 94 | #endif |
| 95 | #ifdef CONFIG_GENERIC_MMC |
| 96 | #undef CONFIG_GENERIC_MMC |
| 97 | #endif |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 98 | #ifdef CONFIG_TEGRA_MMC |
| 99 | #undef CONFIG_TEGRA_MMC |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 100 | #endif |
| 101 | #ifdef CONFIG_CMD_MMC |
| 102 | #undef CONFIG_CMD_MMC |
| 103 | #endif |
| 104 | |
| 105 | /* remove partitions/filesystems */ |
| 106 | #ifdef CONFIG_DOS_PARTITION |
| 107 | #undef CONFIG_DOS_PARTITION |
| 108 | #endif |
| 109 | #ifdef CONFIG_EFI_PARTITION |
| 110 | #undef CONFIG_EFI_PARTITION |
| 111 | #endif |
Stephen Warren | 480860c | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 112 | #ifdef CONFIG_CMD_FS_GENERIC |
| 113 | #undef CONFIG_CMD_FS_GENERIC |
| 114 | #endif |
| 115 | #ifdef CONFIG_CMD_EXT4 |
| 116 | #undef CONFIG_CMD_EXT4 |
| 117 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 118 | #ifdef CONFIG_CMD_EXT2 |
| 119 | #undef CONFIG_CMD_EXT2 |
| 120 | #endif |
| 121 | #ifdef CONFIG_CMD_FAT |
| 122 | #undef CONFIG_CMD_FAT |
| 123 | #endif |
Stephen Warren | 480860c | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 124 | #ifdef CONFIG_FS_EXT4 |
| 125 | #undef CONFIG_FS_EXT4 |
| 126 | #endif |
| 127 | #ifdef CONFIG_FS_FAT |
| 128 | #undef CONFIG_FS_FAT |
| 129 | #endif |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 130 | |
| 131 | /* remove USB */ |
| 132 | #ifdef CONFIG_USB_EHCI |
| 133 | #undef CONFIG_USB_EHCI |
| 134 | #endif |
| 135 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 136 | #undef CONFIG_USB_EHCI_TEGRA |
| 137 | #endif |
| 138 | #ifdef CONFIG_USB_STORAGE |
| 139 | #undef CONFIG_USB_STORAGE |
| 140 | #endif |
| 141 | #ifdef CONFIG_CMD_USB |
| 142 | #undef CONFIG_CMD_USB |
| 143 | #endif |
| 144 | |
Stephen Warren | 91623dd | 2012-09-25 13:32:26 +0000 | [diff] [blame] | 145 | /* remove part command support */ |
| 146 | #ifdef CONFIG_PARTITION_UUIDS |
| 147 | #undef CONFIG_PARTITION_UUIDS |
| 148 | #endif |
| 149 | |
| 150 | #ifdef CONFIG_CMD_PART |
| 151 | #undef CONFIG_CMD_PART |
| 152 | #endif |
| 153 | |
Allen Martin | c9c9846 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 154 | #endif /* CONFIG_SPL_BUILD */ |
| 155 | |
Tom Warren | 22562a4 | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 156 | #endif /* __TEGRA_COMMON_POST_H */ |