Convert CONFIG_SPL_STACK to Kconfig
[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 #define CONFIG_SYS_BOOTM_LEN    (64 * 1024 * 1024)
15
16 /* uart */
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
21 /* Stack location before relocation */
22 #define CONFIG_SYS_INIT_SP_OFFSET       (CONFIG_SYS_TEXT_BASE - \
23                                          CONFIG_SYS_MALLOC_F_LEN)
24
25 #ifdef CONFIG_CFI_FLASH
26 /* ?empty sector */
27 # define CONFIG_SYS_FLASH_EMPTY_INFO    1
28 /* max number of memory banks */
29 /* max number of sectors on one chip */
30 # define CONFIG_SYS_MAX_FLASH_SECT      2048
31 #endif
32
33 #ifndef XILINX_DCACHE_BYTE_SIZE
34 #define XILINX_DCACHE_BYTE_SIZE 32768
35 #endif
36
37 #define CONFIG_HOSTNAME         "microblaze-generic"
38
39 /* architecture dependent code */
40 #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
41 #define BOOT_TARGET_DEVICES_PXE(func)   func(PXE, pxe, na)
42 #else
43 #define BOOT_TARGET_DEVICES_PXE(func)
44 #endif
45
46 #if defined(CONFIG_CMD_DHCP)
47 #define BOOT_TARGET_DEVICES_DHCP(func)  func(DHCP, dhcp, na)
48 #else
49 #define BOOT_TARGET_DEVICES_DHCP(func)
50 #endif
51
52 #if defined(CONFIG_SPI_FLASH)
53 # define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na)
54 #else
55 # define BOOT_TARGET_DEVICES_QSPI(func)
56 #endif
57
58 #if defined(CONFIG_MTD_NOR_FLASH)
59 # define BOOT_TARGET_DEVICES_NOR(func)  func(NOR, nor, na)
60 #else
61 # define BOOT_TARGET_DEVICES_NOR(func)
62 #endif
63
64 #define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
65         "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
66                 "echo NOR: Trying to boot script at ${scriptaddr} && " \
67                 "source ${scriptaddr}; echo NOR: SCRIPT FAILED: continuing...;\0"
68
69 #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
70         "nor "
71
72 #define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
73         "bootcmd_qspi=sf probe 0 0 0 && " \
74         "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
75         "echo QSPI: Trying to boot script at ${scriptaddr} && " \
76         "source ${scriptaddr}; echo QSPI: SCRIPT FAILED: continuing...;\0"
77
78 #define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
79         "qspi "
80
81 #define BOOT_TARGET_DEVICES_JTAG(func)  func(JTAG, jtag, na)
82
83 #define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
84         "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \
85                 "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0"
86
87 #define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
88         "jtag "
89
90 #define BOOT_TARGET_DEVICES(func) \
91         BOOT_TARGET_DEVICES_JTAG(func) \
92         BOOT_TARGET_DEVICES_QSPI(func) \
93         BOOT_TARGET_DEVICES_NOR(func) \
94         BOOT_TARGET_DEVICES_DHCP(func) \
95         BOOT_TARGET_DEVICES_PXE(func)
96
97 #include <config_distro_bootcmd.h>
98
99 #ifndef CONFIG_EXTRA_ENV_SETTINGS
100 #define CONFIG_EXTRA_ENV_SETTINGS \
101         "unlock=yes\0"\
102         "nor0=flash-0\0"\
103         "mtdparts=mtdparts=flash-0:"\
104         "256k(u-boot),256k(env),3m(kernel),"\
105         "1m(romfs),1m(cramfs),-(jffs2)\0"\
106         "nc=setenv stdout nc;"\
107         "setenv stdin nc\0" \
108         "serial=setenv stdout serial;"\
109         "setenv stdin serial\0"\
110         "script_size_f=0x40000\0"\
111         BOOTENV
112 #endif
113
114 /* SPL part */
115
116 #define CONFIG_SYS_UBOOT_BASE           CONFIG_SYS_TEXT_BASE
117
118 /* for booting directly linux */
119 #define CONFIG_SYS_FDT_BASE             (CONFIG_SYS_TEXT_BASE + \
120                                         0x40000)
121
122 #define CONFIG_SYS_SPL_ARGS_ADDR        (CONFIG_SYS_TEXT_BASE + \
123                                          0x1000000)
124
125 /* SP location before relocation, must use scratch RAM */
126 /* BRAM start */
127 #define CONFIG_SYS_INIT_RAM_ADDR        0x0
128 /* BRAM size - will be generated */
129 #define CONFIG_SYS_INIT_RAM_SIZE        0x100000
130
131 /* Just for sure that there is a space for stack */
132 #define CONFIG_SPL_STACK_SIZE           0x100
133
134 #endif  /* __CONFIG_H */