Blame view
post/tests.c
6.09 KB
324f6cfd1 Initial revision |
1 2 3 4 |
/* * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * |
1a4596601 Add GPL-2.0+ SPDX... |
5 |
* SPDX-License-Identifier: GPL-2.0+ |
324f6cfd1 Initial revision |
6 7 8 |
*/ #include <common.h> |
324f6cfd1 Initial revision |
9 |
#include <post.h> |
6e8ec6822 POST: OCM test ad... |
10 |
extern int ocm_post_test (int flags); |
324f6cfd1 Initial revision |
11 12 13 14 15 16 |
extern int cache_post_test (int flags); extern int watchdog_post_test (int flags); extern int i2c_post_test (int flags); extern int rtc_post_test (int flags); extern int memory_post_test (int flags); extern int cpu_post_test (int flags); |
a11e06965 Extend POST suppo... |
17 |
extern int fpu_post_test (int flags); |
324f6cfd1 Initial revision |
18 19 20 21 22 |
extern int uart_post_test (int flags); extern int ether_post_test (int flags); extern int spi_post_test (int flags); extern int usb_post_test (int flags); extern int spr_post_test (int flags); |
4532cb696 * LWMON extensions: |
23 |
extern int sysmon_post_test (int flags); |
5a8c51cd5 * Patches by Pant... |
24 |
extern int dsp_post_test (int flags); |
79fa88f3e Patch by Pantelis... |
25 |
extern int codec_post_test (int flags); |
531e3e8b8 POST: Add ECC POS... |
26 |
extern int ecc_post_test (int flags); |
f6f7395eb post: new nor fla... |
27 |
extern int flash_post_test(int flags); |
4532cb696 * LWMON extensions: |
28 |
|
65b20dcef The patch adds ne... |
29 30 31 32 33 34 |
extern int dspic_init_post_test (int flags); extern int dspic_post_test (int flags); extern int gdc_post_test (int flags); extern int fpga_post_test (int flags); extern int lwmon5_watchdog_post_test(int flags); extern int sysmon1_post_test(int flags); |
29fd7ceb3 mpc5121: pdm360ng... |
35 |
extern int coprocessor_post_test(int flags); |
2151374fa Blackfin: post: g... |
36 37 |
extern int led_post_test(int flags); extern int button_post_test(int flags); |
8d3fcb5e6 POST: add new mem... |
38 |
extern int memory_regions_post_test(int flags); |
65b20dcef The patch adds ne... |
39 |
|
4532cb696 * LWMON extensions: |
40 41 42 |
extern int sysmon_init_f (void); extern void sysmon_reloc (void); |
324f6cfd1 Initial revision |
43 44 45 |
struct post_test post_list[] = { |
6d0f6bcf3 rename CFG_ macro... |
46 |
#if CONFIG_POST & CONFIG_SYS_POST_OCM |
6e8ec6822 POST: OCM test ad... |
47 48 49 50 |
{ "OCM test", "ocm", "This test checks on chip memory (OCM).", |
7845d4909 POST: mark OCM te... |
51 |
POST_ROM | POST_ALWAYS | POST_PREREL | POST_CRITICAL | POST_STOP, |
6e8ec6822 POST: OCM test ad... |
52 53 54 |
&ocm_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
55 |
CONFIG_SYS_POST_OCM |
6e8ec6822 POST: OCM test ad... |
56 57 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
58 |
#if CONFIG_POST & CONFIG_SYS_POST_CACHE |
324f6cfd1 Initial revision |
59 |
{ |
8bde7f776 * Code cleanup: |
60 61 62 63 64 65 66 |
"Cache test", "cache", "This test verifies the CPU cache operation.", POST_RAM | POST_ALWAYS, &cache_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
67 |
CONFIG_SYS_POST_CACHE |
324f6cfd1 Initial revision |
68 69 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
70 |
#if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG |
65b20dcef The patch adds ne... |
71 72 73 |
#if defined(CONFIG_POST_WATCHDOG) CONFIG_POST_WATCHDOG, #else |
324f6cfd1 Initial revision |
74 |
{ |
8bde7f776 * Code cleanup: |
75 76 77 |
"Watchdog timer test", "watchdog", "This test checks the watchdog timer.", |
8564acf93 * Patches by Yuli... |
78 |
POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT, |
8bde7f776 * Code cleanup: |
79 80 81 |
&watchdog_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
82 |
CONFIG_SYS_POST_WATCHDOG |
324f6cfd1 Initial revision |
83 84 |
}, #endif |
65b20dcef The patch adds ne... |
85 |
#endif |
6d0f6bcf3 rename CFG_ macro... |
86 |
#if CONFIG_POST & CONFIG_SYS_POST_I2C |
324f6cfd1 Initial revision |
87 |
{ |
8bde7f776 * Code cleanup: |
88 89 90 91 92 93 94 |
"I2C test", "i2c", "This test verifies the I2C operation.", POST_RAM | POST_ALWAYS, &i2c_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
95 |
CONFIG_SYS_POST_I2C |
324f6cfd1 Initial revision |
96 97 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
98 |
#if CONFIG_POST & CONFIG_SYS_POST_RTC |
324f6cfd1 Initial revision |
99 |
{ |
8bde7f776 * Code cleanup: |
100 101 102 |
"RTC test", "rtc", "This test verifies the RTC operation.", |
8564acf93 * Patches by Yuli... |
103 |
POST_RAM | POST_SLOWTEST | POST_MANUAL, |
8bde7f776 * Code cleanup: |
104 105 106 |
&rtc_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
107 |
CONFIG_SYS_POST_RTC |
324f6cfd1 Initial revision |
108 109 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
110 |
#if CONFIG_POST & CONFIG_SYS_POST_MEMORY |
324f6cfd1 Initial revision |
111 |
{ |
8bde7f776 * Code cleanup: |
112 113 114 |
"Memory test", "memory", "This test checks RAM.", |
8564acf93 * Patches by Yuli... |
115 |
POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL, |
8bde7f776 * Code cleanup: |
116 117 118 |
&memory_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
119 |
CONFIG_SYS_POST_MEMORY |
324f6cfd1 Initial revision |
120 121 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
122 |
#if CONFIG_POST & CONFIG_SYS_POST_CPU |
324f6cfd1 Initial revision |
123 |
{ |
8bde7f776 * Code cleanup: |
124 125 126 127 128 129 130 131 |
"CPU test", "cpu", "This test verifies the arithmetic logic unit of" " CPU.", POST_RAM | POST_ALWAYS, &cpu_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
132 |
CONFIG_SYS_POST_CPU |
324f6cfd1 Initial revision |
133 134 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
135 |
#if CONFIG_POST & CONFIG_SYS_POST_FPU |
a11e06965 Extend POST suppo... |
136 137 138 139 140 141 142 143 144 |
{ "FPU test", "fpu", "This test verifies the arithmetic logic unit of" " FPU.", POST_RAM | POST_ALWAYS, &fpu_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
145 |
CONFIG_SYS_POST_FPU |
a11e06965 Extend POST suppo... |
146 147 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
148 |
#if CONFIG_POST & CONFIG_SYS_POST_UART |
834a45d7e ppc4xx/POST: Add ... |
149 150 151 |
#if defined(CONFIG_POST_UART) CONFIG_POST_UART, #else |
324f6cfd1 Initial revision |
152 |
{ |
8bde7f776 * Code cleanup: |
153 154 155 |
"UART test", "uart", "This test verifies the UART operation.", |
8564acf93 * Patches by Yuli... |
156 |
POST_RAM | POST_SLOWTEST | POST_MANUAL, |
8bde7f776 * Code cleanup: |
157 158 159 |
&uart_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
160 |
CONFIG_SYS_POST_UART |
324f6cfd1 Initial revision |
161 |
}, |
834a45d7e ppc4xx/POST: Add ... |
162 |
#endif /* CONFIG_POST_UART */ |
324f6cfd1 Initial revision |
163 |
#endif |
6d0f6bcf3 rename CFG_ macro... |
164 |
#if CONFIG_POST & CONFIG_SYS_POST_ETHER |
324f6cfd1 Initial revision |
165 |
{ |
8bde7f776 * Code cleanup: |
166 167 168 |
"ETHERNET test", "ethernet", "This test verifies the ETHERNET operation.", |
5735bca5f post: Delete unne... |
169 |
POST_RAM | POST_ALWAYS, |
8bde7f776 * Code cleanup: |
170 171 172 |
ðer_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
173 |
CONFIG_SYS_POST_ETHER |
324f6cfd1 Initial revision |
174 175 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
176 |
#if CONFIG_POST & CONFIG_SYS_POST_USB |
324f6cfd1 Initial revision |
177 |
{ |
8bde7f776 * Code cleanup: |
178 179 180 |
"USB test", "usb", "This test verifies the USB operation.", |
5735bca5f post: Delete unne... |
181 |
POST_RAM | POST_ALWAYS, |
8bde7f776 * Code cleanup: |
182 183 184 |
&usb_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
185 |
CONFIG_SYS_POST_USB |
324f6cfd1 Initial revision |
186 187 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
188 |
#if CONFIG_POST & CONFIG_SYS_POST_SPR |
324f6cfd1 Initial revision |
189 |
{ |
8bde7f776 * Code cleanup: |
190 191 192 |
"SPR test", "spr", "This test checks SPR contents.", |
b2e2142c5 POST: Execute SPR... |
193 |
POST_RAM | POST_ALWAYS, |
8bde7f776 * Code cleanup: |
194 195 196 |
&spr_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
197 |
CONFIG_SYS_POST_SPR |
324f6cfd1 Initial revision |
198 199 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
200 |
#if CONFIG_POST & CONFIG_SYS_POST_SYSMON |
4532cb696 * LWMON extensions: |
201 |
{ |
8bde7f776 * Code cleanup: |
202 203 204 205 206 207 208 |
"SYSMON test", "sysmon", "This test monitors system hardware.", POST_RAM | POST_ALWAYS, &sysmon_post_test, &sysmon_init_f, &sysmon_reloc, |
6d0f6bcf3 rename CFG_ macro... |
209 |
CONFIG_SYS_POST_SYSMON |
4532cb696 * LWMON extensions: |
210 211 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
212 |
#if CONFIG_POST & CONFIG_SYS_POST_DSP |
5a8c51cd5 * Patches by Pant... |
213 214 215 216 |
{ "DSP test", "dsp", "This test checks any connected DSP(s).", |
5735bca5f post: Delete unne... |
217 |
POST_RAM | POST_ALWAYS, |
5a8c51cd5 * Patches by Pant... |
218 219 220 |
&dsp_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
221 |
CONFIG_SYS_POST_DSP |
5a8c51cd5 * Patches by Pant... |
222 223 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
224 |
#if CONFIG_POST & CONFIG_SYS_POST_CODEC |
79fa88f3e Patch by Pantelis... |
225 226 227 228 229 230 231 232 |
{ "CODEC test", "codec", "This test checks any connected codec(s).", POST_RAM | POST_MANUAL, &codec_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
233 |
CONFIG_SYS_POST_CODEC |
79fa88f3e Patch by Pantelis... |
234 235 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
236 |
#if CONFIG_POST & CONFIG_SYS_POST_ECC |
531e3e8b8 POST: Add ECC POS... |
237 238 239 |
{ "ECC test", "ecc", |
8dafa8747 Add attribute POS... |
240 241 |
"This test checks the ECC facility of memory.", POST_ROM | POST_ALWAYS | POST_PREREL, |
531e3e8b8 POST: Add ECC POS... |
242 243 244 |
&ecc_post_test, NULL, NULL, |
6d0f6bcf3 rename CFG_ macro... |
245 |
CONFIG_SYS_POST_ECC |
531e3e8b8 POST: Add ECC POS... |
246 247 |
}, #endif |
6d0f6bcf3 rename CFG_ macro... |
248 |
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC1 |
65b20dcef The patch adds ne... |
249 250 |
CONFIG_POST_BSPEC1, #endif |
6d0f6bcf3 rename CFG_ macro... |
251 |
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC2 |
65b20dcef The patch adds ne... |
252 253 |
CONFIG_POST_BSPEC2, #endif |
6d0f6bcf3 rename CFG_ macro... |
254 |
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC3 |
65b20dcef The patch adds ne... |
255 256 |
CONFIG_POST_BSPEC3, #endif |
6d0f6bcf3 rename CFG_ macro... |
257 |
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC4 |
65b20dcef The patch adds ne... |
258 259 |
CONFIG_POST_BSPEC4, #endif |
6d0f6bcf3 rename CFG_ macro... |
260 |
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC5 |
65b20dcef The patch adds ne... |
261 262 |
CONFIG_POST_BSPEC5, #endif |
29fd7ceb3 mpc5121: pdm360ng... |
263 264 265 266 267 268 269 270 271 272 |
#if CONFIG_POST & CONFIG_SYS_POST_COPROC { "Coprocessors communication test", "coproc_com", "This test checks communication with coprocessors.", POST_RAM | POST_ALWAYS | POST_CRITICAL, &coprocessor_post_test, NULL, NULL, CONFIG_SYS_POST_COPROC |
f6f7395eb post: new nor fla... |
273 274 275 276 277 278 279 280 281 282 283 284 285 |
}, #endif #if CONFIG_POST & CONFIG_SYS_POST_FLASH { "Parallel NOR flash test", "flash", "This test verifies parallel flash operations.", POST_RAM | POST_SLOWTEST | POST_MANUAL, &flash_post_test, NULL, NULL, CONFIG_SYS_POST_FLASH }, |
29fd7ceb3 mpc5121: pdm360ng... |
286 |
#endif |
8d3fcb5e6 POST: add new mem... |
287 288 289 290 291 292 293 294 295 296 297 298 |
#if CONFIG_POST & CONFIG_SYS_POST_MEM_REGIONS { "Memory regions test", "mem_regions", "This test checks regularly placed regions of the RAM.", POST_ROM | POST_SLOWTEST | POST_PREREL, &memory_regions_post_test, NULL, NULL, CONFIG_SYS_POST_MEM_REGIONS }, #endif |
324f6cfd1 Initial revision |
299 |
}; |
d2397817f post: use ARRAY_SIZE |
300 |
unsigned int post_list_size = ARRAY_SIZE(post_list); |