wdenk | 324f6cf | 2002-10-07 21:13:39 +0000 | [diff] [blame^] | 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 |
| 22 | */ |
| 23 | |
| 24 | #include <common.h> |
| 25 | |
| 26 | #ifdef CONFIG_POST |
| 27 | |
| 28 | #include <post.h> |
| 29 | |
| 30 | extern int cache_post_test (int flags); |
| 31 | extern int watchdog_post_test (int flags); |
| 32 | extern int i2c_post_test (int flags); |
| 33 | extern int rtc_post_test (int flags); |
| 34 | extern int memory_post_test (int flags); |
| 35 | extern int cpu_post_test (int flags); |
| 36 | extern int uart_post_test (int flags); |
| 37 | extern int ether_post_test (int flags); |
| 38 | extern int spi_post_test (int flags); |
| 39 | extern int usb_post_test (int flags); |
| 40 | extern int spr_post_test (int flags); |
| 41 | |
| 42 | struct post_test post_list[] = |
| 43 | { |
| 44 | #if CONFIG_POST & CFG_POST_CACHE |
| 45 | { |
| 46 | "Cache test", |
| 47 | "cache", |
| 48 | "This test verifies the CPU cache operation.", |
| 49 | POST_RAM | POST_ALWAYS, |
| 50 | &cache_post_test |
| 51 | }, |
| 52 | #endif |
| 53 | #if CONFIG_POST & CFG_POST_WATCHDOG |
| 54 | { |
| 55 | "Watchdog timer test", |
| 56 | "watchdog", |
| 57 | "This test checks the watchdog timer.", |
| 58 | POST_RAM | POST_POWERON | POST_POWERFAIL | POST_MANUAL | POST_REBOOT, |
| 59 | &watchdog_post_test |
| 60 | }, |
| 61 | #endif |
| 62 | #if CONFIG_POST & CFG_POST_I2C |
| 63 | { |
| 64 | "I2C test", |
| 65 | "i2c", |
| 66 | "This test verifies the I2C operation.", |
| 67 | POST_RAM | POST_ALWAYS, |
| 68 | &i2c_post_test |
| 69 | }, |
| 70 | #endif |
| 71 | #if CONFIG_POST & CFG_POST_RTC |
| 72 | { |
| 73 | "RTC test", |
| 74 | "rtc", |
| 75 | "This test verifies the RTC operation.", |
| 76 | POST_RAM | POST_POWERFAIL | POST_MANUAL, |
| 77 | &rtc_post_test |
| 78 | }, |
| 79 | #endif |
| 80 | #if CONFIG_POST & CFG_POST_MEMORY |
| 81 | { |
| 82 | "Memory test", |
| 83 | "memory", |
| 84 | "This test checks RAM.", |
| 85 | POST_ROM | POST_POWERON | POST_POWERFAIL, |
| 86 | &memory_post_test |
| 87 | }, |
| 88 | #endif |
| 89 | #if CONFIG_POST & CFG_POST_CPU |
| 90 | { |
| 91 | "CPU test", |
| 92 | "cpu", |
| 93 | "This test verifies the arithmetic logic unit of" |
| 94 | " CPU.", |
| 95 | POST_RAM | POST_ALWAYS, |
| 96 | &cpu_post_test |
| 97 | }, |
| 98 | #endif |
| 99 | #if CONFIG_POST & CFG_POST_UART |
| 100 | { |
| 101 | "UART test", |
| 102 | "uart", |
| 103 | "This test verifies the UART operation.", |
| 104 | POST_RAM | POST_POWERFAIL | POST_MANUAL, |
| 105 | &uart_post_test |
| 106 | }, |
| 107 | #endif |
| 108 | #if CONFIG_POST & CFG_POST_ETHER |
| 109 | { |
| 110 | "ETHERNET test", |
| 111 | "ethernet", |
| 112 | "This test verifies the ETHERNET operation.", |
| 113 | POST_RAM | POST_ALWAYS | POST_MANUAL, |
| 114 | ðer_post_test |
| 115 | }, |
| 116 | #endif |
| 117 | #if CONFIG_POST & CFG_POST_SPI |
| 118 | { |
| 119 | "SPI test", |
| 120 | "spi", |
| 121 | "This test verifies the SPI operation.", |
| 122 | POST_RAM | POST_ALWAYS | POST_MANUAL, |
| 123 | &spi_post_test |
| 124 | }, |
| 125 | #endif |
| 126 | #if CONFIG_POST & CFG_POST_USB |
| 127 | { |
| 128 | "USB test", |
| 129 | "usb", |
| 130 | "This test verifies the USB operation.", |
| 131 | POST_RAM | POST_ALWAYS | POST_MANUAL, |
| 132 | &usb_post_test |
| 133 | }, |
| 134 | #endif |
| 135 | #if CONFIG_POST & CFG_POST_SPR |
| 136 | { |
| 137 | "SPR test", |
| 138 | "spr", |
| 139 | "This test checks SPR contents.", |
| 140 | POST_ROM | POST_ALWAYS, |
| 141 | &spr_post_test |
| 142 | }, |
| 143 | #endif |
| 144 | }; |
| 145 | |
| 146 | unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test); |
| 147 | |
| 148 | #endif /* CONFIG_POST */ |