Blame view
include/configs/microblaze-generic.h
4.35 KB
83d290c56
|
1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
76316a318
|
2 |
/* |
4aecfb160
|
3 |
* (C) Copyright 2007-2010 Michal Simek |
76316a318
|
4 |
* |
cb1bc63b7
|
5 |
* Michal SIMEK <monstr@monstr.eu> |
76316a318
|
6 7 8 9 |
*/ #ifndef __CONFIG_H #define __CONFIG_H |
52a822ed9
|
10 |
#include "../board/xilinx/microblaze-generic/xparameters.h" |
76316a318
|
11 |
|
4aecfb160
|
12 |
/* MicroBlaze CPU */ |
1a50f164b
|
13 |
#define MICROBLAZE_V5 1 |
76316a318
|
14 |
|
8272f3103
|
15 |
#define CONFIG_SYS_BOOTM_LEN (64 * 1024 * 1024) |
bcec8f49d
|
16 |
/* linear and spi flash memory */ |
1fe7e8fa4
|
17 18 |
#ifdef XILINX_FLASH_START #define FLASH |
bcec8f49d
|
19 |
#undef SPIFLASH |
1fe7e8fa4
|
20 21 |
#undef RAMENV /* hold environment in flash */ #else |
bcec8f49d
|
22 23 |
#undef FLASH #undef SPIFLASH |
1fe7e8fa4
|
24 25 |
#define RAMENV /* hold environment in RAM */ #endif |
76316a318
|
26 |
/* uart */ |
67659e2e9
|
27 28 29 |
/* The following table includes the supported baudrates */ # define CONFIG_SYS_BAUDRATE_TABLE \ {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400} |
76316a318
|
30 |
/* setting reset address */ |
14d0a02a1
|
31 |
/*#define CONFIG_SYS_RESET_ADDRESS CONFIG_SYS_TEXT_BASE*/ |
76316a318
|
32 |
|
e945f6dc2
|
33 34 35 |
#define CONFIG_SYS_MALLOC_LEN 0xC0000 /* Stack location before relocation */ |
4fcd0b33c
|
36 37 |
#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_TEXT_BASE - \ CONFIG_SYS_MALLOC_F_LEN) |
76316a318
|
38 |
|
8f371b185
|
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
/* * CFI flash memory layout - Example * CONFIG_SYS_FLASH_BASE = 0x2200_0000; * CONFIG_SYS_FLASH_SIZE = 0x0080_0000; 8MB * * SECT_SIZE = 0x20000; 128kB is one sector * CONFIG_ENV_SIZE = SECT_SIZE; 128kB environment store * * 0x2200_0000 CONFIG_SYS_FLASH_BASE * FREE 256kB * 0x2204_0000 CONFIG_ENV_ADDR * ENV_AREA 128kB * 0x2206_0000 * FREE * 0x2280_0000 CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE * */ |
76316a318
|
56 |
#ifdef FLASH |
4aecfb160
|
57 58 |
# define CONFIG_SYS_FLASH_BASE XILINX_FLASH_START # define CONFIG_SYS_FLASH_SIZE XILINX_FLASH_SIZE |
4aecfb160
|
59 60 61 62 63 64 65 |
/* ?empty sector */ # define CONFIG_SYS_FLASH_EMPTY_INFO 1 /* max number of memory banks */ # define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of sectors on one chip */ # define CONFIG_SYS_MAX_FLASH_SECT 512 /* hardware flash protection */ |
22ff7f4d1
|
66 |
/* use buffered writes (20x faster) */ |
4aecfb160
|
67 |
# ifdef RAMENV |
bcec8f49d
|
68 |
# else /* FLASH && !RAMENV */ |
4aecfb160
|
69 |
/* 128K(one sector) for env */ |
bcec8f49d
|
70 |
# endif /* FLASH && !RAMBOOT */ |
76316a318
|
71 |
#else /* !FLASH */ |
bcec8f49d
|
72 73 |
#ifdef SPIFLASH |
bcec8f49d
|
74 |
# ifdef RAMENV |
bcec8f49d
|
75 |
# else /* SPIFLASH && !RAMENV */ |
bcec8f49d
|
76 |
/* 128K(two sectors) for env */ |
bcec8f49d
|
77 |
/* Warning: adjust the offset in respect of other flash content and size */ |
bcec8f49d
|
78 79 |
# endif /* SPIFLASH && !RAMBOOT */ #else /* !SPIFLASH */ |
4aecfb160
|
80 |
/* ENV in RAM */ |
bcec8f49d
|
81 |
#endif /* !SPIFLASH */ |
76316a318
|
82 |
#endif /* !FLASH */ |
c5ba6357b
|
83 84 |
#define XILINX_USE_ICACHE 1 #define XILINX_USE_DCACHE 1 |
e9b737deb
|
85 |
#if defined(XILINX_USE_ICACHE) |
4aecfb160
|
86 |
# define CONFIG_ICACHE |
e9b737deb
|
87 |
#else |
4aecfb160
|
88 |
# undef CONFIG_ICACHE |
e9b737deb
|
89 90 91 |
#endif #if defined(XILINX_USE_DCACHE) |
4aecfb160
|
92 |
# define CONFIG_DCACHE |
e9b737deb
|
93 |
#else |
4aecfb160
|
94 |
# undef CONFIG_DCACHE |
e9b737deb
|
95 |
#endif |
5811830fa
|
96 97 98 |
#ifndef XILINX_DCACHE_BYTE_SIZE #define XILINX_DCACHE_BYTE_SIZE 32768 #endif |
5dc11a511
|
99 |
/* |
079a136c3
|
100 101 102 |
* BOOTP options */ #define CONFIG_BOOTP_BOOTFILESIZE |
76316a318
|
103 |
|
7cfb13a7f
|
104 105 |
#if defined(CONFIG_MTD_PARTITIONS) /* MTD partitions */ |
144876a38
|
106 107 |
/* default mtd partition table */ |
144876a38
|
108 |
#endif |
4aecfb160
|
109 110 |
/* size of console buffer */ #define CONFIG_SYS_CBSIZE 512 |
4aecfb160
|
111 112 |
/* max number of command args */ #define CONFIG_SYS_MAXARGS 15 |
4aecfb160
|
113 |
/* default load address */ |
44a3a91cb
|
114 |
#define CONFIG_SYS_LOAD_ADDR 0 |
76316a318
|
115 |
|
5bc0543df
|
116 |
#define CONFIG_HOSTNAME "microblaze-generic" |
853643d8c
|
117 |
#define CONFIG_BOOTCOMMAND "base 0;tftp 11000000 image.img;bootm" |
76316a318
|
118 119 |
/* architecture dependent code */ |
6d0f6bcf3
|
120 |
#define CONFIG_SYS_USR_EXCEP /* user exception */ |
76316a318
|
121 |
|
2902a9b7a
|
122 |
#ifndef CONFIG_EXTRA_ENV_SETTINGS |
4aecfb160
|
123 |
#define CONFIG_EXTRA_ENV_SETTINGS "unlock=yes\0" \ |
c82a541d4
|
124 125 |
"nor0=flash-0\0"\ "mtdparts=mtdparts=flash-0:"\ |
144876a38
|
126 |
"256k(u-boot),256k(env),3m(kernel),"\ |
783764521
|
127 128 129 130 131 |
"1m(romfs),1m(cramfs),-(jffs2)\0"\ "nc=setenv stdout nc;"\ "setenv stdin nc\0" \ "serial=setenv stdout serial;"\ "setenv stdin serial\0" |
2902a9b7a
|
132 |
#endif |
144876a38
|
133 |
|
4632b1ea2
|
134 |
#if defined(CONFIG_XILINX_AXIEMAC) |
f5e5e1ff0
|
135 |
# define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 |
f5e5e1ff0
|
136 |
#endif |
9d2427450
|
137 |
/* SPL part */ |
9d2427450
|
138 |
|
4dd097427
|
139 |
#ifdef CONFIG_SYS_FLASH_BASE |
4dd097427
|
140 141 |
# define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_FLASH_BASE #endif |
9d2427450
|
142 143 |
/* for booting directly linux */ |
9d2427450
|
144 |
|
9d2427450
|
145 146 |
#define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x40000) |
35912528a
|
147 |
#define CONFIG_SYS_FDT_SIZE (16 << 10) |
9d2427450
|
148 149 150 151 152 153 154 |
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000) /* SP location before relocation, must use scratch RAM */ /* BRAM start */ #define CONFIG_SYS_INIT_RAM_ADDR 0x0 /* BRAM size - will be generated */ |
ca7d22662
|
155 |
#define CONFIG_SYS_INIT_RAM_SIZE 0x100000 |
9d2427450
|
156 |
|
ca7d22662
|
157 158 159 |
# define CONFIG_SPL_STACK_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ CONFIG_SYS_INIT_RAM_SIZE - \ CONFIG_SYS_MALLOC_F_LEN) |
9d2427450
|
160 161 162 |
/* Just for sure that there is a space for stack */ #define CONFIG_SPL_STACK_SIZE 0x100 |
9d2427450
|
163 164 |
#define CONFIG_SPL_MAX_FOOTPRINT (CONFIG_SYS_INIT_RAM_SIZE - \ CONFIG_SYS_INIT_RAM_ADDR - \ |
ca7d22662
|
165 |
CONFIG_SYS_MALLOC_F_LEN - \ |
9d2427450
|
166 |
CONFIG_SPL_STACK_SIZE) |
76316a318
|
167 |
#endif /* __CONFIG_H */ |