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);
50 extern int dspic_init_post_test (int flags);
51 extern int dspic_post_test (int flags);
52 extern int gdc_post_test (int flags);
53 extern int fpga_post_test (int flags);
54 extern int lwmon5_watchdog_post_test(int flags);
55 extern int sysmon1_post_test(int flags);
56 extern int coprocessor_post_test(int flags);
58 extern int sysmon_init_f (void);
60 extern void sysmon_reloc (void);
63 struct post_test post_list[] =
65 #if CONFIG_POST & CONFIG_SYS_POST_OCM
69 "This test checks on chip memory (OCM).",
70 POST_ROM | POST_ALWAYS | POST_PREREL | POST_CRITICAL | POST_STOP,
77 #if CONFIG_POST & CONFIG_SYS_POST_CACHE
81 "This test verifies the CPU cache operation.",
82 POST_RAM | POST_ALWAYS,
89 #if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG
90 #if defined(CONFIG_POST_WATCHDOG)
94 "Watchdog timer test",
96 "This test checks the watchdog timer.",
97 POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT,
101 CONFIG_SYS_POST_WATCHDOG
105 #if CONFIG_POST & CONFIG_SYS_POST_I2C
109 "This test verifies the I2C operation.",
110 POST_RAM | POST_ALWAYS,
117 #if CONFIG_POST & CONFIG_SYS_POST_RTC
121 "This test verifies the RTC operation.",
122 POST_RAM | POST_SLOWTEST | POST_MANUAL,
129 #if CONFIG_POST & CONFIG_SYS_POST_MEMORY
133 "This test checks RAM.",
134 POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL,
138 CONFIG_SYS_POST_MEMORY
141 #if CONFIG_POST & CONFIG_SYS_POST_CPU
145 "This test verifies the arithmetic logic unit of"
147 POST_RAM | POST_ALWAYS,
154 #if CONFIG_POST & CONFIG_SYS_POST_FPU
158 "This test verifies the arithmetic logic unit of"
160 POST_RAM | POST_ALWAYS,
167 #if CONFIG_POST & CONFIG_SYS_POST_UART
168 #if defined(CONFIG_POST_UART)
174 "This test verifies the UART operation.",
175 POST_RAM | POST_SLOWTEST | POST_MANUAL,
181 #endif /* CONFIG_POST_UART */
183 #if CONFIG_POST & CONFIG_SYS_POST_ETHER
187 "This test verifies the ETHERNET operation.",
188 POST_RAM | POST_ALWAYS | POST_MANUAL,
192 CONFIG_SYS_POST_ETHER
195 #if CONFIG_POST & CONFIG_SYS_POST_SPI
199 "This test verifies the SPI operation.",
200 POST_RAM | POST_ALWAYS | POST_MANUAL,
207 #if CONFIG_POST & CONFIG_SYS_POST_USB
211 "This test verifies the USB operation.",
212 POST_RAM | POST_ALWAYS | POST_MANUAL,
219 #if CONFIG_POST & CONFIG_SYS_POST_SPR
223 "This test checks SPR contents.",
224 POST_RAM | POST_ALWAYS,
231 #if CONFIG_POST & CONFIG_SYS_POST_SYSMON
235 "This test monitors system hardware.",
236 POST_RAM | POST_ALWAYS,
240 CONFIG_SYS_POST_SYSMON
243 #if CONFIG_POST & CONFIG_SYS_POST_DSP
247 "This test checks any connected DSP(s).",
248 POST_RAM | POST_ALWAYS | POST_MANUAL,
255 #if CONFIG_POST & CONFIG_SYS_POST_CODEC
259 "This test checks any connected codec(s).",
260 POST_RAM | POST_MANUAL,
264 CONFIG_SYS_POST_CODEC
267 #if CONFIG_POST & CONFIG_SYS_POST_ECC
271 "This test checks the ECC facility of memory.",
272 POST_ROM | POST_ALWAYS | POST_PREREL,
279 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC1
282 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC2
285 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC3
288 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC4
291 #if CONFIG_POST & CONFIG_SYS_POST_BSPEC5
294 #if CONFIG_POST & CONFIG_SYS_POST_COPROC
296 "Coprocessors communication test",
298 "This test checks communication with coprocessors.",
299 POST_RAM | POST_ALWAYS | POST_CRITICAL,
300 &coprocessor_post_test,
303 CONFIG_SYS_POST_COPROC
308 unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test);