1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2007-2010 Michal Simek
5 * Michal SIMEK <monstr@monstr.eu>
11 /* Microblaze is microblaze_0 */
12 #define XILINX_FSL_NUMBER 3
15 #define MICROBLAZE_V5 1
17 #define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024)
20 /* The following table includes the supported baudrates */
21 # define CONFIG_SYS_BAUDRATE_TABLE \
22 {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
24 /* setting reset address */
25 /*#define CONFIG_SYS_RESET_ADDRESS CONFIG_SYS_TEXT_BASE*/
27 #define CONFIG_SYS_MALLOC_LEN 0xC0000
29 /* Stack location before relocation */
30 #define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_TEXT_BASE - \
31 CONFIG_SYS_MALLOC_F_LEN)
33 #ifdef CONFIG_CFI_FLASH
35 # define CONFIG_SYS_FLASH_EMPTY_INFO 1
36 /* max number of memory banks */
37 # define CONFIG_SYS_MAX_FLASH_BANKS 1
38 /* max number of sectors on one chip */
39 # define CONFIG_SYS_MAX_FLASH_SECT 2048
45 #ifndef XILINX_DCACHE_BYTE_SIZE
46 #define XILINX_DCACHE_BYTE_SIZE 32768
52 #define CONFIG_BOOTP_BOOTFILESIZE
54 /* size of console buffer */
55 #define CONFIG_SYS_CBSIZE 512
56 /* max number of command args */
57 #define CONFIG_SYS_MAXARGS 15
58 /* default load address */
59 #define CONFIG_SYS_LOAD_ADDR 0
61 #define CONFIG_HOSTNAME "microblaze-generic"
63 /* architecture dependent code */
64 #define CONFIG_SYS_USR_EXCEP /* user exception */
66 #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
67 #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na)
69 #define BOOT_TARGET_DEVICES_PXE(func)
72 #if defined(CONFIG_CMD_DHCP)
73 #define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na)
75 #define BOOT_TARGET_DEVICES_DHCP(func)
78 #if defined(CONFIG_SPI_FLASH)
79 # define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na)
81 # define BOOT_TARGET_DEVICES_QSPI(func)
84 #if defined(CONFIG_MTD_NOR_FLASH)
85 # define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na)
87 # define BOOT_TARGET_DEVICES_NOR(func)
90 #define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
91 "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
92 "echo NOR: Trying to boot script at ${scriptaddr} && " \
93 "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0"
95 #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
98 #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
99 "bootcmd_qspi=sf probe 0 0 0 && " \
100 "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
101 "echo QSPI: Trying to boot script at ${scriptaddr} && " \
102 "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0"
104 #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
107 #define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na)
109 #define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
110 "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \
111 "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0"
113 #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
116 #define BOOT_TARGET_DEVICES(func) \
117 BOOT_TARGET_DEVICES_JTAG(func) \
118 BOOT_TARGET_DEVICES_QSPI(func) \
119 BOOT_TARGET_DEVICES_NOR(func) \
120 BOOT_TARGET_DEVICES_DHCP(func) \
121 BOOT_TARGET_DEVICES_PXE(func)
123 #include <config_distro_bootcmd.h>
125 #ifndef CONFIG_EXTRA_ENV_SETTINGS
126 #define CONFIG_EXTRA_ENV_SETTINGS \
129 "mtdparts=mtdparts=flash-0:"\
130 "256k(u-boot),256k(env),3m(kernel),"\
131 "1m(romfs),1m(cramfs),-(jffs2)\0"\
132 "nc=setenv stdout nc;"\
133 "setenv stdin nc\0" \
134 "serial=setenv stdout serial;"\
135 "setenv stdin serial\0"\
136 "script_size_f=0x40000\0"\
140 #if defined(CONFIG_XILINX_AXIEMAC)
141 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1
146 #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
148 /* for booting directly linux */
149 #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_TEXT_BASE + \
152 #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \
155 /* SP location before relocation, must use scratch RAM */
157 #define CONFIG_SYS_INIT_RAM_ADDR 0x0
158 /* BRAM size - will be generated */
159 #define CONFIG_SYS_INIT_RAM_SIZE 0x100000
161 # define CONFIG_SPL_STACK_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
162 CONFIG_SYS_INIT_RAM_SIZE)
164 /* Just for sure that there is a space for stack */
165 #define CONFIG_SPL_STACK_SIZE 0x100
167 #define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_INIT_RAM_SIZE - \
168 CONFIG_SYS_INIT_RAM_ADDR - \
169 CONFIG_SYS_MALLOC_F_LEN - \
170 CONFIG_SPL_STACK_SIZE)
172 #endif /* __CONFIG_H */