3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * Be sure to mark tests to be run before relocation as such with the
24 * CONFIG_SYS_POST_PREREL flag so that logging is done correctly if the
25 * logbuffer support is enabled.
32 extern int ocm_post_test (int flags);
33 extern int cache_post_test (int flags);
34 extern int watchdog_post_test (int flags);
35 extern int i2c_post_test (int flags);
36 extern int rtc_post_test (int flags);
37 extern int memory_post_test (int flags);
38 extern int cpu_post_test (int flags);
39 extern int fpu_post_test (int flags);
40 extern int uart_post_test (int flags);
41 extern int ether_post_test (int flags);
42 extern int spi_post_test (int flags);
43 extern int usb_post_test (int flags);
44 extern int spr_post_test (int flags);
45 extern int sysmon_post_test (int flags);
46 extern int dsp_post_test (int flags);
47 extern int codec_post_test (int flags);
48 extern int ecc_post_test (int flags);
49 extern int flash_post_test(int flags);
51 extern int dspic_init_post_test (int flags);
52 extern int dspic_post_test (int flags);
53 extern int gdc_post_test (int flags);
54 extern int fpga_post_test (int flags);
55 extern int lwmon5_watchdog_post_test(int flags);
56 extern int sysmon1_post_test(int flags);
57 extern int coprocessor_post_test(int flags);
58 extern int led_post_test(int flags);
59 extern int button_post_test(int flags);
61 extern int sysmon_init_f (void);
63 extern void sysmon_reloc (void);
66 struct post_test post_list[] =
68 #if CONFIG_POST & CONFIG_SYS_POST_OCM
72 "This test checks on chip memory (OCM).",
73 POST_ROM | POST_ALWAYS | POST_PREREL | POST_CRITICAL | POST_STOP,
80 #if CONFIG_POST & CONFIG_SYS_POST_CACHE
84 "This test verifies the CPU cache operation.",
85 POST_RAM | POST_ALWAYS,
92 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
93 #if defined(CONFIG_POST_WATCHDOG)
97 "Watchdog timer test",
99 "This test checks the watchdog timer.",
100 POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT,
104 CONFIG_SYS_POST_WATCHDOG
108 #if CONFIG_POST & CONFIG_SYS_POST_I2C
112 "This test verifies the I2C operation.",
113 POST_RAM | POST_ALWAYS,
120 #if CONFIG_POST & CONFIG_SYS_POST_RTC
124 "This test verifies the RTC operation.",
125 POST_RAM | POST_SLOWTEST | POST_MANUAL,
132 #if CONFIG_POST & CONFIG_SYS_POST_MEMORY
136 "This test checks RAM.",
137 POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL,
141 CONFIG_SYS_POST_MEMORY
144 #if CONFIG_POST & CONFIG_SYS_POST_CPU
148 "This test verifies the arithmetic logic unit of"
150 POST_RAM | POST_ALWAYS,
157 #if CONFIG_POST & CONFIG_SYS_POST_FPU
161 "This test verifies the arithmetic logic unit of"
163 POST_RAM | POST_ALWAYS,
170 #if CONFIG_POST & CONFIG_SYS_POST_UART
171 #if defined(CONFIG_POST_UART)
177 "This test verifies the UART operation.",
178 POST_RAM | POST_SLOWTEST | POST_MANUAL,
184 #endif /* CONFIG_POST_UART */
186 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
190 "This test verifies the ETHERNET operation.",
191 POST_RAM | POST_ALWAYS | POST_MANUAL,
195 CONFIG_SYS_POST_ETHER
198 #if CONFIG_POST & CONFIG_SYS_POST_SPI
202 "This test verifies the SPI operation.",
203 POST_RAM | POST_ALWAYS | POST_MANUAL,
210 #if CONFIG_POST & CONFIG_SYS_POST_USB
214 "This test verifies the USB operation.",
215 POST_RAM | POST_ALWAYS | POST_MANUAL,
222 #if CONFIG_POST & CONFIG_SYS_POST_SPR
226 "This test checks SPR contents.",
227 POST_RAM | POST_ALWAYS,
234 #if CONFIG_POST & CONFIG_SYS_POST_SYSMON
238 "This test monitors system hardware.",
239 POST_RAM | POST_ALWAYS,
243 CONFIG_SYS_POST_SYSMON
246 #if CONFIG_POST & CONFIG_SYS_POST_DSP
250 "This test checks any connected DSP(s).",
251 POST_RAM | POST_ALWAYS | POST_MANUAL,
258 #if CONFIG_POST & CONFIG_SYS_POST_CODEC
262 "This test checks any connected codec(s).",
263 POST_RAM | POST_MANUAL,
267 CONFIG_SYS_POST_CODEC
270 #if CONFIG_POST & CONFIG_SYS_POST_ECC
274 "This test checks the ECC facility of memory.",
275 POST_ROM | POST_ALWAYS | POST_PREREL,
282 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
285 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
288 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
291 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
294 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
297 #if CONFIG_POST & CONFIG_SYS_POST_COPROC
299 "Coprocessors communication test",
301 "This test checks communication with coprocessors.",
302 POST_RAM | POST_ALWAYS | POST_CRITICAL,
303 &coprocessor_post_test,
306 CONFIG_SYS_POST_COPROC
309 #if CONFIG_POST & CONFIG_SYS_POST_FLASH
311 "Parallel NOR flash test",
313 "This test verifies parallel flash operations.",
314 POST_RAM | POST_SLOWTEST | POST_MANUAL,
318 CONFIG_SYS_POST_FLASH
323 unsigned int post_list_size = ARRAY_SIZE(post_list);