Blame view

include/configs/microblaze-generic.h 4.35 KB
83d290c56   Tom Rini   SPDX: Convert all...
1
  /* SPDX-License-Identifier: GPL-2.0+ */
76316a318   Michal Simek   [Microblaze][PATCH]
2
  /*
4aecfb160   Michal Simek   microblaze: Fix m...
3
   * (C) Copyright 2007-2010 Michal Simek
76316a318   Michal Simek   [Microblaze][PATCH]
4
   *
cb1bc63b7   Michal Simek   [FIX] Email repar...
5
   * Michal SIMEK <monstr@monstr.eu>
76316a318   Michal Simek   [Microblaze][PATCH]
6
7
8
9
   */
  
  #ifndef __CONFIG_H
  #define __CONFIG_H
52a822ed9   Michal Simek   microblaze: Renam...
10
  #include "../board/xilinx/microblaze-generic/xparameters.h"
76316a318   Michal Simek   [Microblaze][PATCH]
11

4aecfb160   Michal Simek   microblaze: Fix m...
12
  /* MicroBlaze CPU */
1a50f164b   Michal Simek   add: Microblaze V...
13
  #define	MICROBLAZE_V5		1
76316a318   Michal Simek   [Microblaze][PATCH]
14

8272f3103   Michal Simek   microblaze: Setup...
15
  #define CONFIG_SYS_BOOTM_LEN	(64 * 1024 * 1024)
bcec8f49d   Stephan Linz   microblaze: Wire ...
16
  /* linear and spi flash memory */
1fe7e8fa4   Stephan Linz   microblaze: Avoid...
17
18
  #ifdef XILINX_FLASH_START
  #define	FLASH
bcec8f49d   Stephan Linz   microblaze: Wire ...
19
  #undef	SPIFLASH
1fe7e8fa4   Stephan Linz   microblaze: Avoid...
20
21
  #undef	RAMENV	/* hold environment in flash */
  #else
bcec8f49d   Stephan Linz   microblaze: Wire ...
22
23
  #undef	FLASH
  #undef	SPIFLASH
1fe7e8fa4   Stephan Linz   microblaze: Avoid...
24
25
  #define	RAMENV	/* hold environment in RAM */
  #endif
76316a318   Michal Simek   [Microblaze][PATCH]
26
  /* uart */
67659e2e9   Michal Simek   microblaze: Move ...
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   Michal Simek   [Microblaze][PATCH]
30
  /* setting reset address */
14d0a02a1   Wolfgang Denk   Rename TEXT_BASE ...
31
  /*#define	CONFIG_SYS_RESET_ADDRESS	CONFIG_SYS_TEXT_BASE*/
76316a318   Michal Simek   [Microblaze][PATCH]
32

e945f6dc2   Michal Simek   microblaze: Move ...
33
34
35
  #define CONFIG_SYS_MALLOC_LEN	0xC0000
  
  /* Stack location before relocation */
4fcd0b33c   Michal Simek   microblaze: Make ...
36
37
  #define CONFIG_SYS_INIT_SP_OFFSET	(CONFIG_SYS_TEXT_BASE - \
  					 CONFIG_SYS_MALLOC_F_LEN)
76316a318   Michal Simek   [Microblaze][PATCH]
38

8f371b185   Stephan Linz   microblaze: Expan...
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   Michal Simek   [Microblaze][PATCH]
56
  #ifdef FLASH
4aecfb160   Michal Simek   microblaze: Fix m...
57
58
  # define CONFIG_SYS_FLASH_BASE		XILINX_FLASH_START
  # define CONFIG_SYS_FLASH_SIZE		XILINX_FLASH_SIZE
4aecfb160   Michal Simek   microblaze: Fix m...
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   Michal Simek   microblaze: Enabl...
66
  /* use buffered writes (20x faster) */
4aecfb160   Michal Simek   microblaze: Fix m...
67
  # ifdef	RAMENV
bcec8f49d   Stephan Linz   microblaze: Wire ...
68
  # else	/* FLASH && !RAMENV */
