Browse Source

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>
Simon Glass 4 years ago
parent
commit
49acd56e4f

+ 2 - 1
board/BuS/eb_cpu5282/eb_cpu5282.c

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

+ 2 - 1
board/cobra5272/cobra5272.c

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

+ 1 - 0
board/freescale/m5208evbe/m5208evbe.c

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

+ 1 - 0
board/freescale/m52277evb/m52277evb.c

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

+ 1 - 0
board/freescale/m5235evb/m5235evb.c

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

+ 3 - 1
board/freescale/m5249evb/m5249evb.c

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

+ 1 - 0
board/freescale/m5253demo/m5253demo.c

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

+ 3 - 1
board/freescale/m5272c3/m5272c3.c

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

+ 1 - 0
board/freescale/m5275evb/m5275evb.c

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

+ 1 - 0
board/freescale/m53017evb/m53017evb.c

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

+ 1 - 0
board/freescale/m5329evb/m5329evb.c

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

+ 1 - 0
board/freescale/m5373evb/m5373evb.c

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

+ 1 - 0
board/freescale/m54418twr/m54418twr.c

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

+ 1 - 0
board/freescale/m54451evb/m54451evb.c

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

+ 1 - 0
board/freescale/mpc837xerdb/mpc837xerdb.c

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

+ 1 - 1
board/sbc8641d/sbc8641d.c

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

+ 1 - 1
board/socrates/sdram.c

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

+ 1 - 0
board/sysam/stmark2/stmark2.c

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

+ 0 - 4
include/common.h

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

+ 2 - 0
include/init.h

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