]>
Commit | Line | Data |
---|---|---|
324f6cfd WD |
1 | /* |
2 | * (C) Copyright 2002 | |
3 | * Wolfgang Denk, DENX Software Engineering, [email protected]. | |
4 | * | |
5 | * See file CREDITS for list of people who contributed to this | |
6 | * project. | |
7 | * | |
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. | |
12 | * | |
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. | |
17 | * | |
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, | |
21 | * MA 02111-1307 USA | |
228f29ac WD |
22 | * |
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. | |
324f6cfd WD |
26 | */ |
27 | ||
28 | #include <common.h> | |
29 | ||
30 | #ifdef CONFIG_POST | |
31 | ||
32 | #include <post.h> | |
33 | ||
34 | extern int cache_post_test (int flags); | |
35 | extern int watchdog_post_test (int flags); | |
36 | extern int i2c_post_test (int flags); | |
37 | extern int rtc_post_test (int flags); | |
38 | extern int memory_post_test (int flags); | |
39 | extern int cpu_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); | |
4532cb69 | 45 | extern int sysmon_post_test (int flags); |
5a8c51cd | 46 | extern int dsp_post_test (int flags); |
4532cb69 WD |
47 | |
48 | extern int sysmon_init_f (void); | |
49 | ||
50 | extern void sysmon_reloc (void); | |
51 | ||
324f6cfd WD |
52 | |
53 | struct post_test post_list[] = | |
54 | { | |
55 | #if CONFIG_POST & CFG_POST_CACHE | |
56 | { | |
8bde7f77 WD |
57 | "Cache test", |
58 | "cache", | |
59 | "This test verifies the CPU cache operation.", | |
60 | POST_RAM | POST_ALWAYS, | |
61 | &cache_post_test, | |
62 | NULL, | |
63 | NULL, | |
228f29ac | 64 | CFG_POST_CACHE |
324f6cfd WD |
65 | }, |
66 | #endif | |
67 | #if CONFIG_POST & CFG_POST_WATCHDOG | |
68 | { | |
8bde7f77 WD |
69 | "Watchdog timer test", |
70 | "watchdog", | |
71 | "This test checks the watchdog timer.", | |
8564acf9 | 72 | POST_RAM | POST_POWERON | POST_SLOWTEST | POST_MANUAL | POST_REBOOT, |
8bde7f77 WD |
73 | &watchdog_post_test, |
74 | NULL, | |
75 | NULL, | |
228f29ac | 76 | CFG_POST_WATCHDOG |
324f6cfd WD |
77 | }, |
78 | #endif | |
79 | #if CONFIG_POST & CFG_POST_I2C | |
80 | { | |
8bde7f77 WD |
81 | "I2C test", |
82 | "i2c", | |
83 | "This test verifies the I2C operation.", | |
84 | POST_RAM | POST_ALWAYS, | |
85 | &i2c_post_test, | |
86 | NULL, | |
87 | NULL, | |
228f29ac | 88 | CFG_POST_I2C |
324f6cfd WD |
89 | }, |
90 | #endif | |
91 | #if CONFIG_POST & CFG_POST_RTC | |
92 | { | |
8bde7f77 WD |
93 | "RTC test", |
94 | "rtc", | |
95 | "This test verifies the RTC operation.", | |
8564acf9 | 96 | POST_RAM | POST_SLOWTEST | POST_MANUAL, |
8bde7f77 WD |
97 | &rtc_post_test, |
98 | NULL, | |
99 | NULL, | |
228f29ac | 100 | CFG_POST_RTC |
324f6cfd WD |
101 | }, |
102 | #endif | |
103 | #if CONFIG_POST & CFG_POST_MEMORY | |
104 | { | |
8bde7f77 WD |
105 | "Memory test", |
106 | "memory", | |
107 | "This test checks RAM.", | |
8564acf9 | 108 | POST_ROM | POST_POWERON | POST_SLOWTEST | POST_PREREL, |
8bde7f77 WD |
109 | &memory_post_test, |
110 | NULL, | |
111 | NULL, | |
228f29ac | 112 | CFG_POST_MEMORY |
324f6cfd WD |
113 | }, |
114 | #endif | |
115 | #if CONFIG_POST & CFG_POST_CPU | |
116 | { | |
8bde7f77 WD |
117 | "CPU test", |
118 | "cpu", | |
119 | "This test verifies the arithmetic logic unit of" | |
120 | " CPU.", | |
121 | POST_RAM | POST_ALWAYS, | |
122 | &cpu_post_test, | |
123 | NULL, | |
124 | NULL, | |
228f29ac | 125 | CFG_POST_CPU |
324f6cfd WD |
126 | }, |
127 | #endif | |
128 | #if CONFIG_POST & CFG_POST_UART | |
129 | { | |
8bde7f77 WD |
130 | "UART test", |
131 | "uart", | |
132 | "This test verifies the UART operation.", | |
8564acf9 | 133 | POST_RAM | POST_SLOWTEST | POST_MANUAL, |
8bde7f77 WD |
134 | &uart_post_test, |
135 | NULL, | |
136 | NULL, | |
228f29ac | 137 | CFG_POST_UART |
324f6cfd WD |
138 | }, |
139 | #endif | |
140 | #if CONFIG_POST & CFG_POST_ETHER | |
141 | { | |
8bde7f77 WD |
142 | "ETHERNET test", |
143 | "ethernet", | |
144 | "This test verifies the ETHERNET operation.", | |
145 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
146 | ðer_post_test, | |
147 | NULL, | |
148 | NULL, | |
228f29ac | 149 | CFG_POST_ETHER |
324f6cfd WD |
150 | }, |
151 | #endif | |
152 | #if CONFIG_POST & CFG_POST_SPI | |
153 | { | |
8bde7f77 WD |
154 | "SPI test", |
155 | "spi", | |
156 | "This test verifies the SPI operation.", | |
157 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
158 | &spi_post_test, | |
159 | NULL, | |
160 | NULL, | |
228f29ac | 161 | CFG_POST_SPI |
324f6cfd WD |
162 | }, |
163 | #endif | |
164 | #if CONFIG_POST & CFG_POST_USB | |
165 | { | |
8bde7f77 WD |
166 | "USB test", |
167 | "usb", | |
168 | "This test verifies the USB operation.", | |
169 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
170 | &usb_post_test, | |
171 | NULL, | |
172 | NULL, | |
228f29ac | 173 | CFG_POST_USB |
324f6cfd WD |
174 | }, |
175 | #endif | |
176 | #if CONFIG_POST & CFG_POST_SPR | |
177 | { | |
8bde7f77 WD |
178 | "SPR test", |
179 | "spr", | |
180 | "This test checks SPR contents.", | |
181 | POST_ROM | POST_ALWAYS | POST_PREREL, | |
182 | &spr_post_test, | |
183 | NULL, | |
184 | NULL, | |
228f29ac | 185 | CFG_POST_SPR |
324f6cfd WD |
186 | }, |
187 | #endif | |
4532cb69 WD |
188 | #if CONFIG_POST & CFG_POST_SYSMON |
189 | { | |
8bde7f77 WD |
190 | "SYSMON test", |
191 | "sysmon", | |
192 | "This test monitors system hardware.", | |
193 | POST_RAM | POST_ALWAYS, | |
194 | &sysmon_post_test, | |
195 | &sysmon_init_f, | |
196 | &sysmon_reloc, | |
4532cb69 WD |
197 | CFG_POST_SYSMON |
198 | }, | |
199 | #endif | |
5a8c51cd WD |
200 | #if CONFIG_POST & CFG_POST_DSP |
201 | { | |
202 | "DSP test", | |
203 | "dsp", | |
204 | "This test checks any connected DSP(s).", | |
205 | POST_RAM | POST_MANUAL, | |
206 | &dsp_post_test, | |
207 | NULL, | |
208 | NULL, | |
209 | CFG_POST_DSP | |
210 | }, | |
211 | #endif | |
324f6cfd WD |
212 | }; |
213 | ||
214 | unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test); | |
215 | ||
216 | #endif /* CONFIG_POST */ |