4aecfb160   Michal Simek   microblaze: Fix m...
69
  /* 128K(one sector) for env */
bcec8f49d   Stephan Linz   microblaze: Wire ...
70
  # endif /* FLASH && !RAMBOOT */
76316a318   Michal Simek   [Microblaze][PATCH]
71
  #else /* !FLASH */
bcec8f49d   Stephan Linz   microblaze: Wire ...
72
73
  
  #ifdef SPIFLASH
bcec8f49d   Stephan Linz   microblaze: Wire ...
74
  # ifdef	RAMENV
bcec8f49d   Stephan Linz   microblaze: Wire ...
75
  # else	/* SPIFLASH && !RAMENV */
bcec8f49d   Stephan Linz   microblaze: Wire ...
76
  /* 128K(two sectors) for env */
bcec8f49d   Stephan Linz   microblaze: Wire ...
77
  /* Warning: adjust the offset in respect of other flash content and size */
bcec8f49d   Stephan Linz   microblaze: Wire ...
78
79
  # endif /* SPIFLASH && !RAMBOOT */
  #else /* !SPIFLASH */
4aecfb160   Michal Simek   microblaze: Fix m...
80
  /* ENV in RAM */
bcec8f49d   Stephan Linz   microblaze: Wire ...
81
  #endif /* !SPIFLASH */
76316a318   Michal Simek   [Microblaze][PATCH]
82
  #endif /* !FLASH */
c5ba6357b   Michal Simek   microblaze: Enabl...
83
84
  #define XILINX_USE_ICACHE 1
  #define XILINX_USE_DCACHE 1
e9b737deb   Michal Simek   microblaze: Add c...
85
  #if defined(XILINX_USE_ICACHE)
4aecfb160   Michal Simek   microblaze: Fix m...
86
  # define CONFIG_ICACHE
e9b737deb   Michal Simek   microblaze: Add c...
87
  #else
4aecfb160   Michal Simek   microblaze: Fix m...
88
  # undef CONFIG_ICACHE
e9b737deb   Michal Simek   microblaze: Add c...
89
90
91
  #endif
  
  #if defined(XILINX_USE_DCACHE)
4aecfb160   Michal Simek   microblaze: Fix m...
92
  # define CONFIG_DCACHE
e9b737deb   Michal Simek   microblaze: Add c...
93
  #else
4aecfb160   Michal Simek   microblaze: Fix m...
94
  # undef CONFIG_DCACHE
e9b737deb   Michal Simek   microblaze: Add c...
95
  #endif
5811830fa   Michal Simek   microblaze: Flush...
96
97
98
  #ifndef XILINX_DCACHE_BYTE_SIZE
  #define XILINX_DCACHE_BYTE_SIZE	32768
  #endif
5dc11a511   Jon Loeliger   include/configs: ...
99
  /*
079a136c3   Jon Loeliger   include/configs/[...
100
101
102
   * BOOTP options
   */
  #define CONFIG_BOOTP_BOOTFILESIZE
76316a318   Michal Simek   [Microblaze][PATCH]
103

7cfb13a7f   Stephan Linz   microblaze: Enabl...
104
105
  #if defined(CONFIG_MTD_PARTITIONS)
  /* MTD partitions */
144876a38   Michal Simek   [PATCH] MTD parti...
106
107
  
  /* default mtd partition table */
144876a38   Michal Simek   [PATCH] MTD parti...
108
  #endif
4aecfb160   Michal Simek   microblaze: Fix m...
109
110
  /* size of console buffer */
  #define	CONFIG_SYS_CBSIZE	512
4aecfb160   Michal Simek   microblaze: Fix m...
111
112
  /* max number of command args */
  #define	CONFIG_SYS_MAXARGS	15
4aecfb160   Michal Simek   microblaze: Fix m...
113
  /* default load address */
44a3a91cb   Michal Simek   microblaze: Read ...
114
  #define	CONFIG_SYS_LOAD_ADDR	0
76316a318   Michal Simek   [Microblaze][PATCH]
115

