3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
7 * Be sure to mark tests to be run before relocation as such with the
8 * CONFIG_SYS_POST_PREREL flag so that logging is done correctly if the
9 * logbuffer support is enabled.
16 extern int ocm_post_test (int flags
);
17 extern int cache_post_test (int flags
);
18 extern int watchdog_post_test (int flags
);
19 extern int i2c_post_test (int flags
);
20 extern int rtc_post_test (int flags
);
21 extern int memory_post_test (int flags
);
22 extern int cpu_post_test (int flags
);
23 extern int fpu_post_test (int flags
);
24 extern int uart_post_test (int flags
);
25 extern int ether_post_test (int flags
);
26 extern int spi_post_test (int flags
);
27 extern int usb_post_test (int flags
);
28 extern int spr_post_test (int flags
);
29 extern int sysmon_post_test (int flags
);
30 extern int dsp_post_test (int flags
);
31 extern int codec_post_test (int flags
);
32 extern int ecc_post_test (int flags
);
33 extern int flash_post_test(int flags
);
35 extern int dspic_init_post_test (int flags
);
36 extern int dspic_post_test (int flags
);
37 extern int gdc_post_test (int flags
);
38 extern int fpga_post_test (int flags
);
39 extern int lwmon5_watchdog_post_test(int flags
);
40 extern int sysmon1_post_test(int flags
);
41 extern int coprocessor_post_test(int flags
);
42 extern int led_post_test(int flags
);
43 extern int button_post_test(int flags
);
44 extern int memory_regions_post_test(int flags
);
46 extern int sysmon_init_f (void);
48 extern void sysmon_reloc (void);
51 struct post_test post_list
[] =
53 #if CONFIG_POST & CONFIG_SYS_POST_OCM
57 "This test checks on chip memory (OCM).",
58 POST_ROM
| POST_ALWAYS
| POST_PREREL
| POST_CRITICAL
| POST_STOP
,
65 #if CONFIG_POST & CONFIG_SYS_POST_CACHE
69 "This test verifies the CPU cache operation.",
70 POST_RAM
| POST_ALWAYS
,
77 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
78 #if defined(CONFIG_POST_WATCHDOG)
82 "Watchdog timer test",
84 "This test checks the watchdog timer.",
85 POST_RAM
| POST_POWERON
| POST_SLOWTEST
| POST_MANUAL
| POST_REBOOT
,
89 CONFIG_SYS_POST_WATCHDOG
93 #if CONFIG_POST & CONFIG_SYS_POST_I2C
97 "This test verifies the I2C operation.",
98 POST_RAM
| POST_ALWAYS
,
105 #if CONFIG_POST & CONFIG_SYS_POST_RTC
109 "This test verifies the RTC operation.",
110 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
117 #if CONFIG_POST & CONFIG_SYS_POST_MEMORY
121 "This test checks RAM.",
122 POST_ROM
| POST_POWERON
| POST_SLOWTEST
| POST_PREREL
,
126 CONFIG_SYS_POST_MEMORY
129 #if CONFIG_POST & CONFIG_SYS_POST_CPU
133 "This test verifies the arithmetic logic unit of"
135 POST_RAM
| POST_ALWAYS
,
142 #if CONFIG_POST & CONFIG_SYS_POST_FPU
146 "This test verifies the arithmetic logic unit of"
148 POST_RAM
| POST_ALWAYS
,
155 #if CONFIG_POST & CONFIG_SYS_POST_UART
156 #if defined(CONFIG_POST_UART)
162 "This test verifies the UART operation.",
163 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
169 #endif /* CONFIG_POST_UART */
171 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
175 "This test verifies the ETHERNET operation.",
176 POST_RAM
| POST_ALWAYS
,
180 CONFIG_SYS_POST_ETHER
183 #if CONFIG_POST & CONFIG_SYS_POST_USB
187 "This test verifies the USB operation.",
188 POST_RAM
| POST_ALWAYS
,
195 #if CONFIG_POST & CONFIG_SYS_POST_SPR
199 "This test checks SPR contents.",
200 POST_RAM
| POST_ALWAYS
,
207 #if CONFIG_POST & CONFIG_SYS_POST_SYSMON
211 "This test monitors system hardware.",
212 POST_RAM
| POST_ALWAYS
,
216 CONFIG_SYS_POST_SYSMON
219 #if CONFIG_POST & CONFIG_SYS_POST_DSP
223 "This test checks any connected DSP(s).",
224 POST_RAM
| POST_ALWAYS
,
231 #if CONFIG_POST & CONFIG_SYS_POST_CODEC
235 "This test checks any connected codec(s).",
236 POST_RAM
| POST_MANUAL
,
240 CONFIG_SYS_POST_CODEC
243 #if CONFIG_POST & CONFIG_SYS_POST_ECC
247 "This test checks the ECC facility of memory.",
248 POST_ROM
| POST_ALWAYS
| POST_PREREL
,
255 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
258 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
261 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
264 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
267 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
270 #if CONFIG_POST & CONFIG_SYS_POST_COPROC
272 "Coprocessors communication test",
274 "This test checks communication with coprocessors.",
275 POST_RAM
| POST_ALWAYS
| POST_CRITICAL
,
276 &coprocessor_post_test
,
279 CONFIG_SYS_POST_COPROC
282 #if CONFIG_POST & CONFIG_SYS_POST_FLASH
284 "Parallel NOR flash test",
286 "This test verifies parallel flash operations.",
287 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
291 CONFIG_SYS_POST_FLASH
294 #if CONFIG_POST & CONFIG_SYS_POST_MEM_REGIONS
296 "Memory regions test",
298 "This test checks regularly placed regions of the RAM.",
299 POST_ROM
| POST_SLOWTEST
| POST_PREREL
,
300 &memory_regions_post_test
,
303 CONFIG_SYS_POST_MEM_REGIONS
308 unsigned int post_list_size
= ARRAY_SIZE(post_list
);