Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 2 | /* |
Michal Simek | 04c379f | 2010-08-02 14:20:28 +0200 | [diff] [blame] | 3 | * (C) Copyright 2007-2010 Michal Simek |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 4 | * |
Michal Simek | d83d07e | 2007-09-24 00:30:42 +0200 | [diff] [blame] | 5 | * Michal SIMEK <monstr@monstr.eu> |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __CONFIG_H |
| 9 | #define __CONFIG_H |
| 10 | |
Michal Simek | b139503 | 2020-11-04 16:00:38 +0100 | [diff] [blame] | 11 | /* Microblaze is microblaze_0 */ |
| 12 | #define XILINX_FSL_NUMBER 3 |
| 13 | |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 14 | /* uart */ |
Michal Simek | c7ff40a | 2015-12-09 12:42:16 +0100 | [diff] [blame] | 15 | /* The following table includes the supported baudrates */ |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 16 | # define CFG_SYS_BAUDRATE_TABLE \ |
Michal Simek | c7ff40a | 2015-12-09 12:42:16 +0100 | [diff] [blame] | 17 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
| 18 | |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 19 | /* architecture dependent code */ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 20 | #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) |
| 21 | #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) |
| 22 | #else |
| 23 | #define BOOT_TARGET_DEVICES_PXE(func) |
| 24 | #endif |
| 25 | |
| 26 | #if defined(CONFIG_CMD_DHCP) |
| 27 | #define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) |
| 28 | #else |
| 29 | #define BOOT_TARGET_DEVICES_DHCP(func) |
| 30 | #endif |
| 31 | |
| 32 | #if defined(CONFIG_SPI_FLASH) |
| 33 | # define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na) |
| 34 | #else |
| 35 | # define BOOT_TARGET_DEVICES_QSPI(func) |
| 36 | #endif |
| 37 | |
T Karthik Reddy | 885f231 | 2020-12-17 03:15:56 -0700 | [diff] [blame] | 38 | #if defined(CONFIG_MTD_NOR_FLASH) |
| 39 | # define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na) |
| 40 | #else |
| 41 | # define BOOT_TARGET_DEVICES_NOR(func) |
| 42 | #endif |
| 43 | |
| 44 | #define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \ |
| 45 | "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \ |
| 46 | "echo NOR: Trying to boot script at ${scriptaddr} && " \ |
| 47 | "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0" |
| 48 | |
| 49 | #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \ |
| 50 | "nor " |
| 51 | |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 52 | #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ |
| 53 | "bootcmd_qspi=sf probe 0 0 0 && " \ |
| 54 | "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \ |
| 55 | "echo QSPI: Trying to boot script at ${scriptaddr} && " \ |
| 56 | "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0" |
| 57 | |
| 58 | #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \ |
| 59 | "qspi " |
| 60 | |
| 61 | #define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na) |
| 62 | |
| 63 | #define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \ |
| 64 | "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \ |
| 65 | "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0" |
| 66 | |
| 67 | #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \ |
| 68 | "jtag " |
| 69 | |
| 70 | #define BOOT_TARGET_DEVICES(func) \ |
| 71 | BOOT_TARGET_DEVICES_JTAG(func) \ |
T Karthik Reddy | 885f231 | 2020-12-17 03:15:56 -0700 | [diff] [blame] | 72 | BOOT_TARGET_DEVICES_QSPI(func) \ |
| 73 | BOOT_TARGET_DEVICES_NOR(func) \ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 74 | BOOT_TARGET_DEVICES_DHCP(func) \ |
| 75 | BOOT_TARGET_DEVICES_PXE(func) |
| 76 | |
| 77 | #include <config_distro_bootcmd.h> |
| 78 | |
Tom Rini | c9edebe | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 79 | #ifndef CFG_EXTRA_ENV_SETTINGS |
| 80 | #define CFG_EXTRA_ENV_SETTINGS \ |
T Karthik Reddy | a3627ee | 2020-09-22 05:18:52 -0600 | [diff] [blame] | 81 | "unlock=yes\0"\ |
| 82 | "nor0=flash-0\0"\ |
| 83 | "mtdparts=mtdparts=flash-0:"\ |
| 84 | "256k(u-boot),256k(env),3m(kernel),"\ |
Michal Simek | fb0889d | 2024-11-15 09:38:55 +0100 | [diff] [blame^] | 85 | "1m(romfs),1m(cramfs),-(fs)\0"\ |
T Karthik Reddy | a3627ee | 2020-09-22 05:18:52 -0600 | [diff] [blame] | 86 | "nc=setenv stdout nc;"\ |
| 87 | "setenv stdin nc\0" \ |
| 88 | "serial=setenv stdout serial;"\ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 89 | "setenv stdin serial\0"\ |
| 90 | "script_size_f=0x40000\0"\ |
| 91 | BOOTENV |
Michal Simek | 31caa37 | 2016-05-10 13:11:19 +0200 | [diff] [blame] | 92 | #endif |
Michal Simek | ab34023 | 2007-04-24 23:01:02 +0200 | [diff] [blame] | 93 | |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 94 | /* SPL part */ |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 95 | |
Tom Rini | 6a5dccc | 2022-11-16 13:10:41 -0500 | [diff] [blame] | 96 | #define CFG_SYS_UBOOT_BASE CONFIG_TEXT_BASE |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 97 | |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 98 | #endif /* __CONFIG_H */ |