3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
12 extern int ocm_post_test (int flags);
13 extern int cache_post_test (int flags);
14 extern int watchdog_post_test (int flags);
15 extern int i2c_post_test (int flags);
16 extern int rtc_post_test (int flags);
17 extern int memory_post_test (int flags);
18 extern int cpu_post_test (int flags);
19 extern int fpu_post_test (int flags);
20 extern int uart_post_test (int flags);
21 extern int ether_post_test (int flags);
22 extern int spi_post_test (int flags);
23 extern int usb_post_test (int flags);
24 extern int spr_post_test (int flags);
25 extern int sysmon_post_test (int flags);
26 extern int dsp_post_test (int flags);
27 extern int codec_post_test (int flags);
28 extern int ecc_post_test (int flags);
29 extern int flash_post_test(int flags);
31 extern int dspic_init_post_test (int flags);
32 extern int dspic_post_test (int flags);
33 extern int gdc_post_test (int flags);
34 extern int fpga_post_test (int flags);
35 extern int lwmon5_watchdog_post_test(int flags);
36 extern int sysmon1_post_test(int flags);
37 extern int coprocessor_post_test(int flags);
38 extern int led_post_test(int flags);
39 extern int button_post_test(int flags);
40 extern int memory_regions_post_test(int flags);
42 extern int sysmon_init_f (void);
44 extern void sysmon_reloc (void);
47 struct post_test post_list[] =
49 #if CONFIG_POST & CONFIG_SYS_POST_OCM
53 "This test checks on chip memory (OCM).",
54 POST_ROM | POST_ALWAYS | POST_PREREL | POST_CRITICAL | POST_STOP,
61 #if CONFIG_POST & CONFIG_SYS_POST_CACHE
65 "This test verifies the CPU cache operation.",
66 POST_RAM | POST_ALWAYS,
73 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
74 #if defined(CONFIG_POST_WATCHDOG)
78 "Watchdog timer test",
80 "This test checks the watchdog timer.",
81 POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT,
85 CONFIG_SYS_POST_WATCHDOG
89 #if CONFIG_POST & CONFIG_SYS_POST_I2C
93 "This test verifies the I2C operation.",
94 POST_RAM | POST_ALWAYS,
101 #if CONFIG_POST & CONFIG_SYS_POST_RTC
105 "This test verifies the RTC operation.",
106 POST_RAM | POST_SLOWTEST | POST_MANUAL,
113 #if CONFIG_POST & CONFIG_SYS_POST_MEMORY
117 "This test checks RAM.",
118 POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL,
122 CONFIG_SYS_POST_MEMORY
125 #if CONFIG_POST & CONFIG_SYS_POST_CPU
129 "This test verifies the arithmetic logic unit of"
131 POST_RAM | POST_ALWAYS,
138 #if CONFIG_POST & CONFIG_SYS_POST_FPU
142 "This test verifies the arithmetic logic unit of"
144 POST_RAM | POST_ALWAYS,
151 #if CONFIG_POST & CONFIG_SYS_POST_UART
152 #if defined(CONFIG_POST_UART)
158 "This test verifies the UART operation.",
159 POST_RAM | POST_SLOWTEST | POST_MANUAL,
165 #endif /* CONFIG_POST_UART */
167 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
171 "This test verifies the ETHERNET operation.",
172 POST_RAM | POST_ALWAYS,
176 CONFIG_SYS_POST_ETHER
179 #if CONFIG_POST & CONFIG_SYS_POST_USB
183 "This test verifies the USB operation.",
184 POST_RAM | POST_ALWAYS,
191 #if CONFIG_POST & CONFIG_SYS_POST_SPR
195 "This test checks SPR contents.",
196 POST_RAM | POST_ALWAYS,
203 #if CONFIG_POST & CONFIG_SYS_POST_SYSMON
207 "This test monitors system hardware.",
208 POST_RAM | POST_ALWAYS,
212 CONFIG_SYS_POST_SYSMON
215 #if CONFIG_POST & CONFIG_SYS_POST_DSP
219 "This test checks any connected DSP(s).",
220 POST_RAM | POST_ALWAYS,
227 #if CONFIG_POST & CONFIG_SYS_POST_CODEC
231 "This test checks any connected codec(s).",
232 POST_RAM | POST_MANUAL,
236 CONFIG_SYS_POST_CODEC
239 #if CONFIG_POST & CONFIG_SYS_POST_ECC
243 "This test checks the ECC facility of memory.",
244 POST_ROM | POST_ALWAYS | POST_PREREL,
251 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
254 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
257 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
260 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
263 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
266 #if CONFIG_POST & CONFIG_SYS_POST_COPROC
268 "Coprocessors communication test",
270 "This test checks communication with coprocessors.",
271 POST_RAM | POST_ALWAYS | POST_CRITICAL,
272 &coprocessor_post_test,
275 CONFIG_SYS_POST_COPROC
278 #if CONFIG_POST & CONFIG_SYS_POST_FLASH
280 "Parallel NOR flash test",
282 "This test verifies parallel flash operations.",
283 POST_RAM | POST_SLOWTEST | POST_MANUAL,
287 CONFIG_SYS_POST_FLASH
290 #if CONFIG_POST & CONFIG_SYS_POST_MEM_REGIONS
292 "Memory regions test",
294 "This test checks regularly placed regions of the RAM.",
295 POST_ROM | POST_SLOWTEST | POST_PREREL,
296 &memory_regions_post_test,
299 CONFIG_SYS_POST_MEM_REGIONS
304 unsigned int post_list_size = ARRAY_SIZE(post_list);