5bc0543df   Mario Six   treewide: Convert...
116
  #define	CONFIG_HOSTNAME		"microblaze-generic"
853643d8c   Michal Simek   [FIX] change comm...
117
  #define	CONFIG_BOOTCOMMAND	"base 0;tftp 11000000 image.img;bootm"
76316a318   Michal Simek   [Microblaze][PATCH]
118
119
  
  /* architecture dependent code */
6d0f6bcf3   Jean-Christophe PLAGNIOL-VILLARD   rename CFG_ macro...
120
  #define	CONFIG_SYS_USR_EXCEP	/* user exception */
76316a318   Michal Simek   [Microblaze][PATCH]
121

2902a9b7a   Michal Simek   microblaze: Enabl...
122
  #ifndef CONFIG_EXTRA_ENV_SETTINGS
4aecfb160   Michal Simek   microblaze: Fix m...
123
  #define	CONFIG_EXTRA_ENV_SETTINGS	"unlock=yes\0" \
c82a541d4   Stephan Linz   microblaze: gener...
124
125
  					"nor0=flash-0\0"\
  					"mtdparts=mtdparts=flash-0:"\
144876a38   Michal Simek   [PATCH] MTD parti...
126
  					"256k(u-boot),256k(env),3m(kernel),"\
783764521   Michal Simek   microblaze: Enabl...
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   Michal Simek   microblaze: Enabl...
132
  #endif
144876a38   Michal Simek   [PATCH] MTD parti...
133

4632b1ea2   Michal Simek   microblaze: Remov...
134
  #if defined(CONFIG_XILINX_AXIEMAC)
f5e5e1ff0   Stephan Linz   microblaze: Enabl...
135
  # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN	1
f5e5e1ff0   Stephan Linz   microblaze: Enabl...
136
  #endif
9d2427450   Michal Simek   microblaze: Add S...
137
  /* SPL part */
9d2427450   Michal Simek   microblaze: Add S...
138

4dd097427   Michal Simek   microblaze: Enabl...
139
  #ifdef CONFIG_SYS_FLASH_BASE
4dd097427   Michal Simek   microblaze: Enabl...
140
141
  # define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_FLASH_BASE
  #endif
9d2427450   Michal Simek   microblaze: Add S...
142
143
  
  /* for booting directly linux */
9d2427450   Michal Simek   microblaze: Add S...
144

9d2427450   Michal Simek   microblaze: Add S...
145
146
  #define CONFIG_SYS_FDT_BASE		(CONFIG_SYS_FLASH_BASE + \
  					 0x40000)
35912528a   Shreenidhi Shedi   microblaze: Cosme...
147
  #define CONFIG_SYS_FDT_SIZE		(16 << 10)
9d2427450   Michal Simek   microblaze: Add S...
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   Michal Simek   microblaze: spl: ...
155
  #define CONFIG_SYS_INIT_RAM_SIZE	0x100000
9d2427450   Michal Simek   microblaze: Add S...
156

ca7d22662   Michal Simek   microblaze: spl: ...
157
158
159
  # define CONFIG_SPL_STACK_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + \
  					 CONFIG_SYS_INIT_RAM_SIZE - \
  					 CONFIG_SYS_MALLOC_F_LEN)
9d2427450   Michal Simek   microblaze: Add S...
160
161
162
  
  /* Just for sure that there is a space for stack */
  #define CONFIG_SPL_STACK_SIZE		0x100
9d2427450   Michal Simek   microblaze: Add S...
163
164
  #define CONFIG_SPL_MAX_FOOTPRINT	(CONFIG_SYS_INIT_RAM_SIZE - \
  					 CONFIG_SYS_INIT_RAM_ADDR - \
ca7d22662   Michal Simek   microblaze: spl: ...
165
  					 CONFIG_SYS_MALLOC_F_LEN - \
9d2427450   Michal Simek   microblaze: Add S...
166
  					 CONFIG_SPL_STACK_SIZE)
76316a318   Michal Simek   [Microblaze][PATCH]
167
  #endif	/* __CONFIG_H */