blob: e67ff7b957154f92f3c85bdf1012828ca29c9303 [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
Simon Glassbbe0d4d2015-06-05 14:39:32 -060043#ifdef CONFIG_CROS_EC_KEYB
44#define STDOUT_CROS_EC ",cros-ec-keyb"
45#else
46#define STDOUT_CROS_EC ""
47#endif
48
Allen Martin7992bfb2012-10-24 08:32:05 +000049#define TEGRA_DEVICE_SETTINGS \
Simon Glassbbe0d4d2015-06-05 14:39:32 -060050 "stdin=serial" STDIN_KBD_KBC STDIN_KBD_USB STDOUT_CROS_EC "\0" \
Stephen Warrenc35eb562013-01-22 06:20:07 +000051 "stdout=serial" STDOUT_LCD "\0" \
52 "stderr=serial" STDOUT_LCD "\0" \
53 ""
Allen Martin7992bfb2012-10-24 08:32:05 +000054
Stephen Warrenb9b53a62014-01-23 13:17:01 -070055#ifndef BOARD_EXTRA_ENV_SETTINGS
56#define BOARD_EXTRA_ENV_SETTINGS
57#endif
58
Stephen Warren48cfca22015-04-01 15:40:53 -060059#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
60
Simon Glasse379b032015-06-05 14:39:44 -060061#ifndef CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
62#define CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
63#endif
64
Tom Warren7aaa5a62015-03-04 16:36:00 -070065#ifdef CONFIG_ARM64
66#define FDT_HIGH "ffffffffffffffff"
67#define INITRD_HIGH "ffffffffffffffff"
68#else
69#define FDT_HIGH "ffffffff"
70#define INITRD_HIGH "ffffffff"
71#endif
72
Stephen Warrenbea26742012-05-16 06:21:00 +000073#define CONFIG_EXTRA_ENV_SETTINGS \
Tom Warren29f3e3f2012-09-04 17:00:24 -070074 TEGRA_DEVICE_SETTINGS \
Stephen Warren938176a2012-10-02 09:26:51 +000075 MEM_LAYOUT_ENV_SETTINGS \
Tom Warren7aaa5a62015-03-04 16:36:00 -070076 "fdt_high=" FDT_HIGH "\0" \
77 "initrd_high=" INITRD_HIGH "\0" \
Stephen Warren8dca9ff2014-07-30 16:37:15 -060078 BOOTENV \
Simon Glasse379b032015-06-05 14:39:44 -060079 BOARD_EXTRA_ENV_SETTINGS \
80 CONFIG_CHROMEOS_EXTRA_ENV_SETTINGS
Stephen Warrenbea26742012-05-16 06:21:00 +000081
Allen Martin77c42e82013-03-16 18:58:13 +000082#if defined(CONFIG_TEGRA20_SFLASH) || defined(CONFIG_TEGRA20_SLINK) || defined(CONFIG_TEGRA114_SPI)
Simon Glassfda6fac2014-10-13 23:42:13 -060083#define CONFIG_TEGRA_SPI
Allen Martin78f47b72013-03-16 18:58:07 +000084#endif
85
Allen Martin12b7b702012-08-31 08:30:12 +000086/* overrides for SPL build here */
87#ifdef CONFIG_SPL_BUILD
88
Axel Lin60985bb2013-05-21 13:45:18 +000089#define CONFIG_SKIP_LOWLEVEL_INIT
90
Allen Martin12b7b702012-08-31 08:30:12 +000091/* remove I2C support */
Simon Glass1f2ba722012-10-30 07:28:53 +000092#ifdef CONFIG_SYS_I2C_TEGRA
93#undef CONFIG_SYS_I2C_TEGRA
Allen Martin12b7b702012-08-31 08:30:12 +000094#endif
95#ifdef CONFIG_CMD_I2C
96#undef CONFIG_CMD_I2C
97#endif
98
99/* remove MMC support */
100#ifdef CONFIG_MMC
101#undef CONFIG_MMC
102#endif
103#ifdef CONFIG_GENERIC_MMC
104#undef CONFIG_GENERIC_MMC
105#endif
Tom Warren29f3e3f2012-09-04 17:00:24 -0700106#ifdef CONFIG_TEGRA_MMC
107#undef CONFIG_TEGRA_MMC
Allen Martin12b7b702012-08-31 08:30:12 +0000108#endif
109#ifdef CONFIG_CMD_MMC
110#undef CONFIG_CMD_MMC
111#endif
112
113/* remove partitions/filesystems */
114#ifdef CONFIG_DOS_PARTITION
115#undef CONFIG_DOS_PARTITION
116#endif
117#ifdef CONFIG_EFI_PARTITION
118#undef CONFIG_EFI_PARTITION
119#endif
Stephen Warren3786a942012-11-05 13:22:00 +0000120#ifdef CONFIG_CMD_FS_GENERIC
121#undef CONFIG_CMD_FS_GENERIC
122#endif
123#ifdef CONFIG_CMD_EXT4
124#undef CONFIG_CMD_EXT4
125#endif
Allen Martin12b7b702012-08-31 08:30:12 +0000126#ifdef CONFIG_CMD_EXT2
127#undef CONFIG_CMD_EXT2
128#endif
129#ifdef CONFIG_CMD_FAT
130#undef CONFIG_CMD_FAT
131#endif
Stephen Warren3786a942012-11-05 13:22:00 +0000132#ifdef CONFIG_FS_EXT4
133#undef CONFIG_FS_EXT4
134#endif
135#ifdef CONFIG_FS_FAT
136#undef CONFIG_FS_FAT
137#endif
Allen Martin12b7b702012-08-31 08:30:12 +0000138
139/* remove USB */
140#ifdef CONFIG_USB_EHCI
141#undef CONFIG_USB_EHCI
142#endif
143#ifdef CONFIG_USB_EHCI_TEGRA
144#undef CONFIG_USB_EHCI_TEGRA
145#endif
146#ifdef CONFIG_USB_STORAGE
147#undef CONFIG_USB_STORAGE
148#endif
149#ifdef CONFIG_CMD_USB
150#undef CONFIG_CMD_USB
151#endif
152
Stephen Warren01ca2862012-09-25 13:32:26 +0000153/* remove part command support */
154#ifdef CONFIG_PARTITION_UUIDS
155#undef CONFIG_PARTITION_UUIDS
156#endif
157
158#ifdef CONFIG_CMD_PART
159#undef CONFIG_CMD_PART
160#endif
161
Allen Martin12b7b702012-08-31 08:30:12 +0000162#endif /* CONFIG_SPL_BUILD */
163
Tom Warren29f3e3f2012-09-04 17:00:24 -0700164#endif /* __TEGRA_COMMON_POST_H */