post: Migrate to Kconfig

We move the existing CONFIG_POST_* functionality over to CFG_POST and
then introduce CONFIG_POST to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Tom Rini
2022-11-19 18:45:44 -05:00
parent d948c8988c
commit 9cebc4ad8e
58 changed files with 114 additions and 99 deletions

View File

@@ -486,7 +486,7 @@ int dram_init(void)
#endif /* CONFIG_SYS_RAMBOOT */ #endif /* CONFIG_SYS_RAMBOOT */
#endif #endif
#if CONFIG_POST & CFG_SYS_POST_MEMORY #if CFG_POST & CFG_SYS_POST_MEMORY
/* Board-specific functions defined in each board's ddr.c */ /* Board-specific functions defined in each board's ddr.c */
void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd, void fsl_ddr_get_spd(generic_spd_eeprom_t *ctrl_dimms_spd,

View File

@@ -112,3 +112,4 @@ CONFIG_USB_MAX_CONTROLLER_COUNT=2
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_ADDR_MAP=y CONFIG_ADDR_MAP=y
CONFIG_SYS_NUM_ADDR_MAP=64 CONFIG_SYS_NUM_ADDR_MAP=64
CONFIG_POST=y

View File

@@ -107,3 +107,4 @@ CONFIG_USB_MAX_CONTROLLER_COUNT=2
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_ADDR_MAP=y CONFIG_ADDR_MAP=y
CONFIG_SYS_NUM_ADDR_MAP=64 CONFIG_SYS_NUM_ADDR_MAP=64
CONFIG_POST=y

View File

@@ -109,3 +109,4 @@ CONFIG_USB_MAX_CONTROLLER_COUNT=2
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_ADDR_MAP=y CONFIG_ADDR_MAP=y
CONFIG_SYS_NUM_ADDR_MAP=64 CONFIG_SYS_NUM_ADDR_MAP=64
CONFIG_POST=y

View File

@@ -104,3 +104,4 @@ CONFIG_USB_MAX_CONTROLLER_COUNT=2
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_ADDR_MAP=y CONFIG_ADDR_MAP=y
CONFIG_SYS_NUM_ADDR_MAP=64 CONFIG_SYS_NUM_ADDR_MAP=64
CONFIG_POST=y

View File

@@ -110,3 +110,4 @@ CONFIG_FS_CRAMFS=y
CONFIG_BCH=y CONFIG_BCH=y
CONFIG_PANIC_HANG=y CONFIG_PANIC_HANG=y
CONFIG_LZO=y CONFIG_LZO=y
CONFIG_POST=y

View File

@@ -243,3 +243,4 @@ CONFIG_QE_UEC=y
CONFIG_QE=y CONFIG_QE=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_BCH=y CONFIG_BCH=y
CONFIG_POST=y

View File

@@ -100,3 +100,4 @@ CONFIG_SCSI_AHCI_PLAT=y
CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_POST=y

View File

@@ -98,3 +98,4 @@ CONFIG_SCSI_AHCI_PLAT=y
CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_POST=y

View File

@@ -100,3 +100,4 @@ CONFIG_SCSI_AHCI_PLAT=y
CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_POST=y

View File

@@ -98,3 +98,4 @@ CONFIG_SCSI_AHCI_PLAT=y
CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_SPECIFY_CONSOLE_INDEX=y
CONFIG_DM_SERIAL=y CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_POST=y

View File

@@ -242,11 +242,11 @@ storage server and etc.
All POST-related code will be #ifdef'ed with the CONFIG_POST macro. All POST-related code will be #ifdef'ed with the CONFIG_POST macro.
This macro will be defined in the config_<board>.h file for those This macro will be defined in the config_<board>.h file for those
boards that need POST. The CONFIG_POST macro will contain the list of boards that need POST. The CFG_POST macro will contain the list of
POST tests for the board. The macro will have the format of array POST tests for the board. The macro will have the format of array
composed of post_test structures: composed of post_test structures:
#define CONFIG_POST \ #define CFG_POST \
{ {
"On-board peripherals test", "board", \ "On-board peripherals test", "board", \
" This test performs full check-up of the " \ " This test performs full check-up of the " \
@@ -257,7 +257,7 @@ composed of post_test structures:
A new file, post.h, will be created in the include/ directory. This A new file, post.h, will be created in the include/ directory. This
file will contain common POST declarations and will define a set of file will contain common POST declarations and will define a set of
macros that will be reused for defining CONFIG_POST. As an example, macros that will be reused for defining CFG_POST. As an example,
the following macro may be defined: the following macro may be defined:
#define POST_CACHE \ #define POST_CACHE \

View File

@@ -137,7 +137,7 @@ Memory testing options for mpc85xx
2. Memory test can be done with Power-On-Self-Test function, activated at 2. Memory test can be done with Power-On-Self-Test function, activated at
compile time. compile time.
In order to enable the POST memory test, CONFIG_POST needs to be In order to enable the POST memory test, CFG_POST needs to be
defined in board configuraiton header file. By default, POST memory test defined in board configuraiton header file. By default, POST memory test
performs a fast test. A slow test can be enabled by changing the flag at performs a fast test. A slow test can be enabled by changing the flag at
compiling time. To test memory bigger than 2GB, 36BIT support is needed. compiling time. To test memory bigger than 2GB, 36BIT support is needed.

View File

@@ -526,7 +526,7 @@ static int serial_post_probe(struct udevice *dev)
ops->getconfig += gd->reloc_off; ops->getconfig += gd->reloc_off;
if (ops->setconfig) if (ops->setconfig)
ops->setconfig += gd->reloc_off; ops->setconfig += gd->reloc_off;
#if CONFIG_POST & CONFIG_SYS_POST_UART #if CFG_POST & CONFIG_SYS_POST_UART
if (ops->loop) if (ops->loop)
ops->loop += gd->reloc_off; ops->loop += gd->reloc_off;
#endif #endif

View File

@@ -458,7 +458,7 @@ void default_serial_puts(const char *s)
dev->putc(*s++); dev->putc(*s++);
} }
#if CONFIG_POST & CONFIG_SYS_POST_UART #if CFG_POST & CONFIG_SYS_POST_UART
static const int bauds[] = CFG_SYS_BAUDRATE_TABLE; static const int bauds[] = CFG_SYS_BAUDRATE_TABLE;
/** /**

View File

@@ -41,7 +41,7 @@
*/ */
#define CFG_SYS_INIT_L2CSR0 L2CSR0_L2E #define CFG_SYS_INIT_L2CSR0 L2CSR0_L2E
#define CONFIG_POST CFG_SYS_POST_MEMORY /* test POST memory test */ #define CFG_POST CFG_SYS_POST_MEMORY /* test POST memory test */
/* /*
* Config the L3 Cache as L3 SRAM * Config the L3 Cache as L3 SRAM

View File

@@ -25,8 +25,8 @@
#define SPD_EEPROM_ADDRESS 0x54 #define SPD_EEPROM_ADDRESS 0x54
/* POST memory regions test */ /* POST memory regions test */
#define CONFIG_POST (CFG_SYS_POST_MEM_REGIONS) #define CFG_POST (CFG_SYS_POST_MEM_REGIONS)
#define CONFIG_POST_EXTERNAL_WORD_FUNCS #define CFG_POST_EXTERNAL_WORD_FUNCS
/* /*
* IFC Definitions * IFC Definitions

View File

@@ -148,7 +148,7 @@
#define CFG_SYS_INIT_L2CSR0 L2CSR0_L2E #define CFG_SYS_INIT_L2CSR0 L2CSR0_L2E
/* POST memory regions test */ /* POST memory regions test */
#define CONFIG_POST CFG_SYS_POST_MEM_REGIONS #define CFG_POST CFG_SYS_POST_MEM_REGIONS
/* /*
* Config the L3 Cache as L3 SRAM * Config the L3 Cache as L3 SRAM

View File

@@ -33,8 +33,8 @@
CSCONFIG_COL_BIT_10) CSCONFIG_COL_BIT_10)
/* enable POST tests */ /* enable POST tests */
#define CONFIG_POST (CFG_SYS_POST_MEMORY|CFG_SYS_POST_MEM_REGIONS) #define CFG_POST (CFG_SYS_POST_MEMORY|CFG_SYS_POST_MEM_REGIONS)
#define CONFIG_POST_EXTERNAL_WORD_FUNCS /* use own functions, not generic */ #define CFG_POST_EXTERNAL_WORD_FUNCS /* use own functions, not generic */
#define CPM_POST_WORD_ADDR CONFIG_SYS_MEMTEST_END #define CPM_POST_WORD_ADDR CONFIG_SYS_MEMTEST_END
#define CONFIG_TESTPIN_REG gprt3 /* for kmcoge5ne */ #define CONFIG_TESTPIN_REG gprt3 /* for kmcoge5ne */
#define CONFIG_TESTPIN_MASK 0x20 /* for kmcoge5ne */ #define CONFIG_TESTPIN_MASK 0x20 /* for kmcoge5ne */

View File

@@ -16,7 +16,7 @@
#if defined(CONFIG_POST) #if defined(CONFIG_POST)
#ifndef CONFIG_POST_EXTERNAL_WORD_FUNCS #ifndef CFG_POST_EXTERNAL_WORD_FUNCS
#ifdef CONFIG_SYS_POST_WORD_ADDR #ifdef CONFIG_SYS_POST_WORD_ADDR
#define _POST_WORD_ADDR CONFIG_SYS_POST_WORD_ADDR #define _POST_WORD_ADDR CONFIG_SYS_POST_WORD_ADDR
#else #else
@@ -51,7 +51,7 @@ static inline void post_word_store (ulong value)
extern ulong post_word_load(void); extern ulong post_word_load(void);
extern void post_word_store(ulong value); extern void post_word_store(ulong value);
#endif /* CONFIG_POST_EXTERNAL_WORD_FUNCS */ #endif /* CFG_POST_EXTERNAL_WORD_FUNCS */
#endif /* defined (CONFIG_POST) */ #endif /* defined (CONFIG_POST) */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */

View File

@@ -14,7 +14,7 @@ struct serial_device {
int (*tstc)(void); int (*tstc)(void);
void (*putc)(const char c); void (*putc)(const char c);
void (*puts)(const char *s); void (*puts)(const char *s);
#if CONFIG_POST & CONFIG_SYS_POST_UART #if CFG_POST & CONFIG_SYS_POST_UART
void (*loop)(int); void (*loop)(int);
#endif #endif
struct serial_device *next; struct serial_device *next;
@@ -242,7 +242,7 @@ struct dm_serial_ops {
* @return 0 if OK, -ve on error * @return 0 if OK, -ve on error
*/ */
int (*clear)(struct udevice *dev); int (*clear)(struct udevice *dev);
#if CONFIG_POST & CONFIG_SYS_POST_UART #if CFG_POST & CONFIG_SYS_POST_UART
/** /**
* loop() - Control serial device loopback mode * loop() - Control serial device loopback mode
* *

View File

@@ -17,7 +17,7 @@
#include <asm/io.h> #include <asm/io.h>
#include <post.h> #include <post.h>
#if CONFIG_POST & CONFIG_SYS_POST_ECC #if CFG_POST & CONFIG_SYS_POST_ECC
/* /*
* We use the RAW I/O accessors where possible in order to * We use the RAW I/O accessors where possible in order to
* achieve performance goal, since the test's execution time * achieve performance goal, since the test's execution time

View File

@@ -6,7 +6,7 @@
* Licensed under the GPL-2 or later. * Licensed under the GPL-2 or later.
*/ */
#if CONFIG_POST & CONFIG_SYS_POST_FLASH #if CFG_POST & CONFIG_SYS_POST_FLASH
#include <common.h> #include <common.h>
#include <malloc.h> #include <malloc.h>
#include <post.h> #include <post.h>

View File

@@ -26,7 +26,7 @@
#include <post.h> #include <post.h>
#include <i2c.h> #include <i2c.h>
#if CONFIG_POST & CONFIG_SYS_POST_I2C #if CFG_POST & CONFIG_SYS_POST_I2C
static int i2c_ignore_device(unsigned int chip) static int i2c_ignore_device(unsigned int chip)
{ {
@@ -94,4 +94,4 @@ int i2c_post_test (int flags)
#endif #endif
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_I2C */ #endif /* CFG_POST & CONFIG_SYS_POST_I2C */

View File

@@ -138,7 +138,7 @@
#include <post.h> #include <post.h>
#include <watchdog.h> #include <watchdog.h>
#if CONFIG_POST & (CFG_SYS_POST_MEMORY | CFG_SYS_POST_MEM_REGIONS) #if CFG_POST & (CFG_SYS_POST_MEMORY | CFG_SYS_POST_MEM_REGIONS)
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@@ -535,4 +535,4 @@ int memory_post_test(int flags)
return ret; return ret;
} }
#endif /* CONFIG_POST&(CFG_SYS_POST_MEMORY|CFG_SYS_POST_MEM_REGIONS) */ #endif /* CFG_POST&(CFG_SYS_POST_MEMORY|CFG_SYS_POST_MEM_REGIONS) */

View File

@@ -26,7 +26,7 @@
#include <post.h> #include <post.h>
#include <rtc.h> #include <rtc.h>
#if CONFIG_POST & CONFIG_SYS_POST_RTC #if CFG_POST & CONFIG_SYS_POST_RTC
static int rtc_post_skip (ulong * diff) static int rtc_post_skip (ulong * diff)
{ {
@@ -189,4 +189,4 @@ int rtc_post_test (int flags)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_RTC */ #endif /* CFG_POST & CONFIG_SYS_POST_RTC */

View File

@@ -19,7 +19,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -10,7 +10,7 @@
#include <ppc_defs.h> #include <ppc_defs.h>
#include <asm/cache.h> #include <asm/cache.h>
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
/* void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); */ /* void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); */
.global cpu_post_exec_02 .global cpu_post_exec_02

View File

@@ -24,7 +24,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1); extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
extern void cpu_post_exec_31 (ulong *code, ulong *ctr, ulong *lr, ulong *jump, extern void cpu_post_exec_31 (ulong *code, ulong *ctr, ulong *lr, ulong *jump,

View File

@@ -23,7 +23,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_12 (ulong *code, ulong *res, ulong op1, ulong op2); extern void cpu_post_exec_12 (ulong *code, ulong *res, ulong op1, ulong op2);

View File

@@ -23,7 +23,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1); extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);

View File

@@ -18,7 +18,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern int cpu_post_complex_1_asm (int a1, int a2, int a3, int a4, int n); extern int cpu_post_complex_1_asm (int a1, int a2, int a3, int a4, int n);
extern int cpu_post_complex_2_asm (int x, int n); extern int cpu_post_complex_2_asm (int x, int n);

View File

@@ -20,7 +20,7 @@
#include <post.h> #include <post.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern int cpu_post_test_cmp (void); extern int cpu_post_test_cmp (void);
extern int cpu_post_test_cmpi (void); extern int cpu_post_test_cmpi (void);
@@ -118,4 +118,4 @@ int cpu_post_test (int flags)
return ret; return ret;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_CPU */ #endif /* CFG_POST & CONFIG_SYS_POST_CPU */

View File

@@ -33,7 +33,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1); extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
extern void cpu_post_exec_21x (ulong *code, ulong *op1, ulong *op2, ulong op3); extern void cpu_post_exec_21x (ulong *code, ulong *op1, ulong *op2, ulong op3);

View File

@@ -13,7 +13,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math1 (void) int fpu_post_test_math1 (void)
{ {
@@ -40,4 +40,4 @@ int fpu_post_test_math1 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -13,7 +13,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
static float rintf (float x) static float rintf (float x)
{ {
@@ -45,4 +45,4 @@ int fpu_post_test_math2 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -13,7 +13,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math3 (void) int fpu_post_test_math3 (void)
{ {
@@ -33,4 +33,4 @@ int fpu_post_test_math3 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -13,7 +13,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
int fpu_post_test_math4 (void) int fpu_post_test_math4 (void)
{ {
@@ -39,4 +39,4 @@ int fpu_post_test_math4 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -13,7 +13,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
static double func (const double *array) static double func (const double *array)
{ {
@@ -36,4 +36,4 @@ int fpu_post_test_math5 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -15,7 +15,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
static int failed; static int failed;
@@ -204,4 +204,4 @@ int fpu_post_test_math6 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -21,7 +21,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
#include <watchdog.h> #include <watchdog.h>
@@ -71,4 +71,4 @@ int fpu_post_test (int flags)
return ret; return ret;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -15,7 +15,7 @@
GNU_FPOST_ATTR GNU_FPOST_ATTR
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
union uf union uf
{ {
@@ -82,4 +82,4 @@ int fpu_post_test_math7 (void)
return 0; return 0;
} }
#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */ #endif /* CFG_POST & CONFIG_SYS_POST_FPU */

View File

@@ -28,7 +28,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_22w (ulong *code, ulong *op1, ulong op2, ulong *op3); extern void cpu_post_exec_22w (ulong *code, ulong *op1, ulong op2, ulong *op3);
extern void cpu_post_exec_21w (ulong *code, ulong *op1, ulong *op2); extern void cpu_post_exec_21w (ulong *code, ulong *op1, ulong *op2);

View File

@@ -21,7 +21,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_02(ulong *code, ulong op1, ulong op2); extern void cpu_post_exec_02(ulong *code, ulong op1, ulong op2);

View File

@@ -19,7 +19,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1, extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
ulong op2); ulong op2);

View File

@@ -19,7 +19,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -19,7 +19,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1, extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
ulong op2); ulong op2);

View File

@@ -19,7 +19,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -28,7 +28,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_12w (ulong *code, ulong *op1, ulong op2, ulong op3); extern void cpu_post_exec_12w (ulong *code, ulong *op1, ulong op2, ulong op3);
extern void cpu_post_exec_11w (ulong *code, ulong *op1, ulong op2); extern void cpu_post_exec_11w (ulong *code, ulong *op1, ulong op2);

View File

@@ -20,7 +20,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2);
extern void cpu_post_exec_04 (ulong *code, ulong op1, ulong op2, ulong op3, extern void cpu_post_exec_04 (ulong *code, ulong op1, ulong op2, ulong op3,

View File

@@ -22,7 +22,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1, extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
ulong op2); ulong op2);

View File

@@ -21,7 +21,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -22,7 +22,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1, extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
ulong op2); ulong op2);

View File

@@ -22,7 +22,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -22,7 +22,7 @@
#include <post.h> #include <post.h>
#include "cpu_asm.h" #include "cpu_asm.h"
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1); extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
extern ulong cpu_post_makecr (long v); extern ulong cpu_post_makecr (long v);

View File

@@ -168,7 +168,7 @@ static void post_bootmode_test_off(void)
post_word_store(word); post_word_store(word);
} }
#ifndef CONFIG_POST_SKIP_ENV_FLAGS #ifndef CFG_POST_SKIP_ENV_FLAGS
static void post_get_env_flags(int *test_flags) static void post_get_env_flags(int *test_flags)
{ {
int flag[] = { POST_POWERON, POST_NORMAL, POST_SLOWTEST, int flag[] = { POST_POWERON, POST_NORMAL, POST_SLOWTEST,
@@ -227,7 +227,7 @@ static void post_get_flags(int *test_flags)
for (j = 0; j < post_list_size; j++) for (j = 0; j < post_list_size; j++)
test_flags[j] = post_list[j].flags; test_flags[j] = post_list[j].flags;
#ifndef CONFIG_POST_SKIP_ENV_FLAGS #ifndef CFG_POST_SKIP_ENV_FLAGS
post_get_env_flags(test_flags); post_get_env_flags(test_flags);
#endif #endif

View File

@@ -45,7 +45,7 @@ extern void sysmon_reloc (void);
struct post_test post_list[] = struct post_test post_list[] =
{ {
#if CONFIG_POST & CONFIG_SYS_POST_OCM #if CFG_POST & CONFIG_SYS_POST_OCM
{ {
"OCM test", "OCM test",
"ocm", "ocm",
@@ -57,7 +57,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_OCM CONFIG_SYS_POST_OCM
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_CACHE #if CFG_POST & CONFIG_SYS_POST_CACHE
{ {
"Cache test", "Cache test",
"cache", "cache",
@@ -69,9 +69,9 @@ struct post_test post_list[] =
CONFIG_SYS_POST_CACHE CONFIG_SYS_POST_CACHE
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_WATCHDOG #if CFG_POST & CONFIG_SYS_POST_WATCHDOG
#if defined(CONFIG_POST_WATCHDOG) #if defined(CFG_POST_WATCHDOG)
CONFIG_POST_WATCHDOG, CFG_POST_WATCHDOG,
#else #else
{ {
"Watchdog timer test", "Watchdog timer test",
@@ -85,7 +85,7 @@ struct post_test post_list[] =
}, },
#endif #endif
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_I2C #if CFG_POST & CONFIG_SYS_POST_I2C
{ {
"I2C test", "I2C test",
"i2c", "i2c",
@@ -97,7 +97,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_I2C CONFIG_SYS_POST_I2C
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_RTC #if CFG_POST & CONFIG_SYS_POST_RTC
{ {
"RTC test", "RTC test",
"rtc", "rtc",
@@ -109,7 +109,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_RTC CONFIG_SYS_POST_RTC
}, },
#endif #endif
#if CONFIG_POST & CFG_SYS_POST_MEMORY #if CFG_POST & CFG_SYS_POST_MEMORY
{ {
"Memory test", "Memory test",
"memory", "memory",
@@ -121,7 +121,7 @@ struct post_test post_list[] =
CFG_SYS_POST_MEMORY CFG_SYS_POST_MEMORY
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_CPU #if CFG_POST & CONFIG_SYS_POST_CPU
{ {
"CPU test", "CPU test",
"cpu", "cpu",
@@ -134,7 +134,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_CPU CONFIG_SYS_POST_CPU
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_FPU #if CFG_POST & CONFIG_SYS_POST_FPU
{ {
"FPU test", "FPU test",
"fpu", "fpu",
@@ -147,9 +147,9 @@ struct post_test post_list[] =
CONFIG_SYS_POST_FPU CONFIG_SYS_POST_FPU
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_UART #if CFG_POST & CONFIG_SYS_POST_UART
#if defined(CONFIG_POST_UART) #if defined(CFG_POST_UART)
CONFIG_POST_UART, CFG_POST_UART,
#else #else
{ {
"UART test", "UART test",
@@ -161,9 +161,9 @@ struct post_test post_list[] =
NULL, NULL,
CONFIG_SYS_POST_UART CONFIG_SYS_POST_UART
}, },
#endif /* CONFIG_POST_UART */ #endif /* CFG_POST_UART */
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_ETHER #if CFG_POST & CONFIG_SYS_POST_ETHER
{ {
"ETHERNET test", "ETHERNET test",
"ethernet", "ethernet",
@@ -175,7 +175,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_ETHER CONFIG_SYS_POST_ETHER
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_USB #if CFG_POST & CONFIG_SYS_POST_USB
{ {
"USB test", "USB test",
"usb", "usb",
@@ -187,7 +187,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_USB CONFIG_SYS_POST_USB
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_SPR #if CFG_POST & CONFIG_SYS_POST_SPR
{ {
"SPR test", "SPR test",
"spr", "spr",
@@ -199,7 +199,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_SPR CONFIG_SYS_POST_SPR
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_SYSMON #if CFG_POST & CONFIG_SYS_POST_SYSMON
{ {
"SYSMON test", "SYSMON test",
"sysmon", "sysmon",
@@ -211,7 +211,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_SYSMON CONFIG_SYS_POST_SYSMON
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_DSP #if CFG_POST & CONFIG_SYS_POST_DSP
{ {
"DSP test", "DSP test",
"dsp", "dsp",
@@ -223,7 +223,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_DSP CONFIG_SYS_POST_DSP
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_CODEC #if CFG_POST & CONFIG_SYS_POST_CODEC
{ {
"CODEC test", "CODEC test",
"codec", "codec",
@@ -235,7 +235,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_CODEC CONFIG_SYS_POST_CODEC
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_ECC #if CFG_POST & CONFIG_SYS_POST_ECC
{ {
"ECC test", "ECC test",
"ecc", "ecc",
@@ -247,22 +247,22 @@ struct post_test post_list[] =
CONFIG_SYS_POST_ECC CONFIG_SYS_POST_ECC
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC1 #if CFG_POST & CONFIG_SYS_POST_BSPEC1
CONFIG_POST_BSPEC1, CFG_POST_BSPEC1,
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC2 #if CFG_POST & CONFIG_SYS_POST_BSPEC2
CONFIG_POST_BSPEC2, CFG_POST_BSPEC2,
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC3 #if CFG_POST & CONFIG_SYS_POST_BSPEC3
CONFIG_POST_BSPEC3, CFG_POST_BSPEC3,
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC4 #if CFG_POST & CONFIG_SYS_POST_BSPEC4
CONFIG_POST_BSPEC4, CFG_POST_BSPEC4,
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_BSPEC5 #if CFG_POST & CONFIG_SYS_POST_BSPEC5
CONFIG_POST_BSPEC5, CFG_POST_BSPEC5,
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_COPROC #if CFG_POST & CONFIG_SYS_POST_COPROC
{ {
"Coprocessors communication test", "Coprocessors communication test",
"coproc_com", "coproc_com",
@@ -274,7 +274,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_COPROC CONFIG_SYS_POST_COPROC
}, },
#endif #endif
#if CONFIG_POST & CONFIG_SYS_POST_FLASH #if CFG_POST & CONFIG_SYS_POST_FLASH
{ {
"Parallel NOR flash test", "Parallel NOR flash test",
"flash", "flash",
@@ -286,7 +286,7 @@ struct post_test post_list[] =
CONFIG_SYS_POST_FLASH CONFIG_SYS_POST_FLASH
}, },
#endif #endif
#if CONFIG_POST & CFG_SYS_POST_MEM_REGIONS #if CFG_POST & CFG_SYS_POST_MEM_REGIONS
{ {
"Memory regions test", "Memory regions test",
"mem_regions", "mem_regions",

View File

@@ -1,3 +1,8 @@
config POST
bool "Power On Self Test support"
help
See doc/README.POST for more details
menuconfig UNIT_TEST menuconfig UNIT_TEST
bool "Unit tests" bool "Unit tests"
help help