blob: c3ad8beb903d9e131ae596ee98fbb725297614ec [file] [log] [blame]
Stephen Warrende17c292012-05-16 06:21:00 +00001/*
2 * (C) Copyright 2010-2012
3 * NVIDIA Corporation <www.nvidia.com>
4 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Stephen Warrende17c292012-05-16 06:21:00 +00006 */
7
Tom Warren22562a42012-09-04 17:00:24 -07008#ifndef __TEGRA_COMMON_POST_H
9#define __TEGRA_COMMON_POST_H
Stephen Warrende17c292012-05-16 06:21:00 +000010
Stephen Warren5c30d752014-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 Warrende17c292012-05-16 06:21:00 +000019#else
Stephen Warren5c30d752014-07-30 16:37:15 -060020#define BOOTENV
Stephen Warrende17c292012-05-16 06:21:00 +000021#endif
22
Allen Martin50df8702012-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
Stephen Warren3f264792013-01-22 06:20:07 +000037#ifdef CONFIG_VIDEO_TEGRA
38#define STDOUT_LCD ",lcd"
39#else
40#define STDOUT_LCD ""
41#endif
42
Allen Martin50df8702012-10-24 08:32:05 +000043#define TEGRA_DEVICE_SETTINGS \
44 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB "\0" \
Stephen Warren3f264792013-01-22 06:20:07 +000045 "stdout=serial" STDOUT_LCD "\0" \
46 "stderr=serial" STDOUT_LCD "\0" \
47 ""
Allen Martin50df8702012-10-24 08:32:05 +000048
Stephen Warren26b02f12014-01-23 13:17:01 -070049#ifndef BOARD_EXTRA_ENV_SETTINGS
50#define BOARD_EXTRA_ENV_SETTINGS
51#endif
52
Stephen Warrende17c292012-05-16 06:21:00 +000053#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren22562a42012-09-04 17:00:24 -070054 TEGRA_DEVICE_SETTINGS \
Stephen Warren35305102012-10-02 09:26:51 +000055 MEM_LAYOUT_ENV_SETTINGS \
Stephen Warren8b75e982014-06-19 10:52:59 -060056 "fdt_high=ffffffff\0" \
57 "initrd_high=ffffffff\0" \
Stephen Warren5c30d752014-07-30 16:37:15 -060058 BOOTENV \
Stephen Warren26b02f12014-01-23 13:17:01 -070059 BOARD_EXTRA_ENV_SETTINGS
Stephen Warrende17c292012-05-16 06:21:00 +000060
Allen Martin21f5b932013-03-16 18:58:13 +000061#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glass1121b1b2014-10-13 23:42:13 -060062#define CONFIG_TEGRA_SPI
Allen Martinb98691c2013-03-16 18:58:07 +000063#endif
64
Allen Martinc9c98462012-08-31 08:30:12 +000065/* overrides for SPL build here */
66#ifdef CONFIG_SPL_BUILD
67
Axel Lin53e512a2013-05-21 13:45:18 +000068#define CONFIG_SKIP_LOWLEVEL_INIT
69
Allen Martinc9c98462012-08-31 08:30:12 +000070/* remove I2C support */
Simon Glass026fefb2012-10-30 07:28:53 +000071#ifdef CONFIG_SYS_I2C_TEGRA
72#undef CONFIG_SYS_I2C_TEGRA
Allen Martinc9c98462012-08-31 08:30:12 +000073#endif
74#ifdef CONFIG_CMD_I2C
75#undef CONFIG_CMD_I2C
76#endif
77
78/* remove MMC support */
79#ifdef CONFIG_MMC
80#undef CONFIG_MMC
81#endif
82#ifdef CONFIG_GENERIC_MMC
83#undef CONFIG_GENERIC_MMC
84#endif
Tom Warren22562a42012-09-04 17:00:24 -070085#ifdef CONFIG_TEGRA_MMC
86#undef CONFIG_TEGRA_MMC
Allen Martinc9c98462012-08-31 08:30:12 +000087#endif
88#ifdef CONFIG_CMD_MMC
89#undef CONFIG_CMD_MMC
90#endif
91
92/* remove partitions/filesystems */
93#ifdef CONFIG_DOS_PARTITION
94#undef CONFIG_DOS_PARTITION
95#endif
96#ifdef CONFIG_EFI_PARTITION
97#undef CONFIG_EFI_PARTITION
98#endif
Stephen Warren480860c2012-11-05 13:22:00 +000099#ifdef CONFIG_CMD_FS_GENERIC
100#undef CONFIG_CMD_FS_GENERIC
101#endif
102#ifdef CONFIG_CMD_EXT4
103#undef CONFIG_CMD_EXT4
104#endif
Allen Martinc9c98462012-08-31 08:30:12 +0000105#ifdef CONFIG_CMD_EXT2
106#undef CONFIG_CMD_EXT2
107#endif
108#ifdef CONFIG_CMD_FAT
109#undef CONFIG_CMD_FAT
110#endif
Stephen Warren480860c2012-11-05 13:22:00 +0000111#ifdef CONFIG_FS_EXT4
112#undef CONFIG_FS_EXT4
113#endif
114#ifdef CONFIG_FS_FAT
115#undef CONFIG_FS_FAT
116#endif
Allen Martinc9c98462012-08-31 08:30:12 +0000117
118/* remove USB */
119#ifdef CONFIG_USB_EHCI
120#undef CONFIG_USB_EHCI
121#endif
122#ifdef CONFIG_USB_EHCI_TEGRA
123#undef CONFIG_USB_EHCI_TEGRA
124#endif
125#ifdef CONFIG_USB_STORAGE
126#undef CONFIG_USB_STORAGE
127#endif
128#ifdef CONFIG_CMD_USB
129#undef CONFIG_CMD_USB
130#endif
131
Stephen Warren91623dd2012-09-25 13:32:26 +0000132/* remove part command support */
133#ifdef CONFIG_PARTITION_UUIDS
134#undef CONFIG_PARTITION_UUIDS
135#endif
136
137#ifdef CONFIG_CMD_PART
138#undef CONFIG_CMD_PART
139#endif
140
Allen Martinc9c98462012-08-31 08:30:12 +0000141#endif /* CONFIG_SPL_BUILD */
142
Tom Warren22562a42012-09-04 17:00:24 -0700143#endif /* __TEGRA_COMMON_POST_H */