Convert CONFIG_SPL_TARGET to Kconfig
[platform/kernel/u-boot.git] / include / configs / pdu001.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * pdu001.h
4  *
5  * Copyright (C) 2018 EETS GmbH - http://www.eets.ch/
6  *
7  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
8  */
9
10 #ifndef __CONFIG_PDU001_H
11 #define __CONFIG_PDU001_H
12
13 #include <configs/ti_am335x_common.h>
14
15 /* Using 32K of volatile storage for environment */
16
17 /* Clock Defines */
18 #define V_OSCK                  24000000  /* Clock output from T2 */
19 #define V_SCLK                  (V_OSCK)
20
21 #if CONFIG_CONS_INDEX == 1
22         #define CONSOLE_DEV "ttyO0"
23 #elif CONFIG_CONS_INDEX == 2
24         #define CONSOLE_DEV "ttyO1"
25 #elif CONFIG_CONS_INDEX == 3
26         #define CONSOLE_DEV "ttyO2"
27 #elif CONFIG_CONS_INDEX == 4
28         #define CONSOLE_DEV "ttyO3"
29 #elif CONFIG_CONS_INDEX == 5
30         #define CONSOLE_DEV "ttyO4"
31 #elif CONFIG_CONS_INDEX == 6
32         #define CONSOLE_DEV "ttyO5"
33 #endif
34
35 #ifndef CONFIG_SPL_BUILD
36 #define CONFIG_EXTRA_ENV_SETTINGS \
37         DEFAULT_LINUX_BOOT_ENV \
38         "fdtfile=am335x-pdu001.dtb\0" \
39         "bootfile=zImage\0" \
40         "console=" CONSOLE_DEV ",115200n8\0" \
41         "root_fs_partition=2\0" \
42         "eval_boot_device=" \
43                 "if test $boot_device = emmc; then " \
44                         "setenv mmc_boot 0;" \
45                 "elif test $boot_device = sdcard; then " \
46                         "setenv mmc_boot 1;" \
47                 "else " \
48                         "echo Bootdevice is neither MMC0 nor MMC1;" \
49                         "reset;" \
50                 "fi;" \
51         "\0"
52 #endif
53
54 /* NS16550 Configuration */
55 #define CONFIG_SYS_NS16550_COM1 UART0_BASE
56 #define CONFIG_SYS_NS16550_COM2 UART1_BASE
57 #define CONFIG_SYS_NS16550_COM3 UART2_BASE
58 #define CONFIG_SYS_NS16550_COM4 UART3_BASE
59 #define CONFIG_SYS_NS16550_COM5 UART4_BASE
60 #define CONFIG_SYS_NS16550_COM6 UART5_BASE
61
62 #endif  /* ! __CONFIG_PDU001_H */