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