1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23#ifndef _POST_H
24#define _POST_H
25
26#ifndef __ASSEMBLY__
27#include <common.h>
28#endif
29
30#ifdef CONFIG_POST
31
32#define POST_POWERON 0x01
33#define POST_NORMAL 0x02
34#define POST_SLOWTEST 0x04
35#define POST_POWERTEST 0x08
36
37#define POST_COLDBOOT 0x80
38
39#define POST_ROM 0x0100
40#define POST_RAM 0x0200
41#define POST_MANUAL 0x0400
42#define POST_REBOOT 0x0800
43#define POST_PREREL 0x1000
44
45#define POST_CRITICAL 0x2000
46
47#define POST_MEM (POST_RAM | POST_ROM)
48#define POST_ALWAYS (POST_NORMAL | \
49 POST_SLOWTEST | \
50 POST_MANUAL | \
51 POST_POWERON )
52
53#define POST_FAIL_SAVE 0x80
54
55#ifndef __ASSEMBLY__
56
57struct post_test {
58 char *name;
59 char *cmd;
60 char *desc;
61 int flags;
62 int (*test) (int flags);
63 int (*init_f) (void);
64 void (*reloc) (void);
65 unsigned long testid;
66};
67int post_init_f (void);
68void post_bootmode_init (void);
69int post_bootmode_get (unsigned int * last_test);
70void post_bootmode_clear (void);
71void post_output_backlog ( void );
72int post_run (char *name, int flags);
73int post_info (char *name);
74int post_log (char *format, ...);
75void post_reloc (void);
76unsigned long post_time_ms (unsigned long base);
77
78extern struct post_test post_list[];
79extern unsigned int post_list_size;
80extern int post_hotkeys_pressed(void);
81
82#endif
83
84#define CFG_POST_RTC 0x00000001
85#define CFG_POST_WATCHDOG 0x00000002
86#define CFG_POST_MEMORY 0x00000004
87#define CFG_POST_CPU 0x00000008
88#define CFG_POST_I2C 0x00000010
89#define CFG_POST_CACHE 0x00000020
90#define CFG_POST_UART 0x00000040
91#define CFG_POST_ETHER 0x00000080
92#define CFG_POST_SPI 0x00000100
93#define CFG_POST_USB 0x00000200
94#define CFG_POST_SPR 0x00000400
95#define CFG_POST_SYSMON 0x00000800
96#define CFG_POST_DSP 0x00001000
97#define CFG_POST_CODEC 0x00002000
98#define CFG_POST_FPU 0x00004000
99#define CFG_POST_ECC 0x00008000
100#define CFG_POST_BSPEC1 0x00010000
101#define CFG_POST_BSPEC2 0x00020000
102#define CFG_POST_BSPEC3 0x00040000
103#define CFG_POST_BSPEC4 0x00080000
104#define CFG_POST_BSPEC5 0x00100000
105
106#endif
107
108#endif
109