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