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 * CFG_POST_PREREL flag so that logging is done correctly if the
25 * logbuffer support is enabled.
33 #define CFG_POST_FLASH 0x00004000
34 #define CFG_POST_LED 0x00008000
35 #define CFG_POST_BUTTON 0x00010000
37 extern int cache_post_test(int flags);
38 extern int watchdog_post_test(int flags);
39 extern int i2c_post_test(int flags);
40 extern int rtc_post_test(int flags);
41 extern int memory_post_test(int flags);
42 extern int cpu_post_test(int flags);
43 extern int uart_post_test(int flags);
44 extern int ether_post_test(int flags);
45 extern int spi_post_test(int flags);
46 extern int usb_post_test(int flags);
47 extern int spr_post_test(int flags);
48 extern int sysmon_post_test(int flags);
49 extern int dsp_post_test(int flags);
50 extern int codec_post_test(int flags);
52 extern int sysmon_init_f(void);
54 extern void sysmon_reloc(void);
56 extern int flash_post_test(int flags);
57 extern int led_post_test(int flags);
58 extern int button_post_test(int flags);
60 struct post_test post_list[] = {
61 #if CONFIG_POST & CFG_POST_CACHE
65 "This test verifies the CPU cache operation.",
66 POST_RAM | POST_ALWAYS,
72 #if CONFIG_POST & CFG_POST_WATCHDOG
74 "Watchdog timer test",
76 "This test checks the watchdog timer.",
77 POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT,
83 #if CONFIG_POST & CFG_POST_I2C
87 "This test verifies the I2C operation.",
88 POST_RAM | POST_ALWAYS,
94 #if CONFIG_POST & CFG_POST_RTC
98 "This test verifies the RTC operation.",
99 POST_RAM | POST_SLOWTEST | POST_MANUAL,
105 #if CONFIG_POST & CFG_POST_MEMORY
109 "This test checks RAM.",
110 POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL,
116 #if CONFIG_POST & CFG_POST_CPU
120 "This test verifies the arithmetic logic unit of" " CPU.",
121 POST_RAM | POST_ALWAYS,
127 #if CONFIG_POST & CFG_POST_UART
131 "This test verifies the UART operation.",
132 POST_RAM | POST_SLOWTEST | POST_MANUAL,
138 #if CONFIG_POST & CFG_POST_ETHER
142 "This test verifies the ETHERNET operation.",
143 POST_RAM | POST_ALWAYS | POST_MANUAL,
149 #if CONFIG_POST & CFG_POST_SPI
153 "This test verifies the SPI operation.",
154 POST_RAM | POST_ALWAYS | POST_MANUAL,
160 #if CONFIG_POST & CFG_POST_USB
164 "This test verifies the USB operation.",
165 POST_RAM | POST_ALWAYS | POST_MANUAL,
171 #if CONFIG_POST & CFG_POST_SPR
175 "This test checks SPR contents.",
176 POST_ROM | POST_ALWAYS | POST_PREREL,
182 #if CONFIG_POST & CFG_POST_SYSMON
186 "This test monitors system hardware.",
187 POST_RAM | POST_ALWAYS,
193 #if CONFIG_POST & CFG_POST_DSP
197 "This test checks any connected DSP(s).",
198 POST_RAM | POST_MANUAL,
204 #if CONFIG_POST & CFG_POST_CODEC
208 "This test checks any connected codec(s).",
209 POST_RAM | POST_MANUAL,
215 #if CONFIG_POST & CFG_POST_FLASH
219 "This test checks flash.",
220 POST_RAM | POST_ALWAYS | POST_MANUAL,
226 #if CONFIG_POST & CFG_POST_LED
230 "This test checks LED ",
231 POST_RAM | POST_ALWAYS | POST_MANUAL,
237 #if CONFIG_POST & CFG_POST_BUTTON
241 "This test checks Button ",
242 POST_RAM | POST_ALWAYS | POST_MANUAL,
251 unsigned int post_list_size = sizeof(post_list) / sizeof(struct post_test);
253 #endif /* CONFIG_POST */