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 | 8dca9ff | 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 | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 19 | #else |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 20 | #define BOOTENV |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 21 | #endif |
| 22 | |
Allen Martin | 7992bfb | 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 | |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 37 | #ifdef CONFIG_VIDEO_TEGRA |
| 38 | #define STDOUT_LCD ",lcd" |
| 39 | #else |
| 40 | #define STDOUT_LCD "" |
| 41 | #endif |
| 42 | |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 43 | #define TEGRA_DEVICE_SETTINGS \ |
| 44 | "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \ |
Stephen Warren | c35eb56 | 2013-01-22 06:20:07 +0000 | [diff] [blame] | 45 | "stdout=serial" STDOUT_LCD "\0" \ |
| 46 | "stderr=serial" STDOUT_LCD "\0" \ |
| 47 | "" |
Allen Martin | 7992bfb | 2012-10-24 08:32:05 +0000 | [diff] [blame] | 48 | |
Stephen Warren | b9b53a6 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 49 | #ifndef BOARD_EXTRA_ENV_SETTINGS |
| 50 | #define BOARD_EXTRA_ENV_SETTINGS |
| 51 | #endif |
| 52 | |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 53 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 54 | TEGRA_DEVICE_SETTINGS \ |
Stephen Warren | 938176a | 2012-10-02 09:26:51 +0000 | [diff] [blame] | 55 | MEM_LAYOUT_ENV_SETTINGS \ |
Stephen Warren | fe7b7cd | 2014-06-19 10:52:59 -0600 | [diff] [blame] | 56 | "fdt_high=ffffffff\0" \ |
| 57 | "initrd_high=ffffffff\0" \ |
Stephen Warren | 8dca9ff | 2014-07-30 16:37:15 -0600 | [diff] [blame] | 58 | BOOTENV \ |
Stephen Warren | b9b53a6 | 2014-01-23 13:17:01 -0700 | [diff] [blame] | 59 | BOARD_EXTRA_ENV_SETTINGS |
Stephen Warren | bea2674 | 2012-05-16 06:21:00 +0000 | [diff] [blame] | 60 | |
Allen Martin | 77c42e8 | 2013-03-16 18:58:13 +0000 | [diff] [blame] | 61 | #if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI) |
Allen Martin | 78f47b7 | 2013-03-16 18:58:07 +0000 | [diff] [blame] | 62 | #define CONFIG_FDT_SPI |
| 63 | #endif |
| 64 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 65 | /* overrides for SPL build here */ |
| 66 | #ifdef CONFIG_SPL_BUILD |
| 67 | |
Axel Lin | 60985bb | 2013-05-21 13:45:18 +0000 | [diff] [blame] | 68 | #define CONFIG_SKIP_LOWLEVEL_INIT |
| 69 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 70 | /* remove devicetree support */ |
| 71 | #ifdef CONFIG_OF_CONTROL |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 72 | #endif |
| 73 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 74 | /* remove I2C support */ |
Simon Glass | 1f2ba72 | 2012-10-30 07:28:53 +0000 | [diff] [blame] | 75 | #ifdef CONFIG_SYS_I2C_TEGRA |
| 76 | #undef CONFIG_SYS_I2C_TEGRA |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 77 | #endif |
| 78 | #ifdef CONFIG_CMD_I2C |
| 79 | #undef CONFIG_CMD_I2C |
| 80 | #endif |
| 81 | |
| 82 | /* remove MMC support */ |
| 83 | #ifdef CONFIG_MMC |
| 84 | #undef CONFIG_MMC |
| 85 | #endif |
| 86 | #ifdef CONFIG_GENERIC_MMC |
| 87 | #undef CONFIG_GENERIC_MMC |
| 88 | #endif |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 89 | #ifdef CONFIG_TEGRA_MMC |
| 90 | #undef CONFIG_TEGRA_MMC |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 91 | #endif |
| 92 | #ifdef CONFIG_CMD_MMC |
| 93 | #undef CONFIG_CMD_MMC |
| 94 | #endif |
| 95 | |
| 96 | /* remove partitions/filesystems */ |
| 97 | #ifdef CONFIG_DOS_PARTITION |
| 98 | #undef CONFIG_DOS_PARTITION |
| 99 | #endif |
| 100 | #ifdef CONFIG_EFI_PARTITION |
| 101 | #undef CONFIG_EFI_PARTITION |
| 102 | #endif |
Stephen Warren | 3786a94 | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 103 | #ifdef CONFIG_CMD_FS_GENERIC |
| 104 | #undef CONFIG_CMD_FS_GENERIC |
| 105 | #endif |
| 106 | #ifdef CONFIG_CMD_EXT4 |
| 107 | #undef CONFIG_CMD_EXT4 |
| 108 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 109 | #ifdef CONFIG_CMD_EXT2 |
| 110 | #undef CONFIG_CMD_EXT2 |
| 111 | #endif |
| 112 | #ifdef CONFIG_CMD_FAT |
| 113 | #undef CONFIG_CMD_FAT |
| 114 | #endif |
Stephen Warren | 3786a94 | 2012-11-05 13:22:00 +0000 | [diff] [blame] | 115 | #ifdef CONFIG_FS_EXT4 |
| 116 | #undef CONFIG_FS_EXT4 |
| 117 | #endif |
| 118 | #ifdef CONFIG_FS_FAT |
| 119 | #undef CONFIG_FS_FAT |
| 120 | #endif |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 121 | |
| 122 | /* remove USB */ |
| 123 | #ifdef CONFIG_USB_EHCI |
| 124 | #undef CONFIG_USB_EHCI |
| 125 | #endif |
| 126 | #ifdef CONFIG_USB_EHCI_TEGRA |
| 127 | #undef CONFIG_USB_EHCI_TEGRA |
| 128 | #endif |
| 129 | #ifdef CONFIG_USB_STORAGE |
| 130 | #undef CONFIG_USB_STORAGE |
| 131 | #endif |
| 132 | #ifdef CONFIG_CMD_USB |
| 133 | #undef CONFIG_CMD_USB |
| 134 | #endif |
| 135 | |
Stephen Warren | 01ca286 | 2012-09-25 13:32:26 +0000 | [diff] [blame] | 136 | /* remove part command support */ |
| 137 | #ifdef CONFIG_PARTITION_UUIDS |
| 138 | #undef CONFIG_PARTITION_UUIDS |
| 139 | #endif |
| 140 | |
| 141 | #ifdef CONFIG_CMD_PART |
| 142 | #undef CONFIG_CMD_PART |
| 143 | #endif |
| 144 | |
Allen Martin | 12b7b70 | 2012-08-31 08:30:12 +0000 | [diff] [blame] | 145 | #endif /* CONFIG_SPL_BUILD */ |
| 146 | |
Tom Warren | 29f3e3f | 2012-09-04 17:00:24 -0700 | [diff] [blame] | 147 | #endif /* __TEGRA_COMMON_POST_H */ |