From 74eb0222594fd23aafdf168e60e872814eea8b62 Mon Sep 17 00:00:00 2001 From: Mike Nuss Date: Mon, 3 Mar 2008 15:27:05 -0500 Subject: [PATCH 1/7] PPC4xx (Sequoia): Fix Ethernet "remote fault" problems Every now and then a Sequoia board (or equivalent hardware) had problems connecting to a Gigabit capable network interface. There were differences in the PHY setup between Linux and U-Boot. This patch fixes the problem. Apparently "remote fault" is being set, which signals to some devices (on the other end of the cable) that a fault has occurred, while other devices ignore it. I believe the RF bit was causing the issue, but I removed T4 also, to match up with Linux. Signed-off-by: Mike Nuss --- cpu/ppc4xx/miiphy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c index 4216f0bd4..3978773f9 100644 --- a/cpu/ppc4xx/miiphy.c +++ b/cpu/ppc4xx/miiphy.c @@ -143,9 +143,8 @@ int phy_setup_aneg (char *devname, unsigned char addr) u16 adv; miiphy_read (devname, addr, PHY_ANAR, &adv); - adv |= (PHY_ANLPAR_ACK | PHY_ANLPAR_RF | PHY_ANLPAR_T4 | - PHY_ANLPAR_TXFD | PHY_ANLPAR_TX | PHY_ANLPAR_10FD | - PHY_ANLPAR_10); + adv |= (PHY_ANLPAR_ACK | PHY_ANLPAR_TXFD | PHY_ANLPAR_TX | + PHY_ANLPAR_10FD | PHY_ANLPAR_10); miiphy_write (devname, addr, PHY_ANAR, adv); miiphy_read (devname, addr, PHY_1000BTCR, &adv); From dfece9500556bed5d8244b1c15d973cec7c25bfe Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 4 Mar 2008 11:58:26 +0100 Subject: [PATCH 2/7] examples/Makefile: build "hello_world" on 8xx, too. Signed-off-by: Wolfgang Denk --- examples/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 60a6f5ea5..c5d629b68 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -77,9 +77,9 @@ SREC = hello_world.srec BIN = hello_world.bin ifeq ($(CPU),mpc8xx) -ELF = test_burst -SREC = test_burst.srec -BIN = test_burst.bin +ELF += test_burst +SREC += test_burst.srec +BIN += test_burst.bin endif ifeq ($(ARCH),i386) From f9301e1cda296245ba052d7b08321199c3d0af9d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 4 Mar 2008 14:58:31 +0100 Subject: [PATCH 3/7] Makefile: fix problem with out-of-tree builds introduced by 5013c09f Commit 5013c09f (Makefile: cleanup "clean" target) introduced a problem for out-of-tree builds which caused "make clean" to fail. Signed-off-by: Wolfgang Denk --- Makefile | 71 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index b464c728b..5198e1227 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License @@ -598,7 +598,7 @@ prs200_highboot_DDR_config: unconfig $(XECHO) "... with console on COM12" ; \ } @[ -z "$(findstring prs200,$@)" ] || \ - { echo "#define CONFIG_PRS200" >>$(obj)include/config.h ;\ + { echo "#define CONFIG_PRS200" >>$(obj)include/config.h ;\ } @$(MKCONFIG) -n $@ -a mcc200 ppc mpc5xxx mcc200 @@ -611,7 +611,7 @@ munices_config: unconfig o2dnt_config: unconfig @$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt -pf5200_config: unconfig +pf5200_config: unconfig @$(MKCONFIG) pf5200 ppc mpc5xxx pf5200 esd PM520_config \ @@ -755,9 +755,9 @@ ads5121_PCI_config \ ## MPC8xx Systems ######################################################################### -Adder_config \ +Adder_config \ Adder87x_config \ -AdderII_config \ +AdderII_config \ : unconfig @mkdir -p $(obj)include $(if $(findstring AdderII,$@), \ @@ -767,8 +767,8 @@ AdderII_config \ AdderUSB_config: unconfig @$(MKCONFIG) -a AdderUSB ppc mpc8xx adder -ADS860_config \ -FADS823_config \ +ADS860_config \ +FADS823_config \ FADS850SAR_config \ MPC86xADS_config \ MPC885ADS_config \ @@ -879,7 +879,7 @@ IVMS8_config: unconfig KUP4K_config : unconfig @$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup -KUP4X_config : unconfig +KUP4X_config : unconfig @$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4x kup LANTEC_config : unconfig @@ -1028,9 +1028,9 @@ RPXlite_DW_64_config \ RPXlite_DW_LCD_config \ RPXlite_DW_64_LCD_config \ RPXlite_DW_NVRAM_config \ -RPXlite_DW_NVRAM_64_config \ +RPXlite_DW_NVRAM_64_config \ RPXlite_DW_NVRAM_LCD_config \ -RPXlite_DW_NVRAM_64_LCD_config \ +RPXlite_DW_NVRAM_64_LCD_config \ RPXlite_DW_config: unconfig @mkdir -p $(obj)include @ >$(obj)include/config.h @@ -2012,7 +2012,7 @@ MPC832XEMDS_ATM_config: unconfig if [ "$(findstring _ATM_,$@)" ] ; then \ $(XECHO) -n "...ATM..." ; \ echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ - echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ fi ; @$(MKCONFIG) -a MPC832XEMDS ppc mpc83xx mpc832xemds freescale @@ -2062,7 +2062,7 @@ MPC8360EMDS_ATM_config: unconfig if [ "$(findstring _ATM_,$@)" ] ; then \ $(XECHO) -n "...ATM..." ; \ echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ - echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ fi ; @$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds freescale @@ -2111,7 +2111,7 @@ MPC8540EVAL_config \ MPC8540EVAL_33_config \ MPC8540EVAL_66_config \ MPC8540EVAL_33_slave_config \ -MPC8540EVAL_66_slave_config: unconfig +MPC8540EVAL_66_slave_config: unconfig @mkdir -p $(obj)include @echo "" >$(obj)include/config.h ; \ if [ "$(findstring _33_,$@)" ] ; then \ @@ -2191,7 +2191,7 @@ sbc8548_config: unconfig sbc8560_config \ sbc8560_33_config \ -sbc8560_66_config: unconfig +sbc8560_66_config: unconfig @mkdir -p $(obj)include @if [ "$(findstring _66_,$@)" ] ; then \ echo "#define CONFIG_PCI_66" >>$(obj)include/config.h ; \ @@ -2587,10 +2587,10 @@ logodl_config : unconfig @$(MKCONFIG) $(@:_config=) arm pxa logodl pdnb3_config \ -scpu_config: unconfig +scpu_config: unconfig @mkdir -p $(obj)include @if [ "$(findstring scpu_,$@)" ] ; then \ - echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ + echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ $(XECHO) "... on SCPU board variant" ; \ else \ >$(obj)include/config.h ; \ @@ -2893,7 +2893,7 @@ ms7750se_config: unconfig @echo "#define CONFIG_MS7750SE 1" >> $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7750se -ms7722se_config : unconfig +ms7722se_config : unconfig @ >$(obj)include/config.h @echo "#define CONFIG_MS7722SE 1" >> $(obj)include/config.h @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7722se @@ -2903,25 +2903,30 @@ ms7722se_config : unconfig ######################################################################### clean: + @rm -f $(obj)examples/82559_eeprom $(obj)examples/eepro100_eeprom \ + $(obj)examples/hello_world $(obj)examples/interrupt \ + $(obj)examples/mem_to_mem_idma2intr \ + $(obj)examples/sched $(obj)examples/smc91111_eeprom \ + $(obj)examples/test_burst $(obj)examples/timer + @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \ + $(obj)tools/env/{fw_printenv,fw_setenv} \ + $(obj)tools/envcrc \ + $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ + $(obj)tools/gen_eth_addr $(obj)tools/img2srec \ + $(obj)tools/mkimage $(obj)tools/mpc86x_clk \ + $(obj)tools/ncb $(obj)tools/ubsha1 + @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ + $(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin} \ + $(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \ + $(obj)board/{integratorap,integratorcp}/u-boot.lds \ + $(obj)board/{bf533-ezkit,bf533-stamp,bf537-stamp,bf561-ezkit}/u-boot.lds + @rm -f $(obj)include/bmp_logo.h $(obj)nand_spl/{u-boot-spl,u-boot-spl.map} + @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl.map} + @rm -f $(obj)api_examples/demo $(VERSION_FILE) @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' \ - -o -name '*.o' -o -name '*.a' \) -print \ + -o -name '*.o' -o -name '*.a' \) -print \ | xargs rm -f - @cd $(obj)examples/ && rm -f hello_world timer eepro100_eeprom sched \ - mem_to_mem_idma2intr 82559_eeprom smc91111_eeprom interrupt \ - test_burst - @cd $(obj)tools/ && rm -f bmp_logo easylogo/easylogo \ - env/{fw_printenv,fw_setenv} envcrc gdb/{astest,gdbcont,gdbsend} \ - gen_eth_addr img2srec mkimage mpc86x_clk ncb ubsha1 - @cd $(obj)board/ && rm -f cray/L1/{bootscript.c,bootscript.image} \ - netstar/{eeprom,crcek,crcit,*.srec,*.bin} \ - trab/trab_fkt voiceblue/eeprom \ - {integratorap,integratorcp}/u-boot.lds integratorcp/u-boot.lds \ - {bf533-ezkit,bf533-stamp,bf537-stamp,bf561-ezkit}/u-boot.lds - @rm -f $(obj)include/bmp_logo.h $(obj)nand_spl/{u-boot-spl,u-boot-spl.map} - @cd $(obj)onenand_ipl/ && rm -f onenand-ipl onenand-ipl.bin \ - onenand-ipl-2k.bin onenand-ipl.map - @rm -f $(obj)api_examples/demo $(VERSION_FILE) clobber: clean @find $(OBJTREE) -type f \( -name .depend \ From 384faaafb999cae3ce447c93e28a0b7e2e5fef53 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 4 Mar 2008 17:38:50 +0100 Subject: [PATCH 4/7] W7OLMC/W7OLMG: fix build problems (redundant #define) Signed-off-by: Wolfgang Denk --- board/w7o/w7o.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/w7o/w7o.h b/board/w7o/w7o.h index d6f50e2e6..d1fed028c 100644 --- a/board/w7o/w7o.h +++ b/board/w7o/w7o.h @@ -31,9 +31,6 @@ #define PPC405GP_GPIO0_ODR 0xef600718L /* GPIO Open Drain */ #define PPC405GP_GPIO0_IR 0xef60071cL /* GPIO Input */ -/* AMCC 405GP DCRs */ -#define CPC0_CR0 0xb1 /* Chip control register 0 */ - /* LMG FPGA <=> CPU GPIO signals */ #define LMG_XCV_INIT 0x10000000L #define LMG_XCV_PROG 0x04000000L From a4475386cef14af3fd88f0518b688e755669486d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 4 Mar 2008 17:41:28 +0100 Subject: [PATCH 5/7] PCS440EP: fix build problems (redundant #define) Signed-off-by: Wolfgang Denk --- include/configs/pcs440ep.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/configs/pcs440ep.h b/include/configs/pcs440ep.h index 56a02a5fc..b666964aa 100644 --- a/include/configs/pcs440ep.h +++ b/include/configs/pcs440ep.h @@ -182,10 +182,6 @@ #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ #endif -#define CONFIG_PREBOOT "echo;" \ - "echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \ - "echo" - /* check U-Boot image with SHA1 sum */ #define CONFIG_SHA1_CHECK_UB_IMG 1 #define CONFIG_SHA1_START CFG_MONITOR_BASE From a30a549a3553032d809e0356306b62de0b125901 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 4 Mar 2008 10:03:03 -0600 Subject: [PATCH 6/7] 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 f11abd816..2f6ae29d9 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 2fc4fd6cb..88d5e8fb4 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 6adf7e7b7..c10b30f24 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 9f4ac8e41..6c825969d 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 8c19ad6c9..972361fd6 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 f909a33a9..d90cdb3d3 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 98ec6abd2..8005a5053 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 6925d23b3..e57a53fde 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 2d425952b..bed0fc37e 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 35f5eeaf0..a951b9e9a 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 9ab98d4b6..62c8d63cd 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 66cb536a4..81070164c 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 47e2dd86c..dc39fbe8d 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 74c220d4f..8acbba420 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 bb7f11bcc..8d4b8a8b5 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 3c3726b49..4568aa1df 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 16acbbe8a..d9a740ee0 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 0e451dc35..31e7d67d0 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 64dfe0930..8328b3a06 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 999d8b525..5e7bf346c 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 bfde6959b..792d1e589 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 5446c205e..e89b6e824 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 d57548a7d..8a6ced386 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 47df884ce..8df4f3a97 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 e7334ef57..b3dd9c865 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 3649acf07..f04ffa804 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 e2b38a620..08177e1ae 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 7d0b05548..aea985ccc 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 2053adefb..788a48cd1 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 5d5cb1b75..8fa0162d8 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 From 6bc113886d7d316df1a4e459bec8baf027518551 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 4 Mar 2008 17:40:41 +0100 Subject: [PATCH 7/7] net: Print error message upon net usage when no ethernet-interface is found This patch fixes a problem seen on PPC4xx boards, when no MAC address is defined. Then no ethernet interface is available but a simple "tftp" command will return without any error message which is quite confusing. Signed-off-by: Stefan Roese --- net/eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 62297abba..16a6dcbd8 100644 --- a/net/eth.c +++ b/net/eth.c @@ -441,8 +441,10 @@ int eth_init(bd_t *bis) { struct eth_device* old_current; - if (!eth_current) + if (!eth_current) { + puts ("No ethernet found.\n"); return -1; + } old_current = eth_current; do {