1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
11 extern int ocm_post_test (int flags
);
12 extern int cache_post_test (int flags
);
13 extern int watchdog_post_test (int flags
);
14 extern int i2c_post_test (int flags
);
15 extern int rtc_post_test (int flags
);
16 extern int memory_post_test (int flags
);
17 extern int cpu_post_test (int flags
);
18 extern int fpu_post_test (int flags
);
19 extern int uart_post_test (int flags
);
20 extern int ether_post_test (int flags
);
21 extern int spi_post_test (int flags
);
22 extern int usb_post_test (int flags
);
23 extern int spr_post_test (int flags
);
24 extern int sysmon_post_test (int flags
);
25 extern int dsp_post_test (int flags
);
26 extern int codec_post_test (int flags
);
27 extern int ecc_post_test (int flags
);
28 extern int flash_post_test(int flags
);
30 extern int dspic_init_post_test (int flags
);
31 extern int dspic_post_test (int flags
);
32 extern int gdc_post_test (int flags
);
33 extern int fpga_post_test (int flags
);
34 extern int lwmon5_watchdog_post_test(int flags
);
35 extern int sysmon1_post_test(int flags
);
36 extern int coprocessor_post_test(int flags
);
37 extern int led_post_test(int flags
);
38 extern int button_post_test(int flags
);
39 extern int memory_regions_post_test(int flags
);
41 extern int sysmon_init_f (void);
43 extern void sysmon_reloc (void);
46 struct post_test post_list
[] =
48 #if CONFIG_POST & CONFIG_SYS_POST_OCM
52 "This test checks on chip memory (OCM).",
53 POST_ROM
| POST_ALWAYS
| POST_PREREL
| POST_CRITICAL
| POST_STOP
,
60 #if CONFIG_POST & CONFIG_SYS_POST_CACHE
64 "This test verifies the CPU cache operation.",
65 POST_RAM
| POST_ALWAYS
,
72 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
73 #if defined(CONFIG_POST_WATCHDOG)
77 "Watchdog timer test",
79 "This test checks the watchdog timer.",
80 POST_RAM
| POST_POWERON
| POST_SLOWTEST
| POST_MANUAL
| POST_REBOOT
,
84 CONFIG_SYS_POST_WATCHDOG
88 #if CONFIG_POST & CONFIG_SYS_POST_I2C
92 "This test verifies the I2C operation.",
93 POST_RAM
| POST_ALWAYS
,
100 #if CONFIG_POST & CONFIG_SYS_POST_RTC
104 "This test verifies the RTC operation.",
105 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
112 #if CONFIG_POST & CONFIG_SYS_POST_MEMORY
116 "This test checks RAM.",
117 POST_ROM
| POST_POWERON
| POST_SLOWTEST
| POST_PREREL
,
121 CONFIG_SYS_POST_MEMORY
124 #if CONFIG_POST & CONFIG_SYS_POST_CPU
128 "This test verifies the arithmetic logic unit of"
130 POST_RAM
| POST_ALWAYS
,
137 #if CONFIG_POST & CONFIG_SYS_POST_FPU
141 "This test verifies the arithmetic logic unit of"
143 POST_RAM
| POST_ALWAYS
,
150 #if CONFIG_POST & CONFIG_SYS_POST_UART
151 #if defined(CONFIG_POST_UART)
157 "This test verifies the UART operation.",
158 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
164 #endif /* CONFIG_POST_UART */
166 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
170 "This test verifies the ETHERNET operation.",
171 POST_RAM
| POST_ALWAYS
,
175 CONFIG_SYS_POST_ETHER
178 #if CONFIG_POST & CONFIG_SYS_POST_USB
182 "This test verifies the USB operation.",
183 POST_RAM
| POST_ALWAYS
,
190 #if CONFIG_POST & CONFIG_SYS_POST_SPR
194 "This test checks SPR contents.",
195 POST_RAM
| POST_ALWAYS
,
202 #if CONFIG_POST & CONFIG_SYS_POST_SYSMON
206 "This test monitors system hardware.",
207 POST_RAM
| POST_ALWAYS
,
211 CONFIG_SYS_POST_SYSMON
214 #if CONFIG_POST & CONFIG_SYS_POST_DSP
218 "This test checks any connected DSP(s).",
219 POST_RAM
| POST_ALWAYS
,
226 #if CONFIG_POST & CONFIG_SYS_POST_CODEC
230 "This test checks any connected codec(s).",
231 POST_RAM
| POST_MANUAL
,
235 CONFIG_SYS_POST_CODEC
238 #if CONFIG_POST & CONFIG_SYS_POST_ECC
242 "This test checks the ECC facility of memory.",
243 POST_ROM
| POST_ALWAYS
| POST_PREREL
,
250 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
253 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
256 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
259 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
262 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
265 #if CONFIG_POST & CONFIG_SYS_POST_COPROC
267 "Coprocessors communication test",
269 "This test checks communication with coprocessors.",
270 POST_RAM
| POST_ALWAYS
| POST_CRITICAL
,
271 &coprocessor_post_test
,
274 CONFIG_SYS_POST_COPROC
277 #if CONFIG_POST & CONFIG_SYS_POST_FLASH
279 "Parallel NOR flash test",
281 "This test verifies parallel flash operations.",
282 POST_RAM
| POST_SLOWTEST
| POST_MANUAL
,
286 CONFIG_SYS_POST_FLASH
289 #if CONFIG_POST & CONFIG_SYS_POST_MEM_REGIONS
291 "Memory regions test",
293 "This test checks regularly placed regions of the RAM.",
294 POST_ROM
| POST_SLOWTEST
| POST_PREREL
,
295 &memory_regions_post_test
,
298 CONFIG_SYS_POST_MEM_REGIONS
303 unsigned int post_list_size
= ARRAY_SIZE(post_list
);