common: Move testdram() into init.h

This function is called during init so move it to the init header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2019-12-28 10:45:06 -07:00 committed by Tom Rini
parent 9b4a205f45
commit 49acd56e4f
20 changed files with 26 additions and 10 deletions

View File

@ -12,6 +12,7 @@
#include "asm/m5282.h" #include "asm/m5282.h"
#include <bmp_layout.h> #include <bmp_layout.h>
#include <env.h> #include <env.h>
#include <init.h>
#include <status_led.h> #include <status_led.h>
#include <bus_vcxk.h> #include <bus_vcxk.h>
@ -98,7 +99,7 @@ int dram_init(void)
} }
#if defined(CONFIG_SYS_DRAM_TEST) #if defined(CONFIG_SYS_DRAM_TEST)
int testdram (void) int testdram(void)
{ {
uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -31,7 +32,7 @@ int dram_init(void)
return 0; return 0;
}; };
int testdram (void) int testdram(void)
{ {
/* TODO: XXX XXX XXX */ /* TODO: XXX XXX XXX */
printf ("DRAM test not implemented!\n"); printf ("DRAM test not implemented!\n");

View File

@ -9,6 +9,7 @@
#include <config.h> #include <config.h>
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -8,6 +8,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -9,6 +9,7 @@
#include <config.h> #include <config.h>
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -6,6 +6,7 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <init.h>
#include <malloc.h> #include <malloc.h>
#include <asm/immap.h> #include <asm/immap.h>
@ -89,7 +90,8 @@ int dram_init(void)
}; };
int testdram (void) { int testdram(void)
{
/* TODO: XXX XXX XXX */ /* TODO: XXX XXX XXX */
printf ("DRAM test not implemented!\n"); printf ("DRAM test not implemented!\n");

View File

@ -8,6 +8,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <netdev.h> #include <netdev.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -7,6 +7,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>
@ -33,7 +34,8 @@ int dram_init(void)
return 0; return 0;
}; };
int testdram (void) { int testdram(void)
{
/* TODO: XXX XXX XXX */ /* TODO: XXX XXX XXX */
printf ("DRAM test not implemented!\n"); printf ("DRAM test not implemented!\n");

View File

@ -9,6 +9,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -9,6 +9,7 @@
#include <config.h> #include <config.h>
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -9,6 +9,7 @@
#include <config.h> #include <config.h>
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -9,6 +9,7 @@
#include <config.h> #include <config.h>
#include <common.h> #include <common.h>
#include <init.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -5,6 +5,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <spi.h> #include <spi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/immap.h> #include <asm/immap.h>

View File

@ -8,6 +8,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <spi.h> #include <spi.h>
#include <asm/immap.h> #include <asm/immap.h>
#include <asm/io.h> #include <asm/io.h>

View File

@ -9,6 +9,7 @@
#include <env.h> #include <env.h>
#include <hwconfig.h> #include <hwconfig.h>
#include <i2c.h> #include <i2c.h>
#include <init.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/fsl_mpc83xx_serdes.h> #include <asm/fsl_mpc83xx_serdes.h>
#include <fdt_support.h> #include <fdt_support.h>

View File

@ -56,7 +56,7 @@ int dram_init(void)
} }
#if defined(CONFIG_SYS_DRAM_TEST) #if defined(CONFIG_SYS_DRAM_TEST)
int testdram (void) int testdram(void)
{ {
uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;

View File

@ -62,7 +62,7 @@ phys_size_t fixed_sdram(void)
#endif #endif
#if defined(CONFIG_SYS_DRAM_TEST) #if defined(CONFIG_SYS_DRAM_TEST)
int testdram (void) int testdram(void)
{ {
uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START; uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
uint *pend = (uint *) CONFIG_SYS_MEMTEST_END; uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;

View File

@ -6,6 +6,7 @@
*/ */
#include <common.h> #include <common.h>
#include <init.h>
#include <spi.h> #include <spi.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/immap.h> #include <asm/immap.h>

View File

@ -59,10 +59,6 @@ void hang (void) __attribute__ ((noreturn));
#include <display_options.h> #include <display_options.h>
#if defined(CONFIG_SYS_DRAM_TEST)
int testdram(void);
#endif /* CONFIG_SYS_DRAM_TEST */
/* lib/uuid.c */ /* lib/uuid.c */
#include <uuid.h> #include <uuid.h>

View File

@ -109,6 +109,8 @@ int dram_init_banksize(void);
long get_ram_size(long *base, long size); long get_ram_size(long *base, long size);
phys_size_t get_effective_memsize(void); phys_size_t get_effective_memsize(void);
int testdram(void);
/** /**
* arch_reserve_stacks() - Reserve all necessary stacks * arch_reserve_stacks() - Reserve all necessary stacks
* *