From: Simon Glass Date: Sat, 28 Dec 2019 17:45:06 +0000 (-0700) Subject: common: Move testdram() into init.h X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ed782a74547cd12634051e503c86ac4e1f754775;p=u-boot.git 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 --- diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index 0b916d2482..a667413bfc 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -12,6 +12,7 @@ #include "asm/m5282.h" #include #include +#include #include #include @@ -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; diff --git a/board/cobra5272/cobra5272.c b/board/cobra5272/cobra5272.c index a0a416b50c..a79884cb50 100644 --- a/board/cobra5272/cobra5272.c +++ b/board/cobra5272/cobra5272.c @@ -5,6 +5,7 @@ */ #include +#include #include 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"); diff --git a/board/freescale/m5208evbe/m5208evbe.c b/board/freescale/m5208evbe/m5208evbe.c index 82cadb2c33..e448a64abc 100644 --- a/board/freescale/m5208evbe/m5208evbe.c +++ b/board/freescale/m5208evbe/m5208evbe.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c index 13ce4886e5..a4b795fc39 100644 --- a/board/freescale/m52277evb/m52277evb.c +++ b/board/freescale/m52277evb/m52277evb.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/board/freescale/m5235evb/m5235evb.c b/board/freescale/m5235evb/m5235evb.c index fbd2e61604..5d40393755 100644 --- a/board/freescale/m5235evb/m5235evb.c +++ b/board/freescale/m5235evb/m5235evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5249evb/m5249evb.c b/board/freescale/m5249evb/m5249evb.c index 9969f71da1..da3adc5954 100644 --- a/board/freescale/m5249evb/m5249evb.c +++ b/board/freescale/m5249evb/m5249evb.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -89,7 +90,8 @@ int dram_init(void) }; -int testdram (void) { +int testdram(void) +{ /* TODO: XXX XXX XXX */ printf ("DRAM test not implemented!\n"); diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index dcf6d7f1db..76c18b8504 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/m5272c3/m5272c3.c b/board/freescale/m5272c3/m5272c3.c index d4457abfbd..1017ef0c2a 100644 --- a/board/freescale/m5272c3/m5272c3.c +++ b/board/freescale/m5272c3/m5272c3.c @@ -7,6 +7,7 @@ */ #include +#include #include #include @@ -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"); diff --git a/board/freescale/m5275evb/m5275evb.c b/board/freescale/m5275evb/m5275evb.c index a01133612c..e65e6d0af5 100644 --- a/board/freescale/m5275evb/m5275evb.c +++ b/board/freescale/m5275evb/m5275evb.c @@ -9,6 +9,7 @@ */ #include +#include #include #include diff --git a/board/freescale/m53017evb/m53017evb.c b/board/freescale/m53017evb/m53017evb.c index 01f51b7c95..8bdb4ad127 100644 --- a/board/freescale/m53017evb/m53017evb.c +++ b/board/freescale/m53017evb/m53017evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5329evb/m5329evb.c b/board/freescale/m5329evb/m5329evb.c index 88cdba719c..d93800b364 100644 --- a/board/freescale/m5329evb/m5329evb.c +++ b/board/freescale/m5329evb/m5329evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m5373evb/m5373evb.c b/board/freescale/m5373evb/m5373evb.c index 37011fb730..1d52ce047f 100644 --- a/board/freescale/m5373evb/m5373evb.c +++ b/board/freescale/m5373evb/m5373evb.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/board/freescale/m54418twr/m54418twr.c b/board/freescale/m54418twr/m54418twr.c index a4943e76ae..8c90cfe537 100644 --- a/board/freescale/m54418twr/m54418twr.c +++ b/board/freescale/m54418twr/m54418twr.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/m54451evb/m54451evb.c b/board/freescale/m54451evb/m54451evb.c index 7cb840346c..82a2b9093b 100644 --- a/board/freescale/m54451evb/m54451evb.c +++ b/board/freescale/m54451evb/m54451evb.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 4ad62bcf1d..45038acf32 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index 0a9dab8939..d053eaeec3 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/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; diff --git a/board/socrates/sdram.c b/board/socrates/sdram.c index 9ee6f3d154..8eb4f8fc95 100644 --- a/board/socrates/sdram.c +++ b/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; diff --git a/board/sysam/stmark2/stmark2.c b/board/sysam/stmark2/stmark2.c index 790199a640..ce8b541ccd 100644 --- a/board/sysam/stmark2/stmark2.c +++ b/board/sysam/stmark2/stmark2.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index f9ad184f4a..b25744854c 100644 --- a/include/common.h +++ b/include/common.h @@ -59,10 +59,6 @@ void hang (void) __attribute__ ((noreturn)); #include -#if defined(CONFIG_SYS_DRAM_TEST) -int testdram(void); -#endif /* CONFIG_SYS_DRAM_TEST */ - /* lib/uuid.c */ #include diff --git a/include/init.h b/include/init.h index cb92c6a4b7..2a33a3fd1e 100644 --- a/include/init.h +++ b/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 *