]>
Commit | Line | Data |
---|---|---|
324f6cfd WD |
1 | /* |
2 | * (C) Copyright 2002 | |
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
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); | |
45 | ||
46 | struct post_test post_list[] = | |
47 | { | |
48 | #if CONFIG_POST & CFG_POST_CACHE | |
49 | { | |
50 | "Cache test", | |
51 | "cache", | |
52 | "This test verifies the CPU cache operation.", | |
53 | POST_RAM | POST_ALWAYS, | |
228f29ac WD |
54 | &cache_post_test, |
55 | CFG_POST_CACHE | |
324f6cfd WD |
56 | }, |
57 | #endif | |
58 | #if CONFIG_POST & CFG_POST_WATCHDOG | |
59 | { | |
60 | "Watchdog timer test", | |
61 | "watchdog", | |
62 | "This test checks the watchdog timer.", | |
63 | POST_RAM | POST_POWERON | POST_POWERFAIL | POST_MANUAL | POST_REBOOT, | |
228f29ac WD |
64 | &watchdog_post_test, |
65 | CFG_POST_WATCHDOG | |
324f6cfd WD |
66 | }, |
67 | #endif | |
68 | #if CONFIG_POST & CFG_POST_I2C | |
69 | { | |
70 | "I2C test", | |
71 | "i2c", | |
72 | "This test verifies the I2C operation.", | |
73 | POST_RAM | POST_ALWAYS, | |
228f29ac WD |
74 | &i2c_post_test, |
75 | CFG_POST_I2C | |
324f6cfd WD |
76 | }, |
77 | #endif | |
78 | #if CONFIG_POST & CFG_POST_RTC | |
79 | { | |
80 | "RTC test", | |
81 | "rtc", | |
82 | "This test verifies the RTC operation.", | |
83 | POST_RAM | POST_POWERFAIL | POST_MANUAL, | |
228f29ac WD |
84 | &rtc_post_test, |
85 | CFG_POST_RTC | |
324f6cfd WD |
86 | }, |
87 | #endif | |
88 | #if CONFIG_POST & CFG_POST_MEMORY | |
89 | { | |
90 | "Memory test", | |
91 | "memory", | |
92 | "This test checks RAM.", | |
228f29ac WD |
93 | POST_ROM | POST_POWERON | POST_POWERFAIL | POST_PREREL, |
94 | &memory_post_test, | |
95 | CFG_POST_MEMORY | |
324f6cfd WD |
96 | }, |
97 | #endif | |
98 | #if CONFIG_POST & CFG_POST_CPU | |
99 | { | |
100 | "CPU test", | |
101 | "cpu", | |
102 | "This test verifies the arithmetic logic unit of" | |
103 | " CPU.", | |
104 | POST_RAM | POST_ALWAYS, | |
228f29ac WD |
105 | &cpu_post_test, |
106 | CFG_POST_CPU | |
324f6cfd WD |
107 | }, |
108 | #endif | |
109 | #if CONFIG_POST & CFG_POST_UART | |
110 | { | |
111 | "UART test", | |
112 | "uart", | |
113 | "This test verifies the UART operation.", | |
114 | POST_RAM | POST_POWERFAIL | POST_MANUAL, | |
228f29ac WD |
115 | &uart_post_test, |
116 | CFG_POST_UART | |
324f6cfd WD |
117 | }, |
118 | #endif | |
119 | #if CONFIG_POST & CFG_POST_ETHER | |
120 | { | |
121 | "ETHERNET test", | |
122 | "ethernet", | |
123 | "This test verifies the ETHERNET operation.", | |
124 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
228f29ac WD |
125 | ðer_post_test, |
126 | CFG_POST_ETHER | |
324f6cfd WD |
127 | }, |
128 | #endif | |
129 | #if CONFIG_POST & CFG_POST_SPI | |
130 | { | |
131 | "SPI test", | |
132 | "spi", | |
133 | "This test verifies the SPI operation.", | |
134 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
228f29ac WD |
135 | &spi_post_test, |
136 | CFG_POST_SPI | |
324f6cfd WD |
137 | }, |
138 | #endif | |
139 | #if CONFIG_POST & CFG_POST_USB | |
140 | { | |
141 | "USB test", | |
142 | "usb", | |
143 | "This test verifies the USB operation.", | |
144 | POST_RAM | POST_ALWAYS | POST_MANUAL, | |
228f29ac WD |
145 | &usb_post_test, |
146 | CFG_POST_USB | |
324f6cfd WD |
147 | }, |
148 | #endif | |
149 | #if CONFIG_POST & CFG_POST_SPR | |
150 | { | |
151 | "SPR test", | |
152 | "spr", | |
153 | "This test checks SPR contents.", | |
228f29ac WD |
154 | POST_ROM | POST_ALWAYS | POST_PREREL, |
155 | &spr_post_test, | |
156 | CFG_POST_SPR | |
324f6cfd WD |
157 | }, |
158 | #endif | |
159 | }; | |
160 | ||
161 | unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test); | |
162 | ||
163 | #endif /* CONFIG_POST */ |