blob: 0cea795de1b4b1076c5d8da82bb46b8c70e94971 [file] [log] [blame]
Stephen Warrenbea26742012-05-16 06:21:00 +00001/*
2 * (C) Copyright 2010-2012
3 * NVIDIA Corporation <www.nvidia.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stephen Warrenbea26742012-05-16 06:21:00 +00006 */
7
Tom Warren29f3e3f2012-09-04 17:00:24 -07008#ifndef __TEGRA_COMMON_POST_H
9#define __TEGRA_COMMON_POST_H
Stephen Warrenbea26742012-05-16 06:21:00 +000010
Stephen Warren8dca9ff2014-07-30 16:37:15 -060011#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 Warrenbea26742012-05-16 06:21:00 +000019#else
Stephen Warren8dca9ff2014-07-30 16:37:15 -060020#define BOOTENV
Stephen Warrenbea26742012-05-16 06:21:00 +000021#endif
22
Allen Martin7992bfb2012-10-24 08:32:05 +000023#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 Glassec022ef2015-04-14 21:03:31 -060037#ifdef CONFIG_LCD
Stephen Warrenc35eb562013-01-22 06:20:07 +000038#define STDOUT_LCD ",lcd"
39#else
40#define STDOUT_LCD ""
41#endif
42
Allen Martin7992bfb2012-10-24 08:32:05 +000043#define TEGRA_DEVICE_SETTINGS \
44 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \
Stephen Warrenc35eb562013-01-22 06:20:07 +000045 "stdout=serial" STDOUT_LCD "\0" \
46 "stderr=serial" STDOUT_LCD "\0" \
47 ""
Allen Martin7992bfb2012-10-24 08:32:05 +000048
Stephen Warrenb9b53a62014-01-23 13:17:01 -070049#ifndef BOARD_EXTRA_ENV_SETTINGS
50#define BOARD_EXTRA_ENV_SETTINGS
51#endif
52
Stephen Warren48cfca22015-04-01 15:40:53 -060053#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
54
Stephen Warrenbea26742012-05-16 06:21:00 +000055#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren29f3e3f2012-09-04 17:00:24 -070056 TEGRA_DEVICE_SETTINGS \
Stephen Warren938176a2012-10-02 09:26:51 +000057 MEM_LAYOUT_ENV_SETTINGS \
Stephen Warrenfe7b7cd2014-06-19 10:52:59 -060058 "fdt_high=ffffffff\0" \
59 "initrd_high=ffffffff\0" \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060060 BOOTENV \
Stephen Warrenb9b53a62014-01-23 13:17:01 -070061 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrenbea26742012-05-16 06:21:00 +000062
Allen Martin77c42e82013-03-16 18:58:13 +000063#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glassfda6fac2014-10-13 23:42:13 -060064#define CONFIG_TEGRA_SPI
Allen Martin78f47b72013-03-16 18:58:07 +000065#endif
66
Allen Martin12b7b702012-08-31 08:30:12 +000067/* overrides for SPL build here */
68#ifdef CONFIG_SPL_BUILD
69
Axel Lin60985bb2013-05-21 13:45:18 +000070#define CONFIG_SKIP_LOWLEVEL_INIT
71
Allen Martin12b7b702012-08-31 08:30:12 +000072/* remove I2C support */
Simon Glass1f2ba722012-10-30 07:28:53 +000073#ifdef CONFIG_SYS_I2C_TEGRA
74#undef CONFIG_SYS_I2C_TEGRA
Allen Martin12b7b702012-08-31 08:30:12 +000075#endif
76#ifdef CONFIG_CMD_I2C
77#undef CONFIG_CMD_I2C
78#endif
79
80/* remove MMC support */
81#ifdef CONFIG_MMC
82#undef CONFIG_MMC
83#endif
84#ifdef CONFIG_GENERIC_MMC
85#undef CONFIG_GENERIC_MMC
86#endif
Tom Warren29f3e3f2012-09-04 17:00:24 -070087#ifdef CONFIG_TEGRA_MMC
88#undef CONFIG_TEGRA_MMC
Allen Martin12b7b702012-08-31 08:30:12 +000089#endif
90#ifdef CONFIG_CMD_MMC
91#undef CONFIG_CMD_MMC
92#endif
93
94/* remove partitions/filesystems */
95#ifdef CONFIG_DOS_PARTITION
96#undef CONFIG_DOS_PARTITION
97#endif
98#ifdef CONFIG_EFI_PARTITION
99#undef CONFIG_EFI_PARTITION
100#endif
Stephen Warren3786a942012-11-05 13:22:00 +0000101#ifdef CONFIG_CMD_FS_GENERIC
102#undef CONFIG_CMD_FS_GENERIC
103#endif
104#ifdef CONFIG_CMD_EXT4
105#undef CONFIG_CMD_EXT4
106#endif
Allen Martin12b7b702012-08-31 08:30:12 +0000107#ifdef CONFIG_CMD_EXT2
108#undef CONFIG_CMD_EXT2
109#endif
110#ifdef CONFIG_CMD_FAT
111#undef CONFIG_CMD_FAT
112#endif
Stephen Warren3786a942012-11-05 13:22:00 +0000113#ifdef CONFIG_FS_EXT4
114#undef CONFIG_FS_EXT4
115#endif
116#ifdef CONFIG_FS_FAT
117#undef CONFIG_FS_FAT
118#endif
Allen Martin12b7b702012-08-31 08:30:12 +0000119
120/* remove USB */
121#ifdef CONFIG_USB_EHCI
122#undef CONFIG_USB_EHCI
123#endif
124#ifdef CONFIG_USB_EHCI_TEGRA
125#undef CONFIG_USB_EHCI_TEGRA
126#endif
127#ifdef CONFIG_USB_STORAGE
128#undef CONFIG_USB_STORAGE
129#endif
130#ifdef CONFIG_CMD_USB
131#undef CONFIG_CMD_USB
132#endif
133
Stephen Warren01ca2862012-09-25 13:32:26 +0000134/* remove part command support */
135#ifdef CONFIG_PARTITION_UUIDS
136#undef CONFIG_PARTITION_UUIDS
137#endif
138
139#ifdef CONFIG_CMD_PART
140#undef CONFIG_CMD_PART
141#endif
142
Allen Martin12b7b702012-08-31 08:30:12 +0000143#endif /* CONFIG_SPL_BUILD */
144
Tom Warren29f3e3f2012-09-04 17:00:24 -0700145#endif /* __TEGRA_COMMON_POST_H */