From a30a549a3553032d809e0356306b62de0b125901 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 4 Mar 2008 10:03:03 -0600 Subject: [PATCH] Remove erroneous or extra spd.h #includers. Many of the spd.h #includers don't need it, and wanted to have spd_sdram() declared instead. Since they didn't get that, some also had open coded extern declarations of it instead or as well. Fix it all up by using spd_sdram.h where needed. Signed-off-by: Jon Loeliger --- board/atum8548/atum8548.c | 3 +-- board/freescale/mpc8323erdb/mpc8323erdb.c | 5 ----- board/freescale/mpc832xemds/mpc832xemds.c | 5 ----- board/freescale/mpc8349emds/mpc8349emds.c | 4 +--- board/freescale/mpc8349itx/mpc8349itx.c | 6 ------ board/freescale/mpc8360emds/mpc8360emds.c | 4 ---- board/freescale/mpc8360erdk/mpc8360erdk.c | 1 - board/freescale/mpc837xemds/mpc837xemds.c | 3 --- board/freescale/mpc837xerdb/mpc837xerdb.c | 3 --- board/freescale/mpc8540ads/mpc8540ads.c | 5 +---- board/freescale/mpc8541cds/mpc8541cds.c | 4 +--- board/freescale/mpc8544ds/mpc8544ds.c | 4 +--- board/freescale/mpc8548cds/mpc8548cds.c | 4 +--- board/freescale/mpc8555cds/mpc8555cds.c | 4 +--- board/freescale/mpc8560ads/mpc8560ads.c | 4 +--- board/freescale/mpc8568mds/mpc8568mds.c | 4 +--- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 6 +----- board/freescale/mpc8641hpcn/mpc8641hpcn.c | 6 +----- board/mpc8540eval/mpc8540eval.c | 6 ++---- board/pm854/pm854.c | 5 +---- board/pm856/pm856.c | 6 ++---- board/sbc8349/sbc8349.c | 5 +---- board/sbc8548/sbc8548.c | 4 +--- board/sbc8560/sbc8560.c | 6 ++---- board/sbc8641d/sbc8641d.c | 6 +----- board/stxgp3/stxgp3.c | 5 +---- board/stxssa/stxssa.c | 5 +---- board/tqm834x/tqm834x.c | 2 -- board/tqm85xx/sdram.c | 1 - board/tqm85xx/tqm85xx.c | 2 -- 30 files changed, 23 insertions(+), 105 deletions(-) diff --git a/board/atum8548/atum8548.c b/board/atum8548/atum8548.c index f11abd816b..2f6ae29d99 100644 --- a/board/atum8548/atum8548.c +++ b/board/atum8548/atum8548.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -39,7 +39,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); long int fixed_sdram(void); int board_early_init_f (void) diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c index 2fc4fd6cbe..88d5e8fb40 100644 --- a/board/freescale/mpc8323erdb/mpc8323erdb.c +++ b/board/freescale/mpc8323erdb/mpc8323erdb.c @@ -13,18 +13,13 @@ #include #include #include -#include #include #include #include #if defined(CONFIG_PCI) #include #endif -#if defined(CONFIG_SPD_EEPROM) -#include -#else #include -#endif const qe_iop_conf_t qe_iop_conf_tab[] = { /* UCC3 */ diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c index 6adf7e7b74..c10b30f24e 100644 --- a/board/freescale/mpc832xemds/mpc832xemds.c +++ b/board/freescale/mpc832xemds/mpc832xemds.c @@ -16,17 +16,12 @@ #include #include #include -#include #include #include #if defined(CONFIG_PCI) #include #endif -#if defined(CONFIG_SPD_EEPROM) -#include -#else #include -#endif #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c index 9f4ac8e413..6c825969d3 100644 --- a/board/freescale/mpc8349emds/mpc8349emds.c +++ b/board/freescale/mpc8349emds/mpc8349emds.c @@ -28,11 +28,9 @@ #include #include #include -#include #include -#if defined(CONFIG_SPD_EEPROM) #include -#endif + #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c index 8c19ad6c99..972361fd68 100644 --- a/board/freescale/mpc8349itx/mpc8349itx.c +++ b/board/freescale/mpc8349itx/mpc8349itx.c @@ -24,19 +24,13 @@ #include #include #include -#include #include - #ifdef CONFIG_PCI #include #include #endif - -#ifdef CONFIG_SPD_EEPROM #include -#else #include -#endif #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc8360emds/mpc8360emds.c b/board/freescale/mpc8360emds/mpc8360emds.c index f909a33a91..d90cdb3d3c 100644 --- a/board/freescale/mpc8360emds/mpc8360emds.c +++ b/board/freescale/mpc8360emds/mpc8360emds.c @@ -15,16 +15,12 @@ #include #include #include -#include #include #if defined(CONFIG_PCI) #include #endif -#if defined(CONFIG_SPD_EEPROM) #include -#else #include -#endif #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc8360erdk/mpc8360erdk.c b/board/freescale/mpc8360erdk/mpc8360erdk.c index 98ec6abd27..8005a50531 100644 --- a/board/freescale/mpc8360erdk/mpc8360erdk.c +++ b/board/freescale/mpc8360erdk/mpc8360erdk.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c index 6925d23b3e..e57a53fde3 100644 --- a/board/freescale/mpc837xemds/mpc837xemds.c +++ b/board/freescale/mpc837xemds/mpc837xemds.c @@ -12,10 +12,7 @@ #include #include -#include -#if defined(CONFIG_SPD_EEPROM) #include -#endif #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 2d425952b9..bed0fc37ea 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -14,11 +14,8 @@ #include #include -#include #include -#if defined(CONFIG_SPD_EEPROM) #include -#endif #if defined(CFG_DRAM_TEST) int diff --git a/board/freescale/mpc8540ads/mpc8540ads.c b/board/freescale/mpc8540ads/mpc8540ads.c index 35f5eeaf03..a951b9e9a3 100644 --- a/board/freescale/mpc8540ads/mpc8540ads.c +++ b/board/freescale/mpc8540ads/mpc8540ads.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include @@ -37,8 +37,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); long int fixed_sdram(void); @@ -73,7 +71,6 @@ long int initdram(int board_type) { long dram_size = 0; - extern long spd_sdram (void); puts("Initializing\n"); diff --git a/board/freescale/mpc8541cds/mpc8541cds.c b/board/freescale/mpc8541cds/mpc8541cds.c index 9ab98d4b68..62c8d63cdc 100644 --- a/board/freescale/mpc8541cds/mpc8541cds.c +++ b/board/freescale/mpc8541cds/mpc8541cds.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -39,8 +39,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c index 66cb536a4b..81070164c1 100644 --- a/board/freescale/mpc8544ds/mpc8544ds.c +++ b/board/freescale/mpc8544ds/mpc8544ds.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,8 +38,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void sdram_init(void); int board_early_init_f (void) diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index 47e2dd86cb..dc39fbe8dc 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,8 +42,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); DECLARE_GLOBAL_DATA_PTR; -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); diff --git a/board/freescale/mpc8555cds/mpc8555cds.c b/board/freescale/mpc8555cds/mpc8555cds.c index 74c220d4fd..8acbba4208 100644 --- a/board/freescale/mpc8555cds/mpc8555cds.c +++ b/board/freescale/mpc8555cds/mpc8555cds.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -37,8 +37,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); diff --git a/board/freescale/mpc8560ads/mpc8560ads.c b/board/freescale/mpc8560ads/mpc8560ads.c index bb7f11bcc8..8d4b8a8b5a 100644 --- a/board/freescale/mpc8560ads/mpc8560ads.c +++ b/board/freescale/mpc8560ads/mpc8560ads.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -39,7 +39,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); void local_bus_init(void); void sdram_init(void); @@ -275,7 +274,6 @@ long int initdram(int board_type) { long dram_size = 0; - extern long spd_sdram (void); puts("Initializing\n"); diff --git a/board/freescale/mpc8568mds/mpc8568mds.c b/board/freescale/mpc8568mds/mpc8568mds.c index 3c3726b49c..4568aa1df5 100644 --- a/board/freescale/mpc8568mds/mpc8568mds.c +++ b/board/freescale/mpc8568mds/mpc8568mds.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -102,8 +102,6 @@ const qe_iop_conf_t qe_iop_conf_tab[] = { extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c index 16acbbe8ad..d9a740ee0d 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c @@ -27,10 +27,10 @@ #include #include #include -#include #include #include #include +#include #include "../common/pixis.h" @@ -38,10 +38,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -#if defined(CONFIG_SPD_EEPROM) -#include "spd_sdram.h" -#endif - void sdram_init(void); long int fixed_sdram(void); void mpc8610hpcd_diu_init(void); diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c index 0e451dc35a..31e7d67d04 100644 --- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c +++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,10 +36,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); #endif -#if defined(CONFIG_SPD_EEPROM) -#include "spd_sdram.h" -#endif - void sdram_init(void); long int fixed_sdram(void); diff --git a/board/mpc8540eval/mpc8540eval.c b/board/mpc8540eval/mpc8540eval.c index 64dfe0930c..8328b3a062 100644 --- a/board/mpc8540eval/mpc8540eval.c +++ b/board/mpc8540eval/mpc8540eval.c @@ -26,9 +26,7 @@ #include #include #include -#include - -extern long int spd_sdram (void); +#include long int fixed_sdram (void); @@ -66,7 +64,7 @@ int checkboard (void) long int initdram (int board_type) { long dram_size = 0; - extern long spd_sdram (void); + #if !defined(CONFIG_RAM_AS_FLASH) volatile ccsr_lbc_t *lbc = (void *)(CFG_MPC85xx_LBC_ADDR); sys_info_t sysinfo; diff --git a/board/pm854/pm854.c b/board/pm854/pm854.c index 999d8b5259..5e7bf346cc 100644 --- a/board/pm854/pm854.c +++ b/board/pm854/pm854.c @@ -29,14 +29,12 @@ #include #include #include -#include +#include #if defined(CONFIG_DDR_ECC) extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); long int fixed_sdram(void); @@ -77,7 +75,6 @@ long int initdram(int board_type) { long dram_size = 0; - extern long spd_sdram (void); puts("Initializing\n"); diff --git a/board/pm856/pm856.c b/board/pm856/pm856.c index bfde6959b4..792d1e5890 100644 --- a/board/pm856/pm856.c +++ b/board/pm856/pm856.c @@ -30,15 +30,13 @@ #include #include #include -#include +#include #include #if defined(CONFIG_DDR_ECC) extern void ddr_enable_ecc(unsigned int dram_size); #endif -extern long int spd_sdram(void); - void local_bus_init(void); long int fixed_sdram(void); @@ -231,7 +229,7 @@ long int initdram(int board_type) { long dram_size = 0; - extern long spd_sdram (void); + puts("Initializing\n"); diff --git a/board/sbc8349/sbc8349.c b/board/sbc8349/sbc8349.c index 5446c205e1..e89b6e8248 100644 --- a/board/sbc8349/sbc8349.c +++ b/board/sbc8349/sbc8349.c @@ -30,11 +30,8 @@ #include #include #include -#include -#include -#if defined(CONFIG_SPD_EEPROM) #include -#endif +#include #if defined(CONFIG_OF_LIBFDT) #include #endif diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c index d57548a7df..8a6ced3864 100644 --- a/board/sbc8548/sbc8548.c +++ b/board/sbc8548/sbc8548.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,8 +41,6 @@ extern void ddr_enable_ecc(unsigned int dram_size); DECLARE_GLOBAL_DATA_PTR; -extern long int spd_sdram(void); - void local_bus_init(void); void sdram_init(void); long int fixed_sdram (void); diff --git a/board/sbc8560/sbc8560.c b/board/sbc8560/sbc8560.c index 47df884ce5..8df4f3a975 100644 --- a/board/sbc8560/sbc8560.c +++ b/board/sbc8560/sbc8560.c @@ -27,13 +27,11 @@ */ -extern long int spd_sdram (void); - #include #include #include #include -#include +#include #include long int fixed_sdram (void); @@ -262,7 +260,7 @@ int checkboard (void) long int initdram (int board_type) { long dram_size = 0; - extern long spd_sdram (void); + #if 0 #if !defined(CONFIG_RAM_AS_FLASH) volatile ccsr_lbc_t *lbc = (void *)(CFG_MPC85xx_LBC_ADDR); diff --git a/board/sbc8641d/sbc8641d.c b/board/sbc8641d/sbc8641d.c index e7334ef576..b3dd9c8657 100644 --- a/board/sbc8641d/sbc8641d.c +++ b/board/sbc8641d/sbc8641d.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -42,10 +42,6 @@ extern void ddr_enable_ecc (unsigned int dram_size); #endif -#if defined(CONFIG_SPD_EEPROM) -#include "spd_sdram.h" -#endif - void sdram_init (void); long int fixed_sdram (void); diff --git a/board/stxgp3/stxgp3.c b/board/stxgp3/stxgp3.c index 3649acf07d..f04ffa8046 100644 --- a/board/stxgp3/stxgp3.c +++ b/board/stxgp3/stxgp3.c @@ -29,15 +29,13 @@ */ -extern long int spd_sdram (void); - #include #include #include #include #include #include -#include +#include #include long int fixed_sdram (void); @@ -281,7 +279,6 @@ long int initdram (int board_type) { long dram_size = 0; - extern long spd_sdram (void); #if defined(CONFIG_DDR_DLL) { diff --git a/board/stxssa/stxssa.c b/board/stxssa/stxssa.c index e2b38a6205..08177e1aec 100644 --- a/board/stxssa/stxssa.c +++ b/board/stxssa/stxssa.c @@ -29,15 +29,13 @@ */ -extern long int spd_sdram (void); - #include #include #include #include #include #include -#include +#include #include long int fixed_sdram (void); @@ -297,7 +295,6 @@ long int initdram (int board_type) { long dram_size = 0; - extern long spd_sdram (void); #if defined(CONFIG_DDR_DLL) { diff --git a/board/tqm834x/tqm834x.c b/board/tqm834x/tqm834x.c index 7d0b055484..aea985ccc6 100644 --- a/board/tqm834x/tqm834x.c +++ b/board/tqm834x/tqm834x.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -59,7 +58,6 @@ int tqm834x_num_flash_banks; /* External definitions */ ulong flash_get_size (ulong base, int banknum); extern flash_info_t flash_info[]; -extern long spd_sdram (void); /* Local functions */ static int detect_num_flash_banks(void); diff --git a/board/tqm85xx/sdram.c b/board/tqm85xx/sdram.c index 2053adefb4..788a48cd13 100644 --- a/board/tqm85xx/sdram.c +++ b/board/tqm85xx/sdram.c @@ -27,7 +27,6 @@ #include #include #include -#include struct sdram_conf_s { unsigned long size; diff --git a/board/tqm85xx/tqm85xx.c b/board/tqm85xx/tqm85xx.c index 5d5cb1b75c..8fa0162d83 100644 --- a/board/tqm85xx/tqm85xx.c +++ b/board/tqm85xx/tqm85xx.c @@ -32,7 +32,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -40,7 +39,6 @@ DECLARE_GLOBAL_DATA_PTR; extern flash_info_t flash_info[]; /* FLASH chips info */ void local_bus_init (void); -long int fixed_sdram (void); ulong flash_get_size (ulong base, int banknum); #ifdef CONFIG_PS2MULT -- 2.39.5