microblaze: drop CONFIG_SYS_RESET_ADDRESS macro
[platform/kernel/u-boot.git] / include / configs / microblaze-generic.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2007-2010 Michal Simek
4  *
5  * Michal SIMEK <monstr@monstr.eu>
6  */
7
8 #ifndef __CONFIG_H
9 #define __CONFIG_H
10
11 /* Microblaze is microblaze_0 */
12 #define XILINX_FSL_NUMBER       3
13
14 /* MicroBlaze CPU */
15 #define MICROBLAZE_V5           1
16
17 #define CONFIG_SYS_BOOTM_LEN    (64 * 1024 * 1024)
18
19 /* uart */
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}
23
24 /* Stack location before relocation */
25 #define CONFIG_SYS_INIT_SP_OFFSET       (CONFIG_SYS_TEXT_BASE - \
26                                          CONFIG_SYS_MALLOC_F_LEN)
27
28 #ifdef CONFIG_CFI_FLASH
29 /* ?empty sector */
30 # define CONFIG_SYS_FLASH_EMPTY_INFO    1
31 /* max number of memory banks */
32 # define CONFIG_SYS_MAX_FLASH_BANKS     1
33 /* max number of sectors on one chip */
34 # define CONFIG_SYS_MAX_FLASH_SECT      2048
35 #endif
36
37 #define CONFIG_ICACHE
38 #define CONFIG_DCACHE
39
40 #ifndef XILINX_DCACHE_BYTE_SIZE
41 #define XILINX_DCACHE_BYTE_SIZE 32768
42 #endif
43
44 /*
45  * BOOTP options
46  */
47 #define CONFIG_BOOTP_BOOTFILESIZE
48
49 /* size of console buffer */
50 #define CONFIG_SYS_CBSIZE       512
51 /* max number of command args */
52 #define CONFIG_SYS_MAXARGS      15
53
54 #define CONFIG_HOSTNAME         "microblaze-generic"
55
56 /* architecture dependent code */
57 #define CONFIG_SYS_USR_EXCEP    /* user exception */
58
59 #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
60 #define BOOT_TARGET_DEVICES_PXE(func)   func(PXE, pxe, na)
61 #else
62 #define BOOT_TARGET_DEVICES_PXE(func)
63 #endif
64
65 #if defined(CONFIG_CMD_DHCP)
66 #define BOOT_TARGET_DEVICES_DHCP(func)  func(DHCP, dhcp, na)
67 #else
68 #define BOOT_TARGET_DEVICES_DHCP(func)
69 #endif
70
71 #if defined(CONFIG_SPI_FLASH)
72 # define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na)
73 #else
74 # define BOOT_TARGET_DEVICES_QSPI(func)
75 #endif
76
77 #if defined(CONFIG_MTD_NOR_FLASH)
78 # define BOOT_TARGET_DEVICES_NOR(func)  func(NOR, nor, na)
79 #else
80 # define BOOT_TARGET_DEVICES_NOR(func)
81 #endif
82
83 #define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
84         "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
85                 "echo NOR: Trying to boot script at ${scriptaddr} && " \
86                 "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0"
87
88 #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
89         "nor "
90
91 #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
92         "bootcmd_qspi=sf probe 0 0 0 && " \
93         "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
94         "echo QSPI: Trying to boot script at ${scriptaddr} && " \
95         "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0"
96
97 #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
98         "qspi "
99
100 #define BOOT_TARGET_DEVICES_JTAG(func)  func(JTAG, jtag, na)
101
102 #define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
103         "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \
104                 "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0"
105
106 #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
107         "jtag "
108
109 #define BOOT_TARGET_DEVICES(func) \
110         BOOT_TARGET_DEVICES_JTAG(func) \
111         BOOT_TARGET_DEVICES_QSPI(func) \
112         BOOT_TARGET_DEVICES_NOR(func) \
113         BOOT_TARGET_DEVICES_DHCP(func) \
114         BOOT_TARGET_DEVICES_PXE(func)
115
116 #include <config_distro_bootcmd.h>
117
118 #ifndef CONFIG_EXTRA_ENV_SETTINGS
119 #define CONFIG_EXTRA_ENV_SETTINGS \
120         "unlock=yes\0"\
121         "nor0=flash-0\0"\
122         "mtdparts=mtdparts=flash-0:"\
123         "256k(u-boot),256k(env),3m(kernel),"\
124         "1m(romfs),1m(cramfs),-(jffs2)\0"\
125         "nc=setenv stdout nc;"\
126         "setenv stdin nc\0" \
127         "serial=setenv stdout serial;"\
128         "setenv stdin serial\0"\
129         "script_size_f=0x40000\0"\
130         BOOTENV
131 #endif
132
133 #if defined(CONFIG_XILINX_AXIEMAC)
134 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN        1
135 #endif
136
137 /* SPL part */
138
139 #define CONFIG_SYS_UBOOT_BASE           CONFIG_SYS_TEXT_BASE
140
141 /* for booting directly linux */
142 #define CONFIG_SYS_FDT_BASE             (CONFIG_SYS_TEXT_BASE + \
143                                         0x40000)
144
145 #define CONFIG_SYS_SPL_ARGS_ADDR        (CONFIG_SYS_TEXT_BASE + \
146                                          0x1000000)
147
148 /* SP location before relocation, must use scratch RAM */
149 /* BRAM start */
150 #define CONFIG_SYS_INIT_RAM_ADDR        0x0
151 /* BRAM size - will be generated */
152 #define CONFIG_SYS_INIT_RAM_SIZE        0x100000
153
154 # define CONFIG_SPL_STACK_ADDR          (CONFIG_SYS_INIT_RAM_ADDR + \
155                                          CONFIG_SYS_INIT_RAM_SIZE)
156
157 /* Just for sure that there is a space for stack */
158 #define CONFIG_SPL_STACK_SIZE           0x100
159
160 #define CONFIG_SPL_MAX_FOOTPRINT        (CONFIG_SYS_INIT_RAM_SIZE - \
161                                          CONFIG_SYS_INIT_RAM_ADDR - \
162                                          CONFIG_SYS_MALLOC_F_LEN - \
163                                          CONFIG_SPL_STACK_SIZE)
164
165 #endif  /* __CONFIG_H */