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 | a591051 | 2019-09-25 11:12:40 +0200 | [diff] [blame] | 14 | #define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024) |
| 15 | |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 16 | /* uart */ |
Michal Simek | c7ff40a | 2015-12-09 12:42:16 +0100 | [diff] [blame] | 17 | /* The following table includes the supported baudrates */ |
| 18 | # define CONFIG_SYS_BAUDRATE_TABLE \ |
| 19 | {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
| 20 | |
Michal Simek | f3e2c9d | 2020-11-04 16:14:06 +0100 | [diff] [blame] | 21 | #ifdef CONFIG_CFI_FLASH |
Michal Simek | 04c379f | 2010-08-02 14:20:28 +0200 | [diff] [blame] | 22 | /* ?empty sector */ |
| 23 | # define CONFIG_SYS_FLASH_EMPTY_INFO 1 |
| 24 | /* max number of memory banks */ |
Michal Simek | 04c379f | 2010-08-02 14:20:28 +0200 | [diff] [blame] | 25 | /* max number of sectors on one chip */ |
Michal Simek | f3e2c9d | 2020-11-04 16:14:06 +0100 | [diff] [blame] | 26 | # define CONFIG_SYS_MAX_FLASH_SECT 2048 |
| 27 | #endif |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 28 | |
Mario Six | 790d844 | 2018-03-28 14:38:20 +0200 | [diff] [blame] | 29 | #define CONFIG_HOSTNAME "microblaze-generic" |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 30 | |
| 31 | /* architecture dependent code */ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 32 | #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) |
| 33 | #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) |
| 34 | #else |
| 35 | #define BOOT_TARGET_DEVICES_PXE(func) |
| 36 | #endif |
| 37 | |
| 38 | #if defined(CONFIG_CMD_DHCP) |
| 39 | #define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) |
| 40 | #else |
| 41 | #define BOOT_TARGET_DEVICES_DHCP(func) |
| 42 | #endif |
| 43 | |
| 44 | #if defined(CONFIG_SPI_FLASH) |
| 45 | # define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na) |
| 46 | #else |
| 47 | # define BOOT_TARGET_DEVICES_QSPI(func) |
| 48 | #endif |
| 49 | |
T Karthik Reddy | 885f231 | 2020-12-17 03:15:56 -0700 | [diff] [blame] | 50 | #if defined(CONFIG_MTD_NOR_FLASH) |
| 51 | # define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na) |
| 52 | #else |
| 53 | # define BOOT_TARGET_DEVICES_NOR(func) |
| 54 | #endif |
| 55 | |
| 56 | #define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \ |
| 57 | "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \ |
| 58 | "echo NOR: Trying to boot script at ${scriptaddr} && " \ |
| 59 | "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0" |
| 60 | |
| 61 | #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \ |
| 62 | "nor " |
| 63 | |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 64 | #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ |
| 65 | "bootcmd_qspi=sf probe 0 0 0 && " \ |
| 66 | "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \ |
| 67 | "echo QSPI: Trying to boot script at ${scriptaddr} && " \ |
| 68 | "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0" |
| 69 | |
| 70 | #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \ |
| 71 | "qspi " |
| 72 | |
| 73 | #define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na) |
| 74 | |
| 75 | #define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \ |
| 76 | "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \ |
| 77 | "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0" |
| 78 | |
| 79 | #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \ |
| 80 | "jtag " |
| 81 | |
| 82 | #define BOOT_TARGET_DEVICES(func) \ |
| 83 | BOOT_TARGET_DEVICES_JTAG(func) \ |
T Karthik Reddy | 885f231 | 2020-12-17 03:15:56 -0700 | [diff] [blame] | 84 | BOOT_TARGET_DEVICES_QSPI(func) \ |
| 85 | BOOT_TARGET_DEVICES_NOR(func) \ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 86 | BOOT_TARGET_DEVICES_DHCP(func) \ |
| 87 | BOOT_TARGET_DEVICES_PXE(func) |
| 88 | |
| 89 | #include <config_distro_bootcmd.h> |
| 90 | |
Michal Simek | 31caa37 | 2016-05-10 13:11:19 +0200 | [diff] [blame] | 91 | #ifndef CONFIG_EXTRA_ENV_SETTINGS |
T Karthik Reddy | a3627ee | 2020-09-22 05:18:52 -0600 | [diff] [blame] | 92 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 93 | "unlock=yes\0"\ |
| 94 | "nor0=flash-0\0"\ |
| 95 | "mtdparts=mtdparts=flash-0:"\ |
| 96 | "256k(u-boot),256k(env),3m(kernel),"\ |
| 97 | "1m(romfs),1m(cramfs),-(jffs2)\0"\ |
| 98 | "nc=setenv stdout nc;"\ |
| 99 | "setenv stdin nc\0" \ |
| 100 | "serial=setenv stdout serial;"\ |
T Karthik Reddy | e539c26 | 2020-09-22 05:18:55 -0600 | [diff] [blame] | 101 | "setenv stdin serial\0"\ |
| 102 | "script_size_f=0x40000\0"\ |
| 103 | BOOTENV |
Michal Simek | 31caa37 | 2016-05-10 13:11:19 +0200 | [diff] [blame] | 104 | #endif |
Michal Simek | ab34023 | 2007-04-24 23:01:02 +0200 | [diff] [blame] | 105 | |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 106 | /* SPL part */ |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 107 | |
Michal Simek | 736c1e64 | 2020-11-04 16:12:20 +0100 | [diff] [blame] | 108 | #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 109 | |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 110 | /* SP location before relocation, must use scratch RAM */ |
| 111 | /* BRAM start */ |
| 112 | #define CONFIG_SYS_INIT_RAM_ADDR 0x0 |
| 113 | /* BRAM size - will be generated */ |
Michal Simek | fb8e384 | 2015-02-03 16:24:48 +0100 | [diff] [blame] | 114 | #define CONFIG_SYS_INIT_RAM_SIZE 0x100000 |
Michal Simek | 26acb3e | 2014-01-21 07:30:37 +0100 | [diff] [blame] | 115 | |
Michal Simek | 952d514 | 2007-03-11 13:42:58 +0100 | [diff] [blame] | 116 | #endif /* __CONFIG_H */ |