From d5be43de93ff905c465e509d45a3164ef48d26e7 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 11 Jun 2007 19:02:10 -0500 Subject: drivers/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*). This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger --- drivers/tsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index 129847870..e717cd748 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -176,7 +176,7 @@ int tsec_initialize(bd_t * bis, int index, char *devname) priv->regs->maccfg1 |= MACCFG1_SOFT_RESET; priv->regs->maccfg1 &= ~(MACCFG1_SOFT_RESET); -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) \ +#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) \ && !defined(BITBANGMII) miiphy_register(dev->name, tsec_miiphy_read, tsec_miiphy_write); #endif @@ -1443,7 +1443,7 @@ static void relocate_cmds(void) relocated = 1; } -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) \ +#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) \ && !defined(BITBANGMII) struct tsec_private *get_priv_for_phy(unsigned char phyaddr) -- cgit v1.2.3-70-g09d2 From cb51c0bf88f95a1bca68324b0126f8eed8b43273 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Mon, 9 Jul 2007 17:39:42 -0500 Subject: drivers/[n-z]*: Remove obsolete references to CONFIG_COMMANDS Signed-off-by: Jon Loeliger --- drivers/nand/nand.c | 2 +- drivers/nand/nand_base.c | 2 +- drivers/nand/nand_bbt.c | 2 +- drivers/nand/nand_ecc.c | 4 ++-- drivers/nand/nand_ids.c | 2 +- drivers/nand/nand_util.c | 4 ++-- drivers/nand_legacy/nand_legacy.c | 4 ++-- drivers/natsemi.c | 2 +- drivers/netarm_eth.c | 2 +- drivers/ns8382x.c | 2 +- drivers/pcnet.c | 2 +- drivers/plb2800_eth.c | 2 +- drivers/pxa_pcmcia.c | 2 +- drivers/rpx_pcmcia.c | 8 ++++---- drivers/rtl8019.c | 2 +- drivers/rtl8139.c | 2 +- drivers/rtl8169.c | 2 +- drivers/sk98lin/uboot_drv.c | 2 +- drivers/sym53c8xx.c | 4 ++-- drivers/ti_pci1410a.c | 2 +- drivers/tigon3.c | 2 +- drivers/tqm8xx_pcmcia.c | 6 +++--- drivers/tsec.c | 7 +++---- drivers/tsi108_eth.c | 2 +- drivers/tsi108_i2c.c | 4 ++-- 25 files changed, 37 insertions(+), 38 deletions(-) (limited to 'drivers/tsec.c') diff --git a/drivers/nand/nand.c b/drivers/nand/nand.c index 104a4167f..27b5792bc 100644 --- a/drivers/nand/nand.c +++ b/drivers/nand/nand.c @@ -23,7 +23,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index 2e53076af..151f535c5 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -72,7 +72,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include #include diff --git a/drivers/nand/nand_bbt.c b/drivers/nand/nand_bbt.c index 13ea97e39..19a9bc2a5 100644 --- a/drivers/nand/nand_bbt.c +++ b/drivers/nand/nand_bbt.c @@ -54,7 +54,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include #include diff --git a/drivers/nand/nand_ecc.c b/drivers/nand/nand_ecc.c index 8b39e2a97..4c532b079 100644 --- a/drivers/nand/nand_ecc.c +++ b/drivers/nand/nand_ecc.c @@ -37,7 +37,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include @@ -197,4 +197,4 @@ int nand_correct_data(struct mtd_info *mtd, u_char *dat, return -1; } -#endif /* CONFIG_COMMANDS & CFG_CMD_NAND */ +#endif diff --git a/drivers/nand/nand_ids.c b/drivers/nand/nand_ids.c index 5b944a58d..075cae66b 100644 --- a/drivers/nand/nand_ids.c +++ b/drivers/nand/nand_ids.c @@ -13,7 +13,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include diff --git a/drivers/nand/nand_util.c b/drivers/nand/nand_util.c index 135e3c43a..88c1df6c2 100644 --- a/drivers/nand/nand_util.c +++ b/drivers/nand/nand_util.c @@ -32,7 +32,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && !defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && !defined(CFG_NAND_LEGACY) #include #include @@ -859,4 +859,4 @@ int nand_unlock(nand_info_t *meminfo, ulong start, ulong length) return ret; } -#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) && !defined(CFG_NAND_LEGACY) */ +#endif diff --git a/drivers/nand_legacy/nand_legacy.c b/drivers/nand_legacy/nand_legacy.c index 18b4e4593..fcb6d2b53 100644 --- a/drivers/nand_legacy/nand_legacy.c +++ b/drivers/nand_legacy/nand_legacy.c @@ -22,7 +22,7 @@ # define SHOW_BOOT_PROGRESS(arg) #endif -#if ((CONFIG_COMMANDS & CFG_CMD_NAND) || defined(CONFIG_CMD_NAND)) && defined(CFG_NAND_LEGACY) +#if defined(CONFIG_CMD_NAND) && defined(CFG_NAND_LEGACY) #include #include @@ -1616,4 +1616,4 @@ int read_jffs2_nand(size_t start, size_t len, } #endif /* CONFIG_JFFS2_NAND */ -#endif /* (CONFIG_COMMANDS & CFG_CMD_NAND) && defined(CFG_NAND_LEGACY) */ +#endif diff --git a/drivers/natsemi.c b/drivers/natsemi.c index 6e0e73f6c..075d6c52c 100644 --- a/drivers/natsemi.c +++ b/drivers/natsemi.c @@ -56,7 +56,7 @@ #include #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \ +#if defined(CONFIG_CMD_NET) \ && defined(CONFIG_NET_MULTI) && defined(CONFIG_NATSEMI) /* defines */ diff --git a/drivers/netarm_eth.c b/drivers/netarm_eth.c index 913e89b79..a99ee5da2 100644 --- a/drivers/netarm_eth.c +++ b/drivers/netarm_eth.c @@ -30,7 +30,7 @@ #include -#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET) +#if defined(CONFIG_CMD_NET) static int na_mii_poll_busy (void); diff --git a/drivers/ns8382x.c b/drivers/ns8382x.c index 69002cd52..f8b143a01 100644 --- a/drivers/ns8382x.c +++ b/drivers/ns8382x.c @@ -56,7 +56,7 @@ #include #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \ +#if defined(CONFIG_CMD_NET) \ && defined(CONFIG_NET_MULTI) && defined(CONFIG_NS8382X) /* defines */ diff --git a/drivers/pcnet.c b/drivers/pcnet.c index 24fc64223..2af0e8f24 100644 --- a/drivers/pcnet.c +++ b/drivers/pcnet.c @@ -45,7 +45,7 @@ #define PCNET_DEBUG2(fmt,args...) #endif -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \ +#if defined(CONFIG_CMD_NET) \ && defined(CONFIG_NET_MULTI) && defined(CONFIG_PCNET) #if !defined(CONF_PCNET_79C973) && defined(CONF_PCNET_79C975) diff --git a/drivers/plb2800_eth.c b/drivers/plb2800_eth.c index 770f31b65..0ae5d808a 100644 --- a/drivers/plb2800_eth.c +++ b/drivers/plb2800_eth.c @@ -25,7 +25,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \ +#if defined(CONFIG_CMD_NET) \ && defined(CONFIG_NET_MULTI) && defined(CONFIG_PLB2800_ETHER) #include diff --git a/drivers/pxa_pcmcia.c b/drivers/pxa_pcmcia.c index ecadd452d..6020e4628 100644 --- a/drivers/pxa_pcmcia.c +++ b/drivers/pxa_pcmcia.c @@ -85,7 +85,7 @@ int pcmcia_on (void) return rc; } -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) int pcmcia_off (void) { return 0; diff --git a/drivers/rpx_pcmcia.c b/drivers/rpx_pcmcia.c index 530525d05..c7c425b93 100644 --- a/drivers/rpx_pcmcia.c +++ b/drivers/rpx_pcmcia.c @@ -9,11 +9,11 @@ #undef CONFIG_PCMCIA -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) #define CONFIG_PCMCIA #endif -#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)) && defined(CONFIG_IDE_8xx_PCCARD) +#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD) #define CONFIG_PCMCIA #endif @@ -62,12 +62,12 @@ int pcmcia_hardware_enable (int slot) return 0; /* No hardware to enable */ } -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) static int pcmcia_hardware_disable(int slot) { return 0; /* No hardware to disable */ } -#endif /* CONFIG_COMMANDS & CFG_CMD_PCMCIA */ +#endif #endif /* CONFIG_PCMCIA && (CONFIG_RPXCLASSIC || CONFIG_RPXLITE) */ diff --git a/drivers/rtl8019.c b/drivers/rtl8019.c index 31462b301..409a69f02 100644 --- a/drivers/rtl8019.c +++ b/drivers/rtl8019.c @@ -34,7 +34,7 @@ #ifdef CONFIG_DRIVER_RTL8019 -#if (CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET) +#if defined(CONFIG_CMD_NET) /* packet page register access functions */ diff --git a/drivers/rtl8139.c b/drivers/rtl8139.c index 31ed855d7..4954cd0f7 100644 --- a/drivers/rtl8139.c +++ b/drivers/rtl8139.c @@ -77,7 +77,7 @@ #include #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) && defined(CONFIG_NET_MULTI) && \ +#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \ defined(CONFIG_RTL8139) #define TICKS_PER_SEC CFG_HZ diff --git a/drivers/rtl8169.c b/drivers/rtl8169.c index 1810850f5..63ea2cca9 100644 --- a/drivers/rtl8169.c +++ b/drivers/rtl8169.c @@ -55,7 +55,7 @@ #include #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) && defined(CONFIG_NET_MULTI) && \ +#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \ defined(CONFIG_RTL8169) #undef DEBUG_RTL8169 diff --git a/drivers/sk98lin/uboot_drv.c b/drivers/sk98lin/uboot_drv.c index ff06ab38f..d02cd1be2 100644 --- a/drivers/sk98lin/uboot_drv.c +++ b/drivers/sk98lin/uboot_drv.c @@ -25,7 +25,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) && defined(CONFIG_NET_MULTI) && \ +#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \ defined(CONFIG_SK98) #include "h/skdrv1st.h" diff --git a/drivers/sym53c8xx.c b/drivers/sym53c8xx.c index f2c94ddaa..29eeccd9a 100644 --- a/drivers/sym53c8xx.c +++ b/drivers/sym53c8xx.c @@ -51,7 +51,7 @@ #define PRINTF(fmt,args...) #endif -#if ((CONFIG_COMMANDS & CFG_CMD_SCSI) || defined(CONFIG_CMD_SCSI)) && defined(CONFIG_SCSI_SYM53C8XX) +#if defined(CONFIG_CMD_SCSI) && defined(CONFIG_SCSI_SYM53C8XX) #undef SCSI_SINGLE_STEP /* @@ -787,7 +787,7 @@ void scsi_chip_init(void) scsi_write_byte(DMODE,0x00); #endif } -#endif /* (CONFIG_COMMANDS & CFG_CMD_SCSI) */ +#endif #endif /* CONFIG_SCSI_SYM53C8XX */ diff --git a/drivers/ti_pci1410a.c b/drivers/ti_pci1410a.c index d5808e575..208ca50a7 100644 --- a/drivers/ti_pci1410a.c +++ b/drivers/ti_pci1410a.c @@ -64,7 +64,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA)) && defined(CONFIG_IDE_TI_CARDBUS) +#if defined(CONFIG_CMD_PCMCIA) && defined(CONFIG_IDE_TI_CARDBUS) int pcmcia_on(int ide_base_bus); diff --git a/drivers/tigon3.c b/drivers/tigon3.c index a6a4989bd..7506a6700 100644 --- a/drivers/tigon3.c +++ b/drivers/tigon3.c @@ -12,7 +12,7 @@ /******************************************************************************/ #include #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) && !defined(CONFIG_NET_MULTI) && \ +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI) && \ defined(CONFIG_TIGON3) #ifdef CONFIG_BMW #include diff --git a/drivers/tqm8xx_pcmcia.c b/drivers/tqm8xx_pcmcia.c index 1dcefaa82..ce4b006a7 100644 --- a/drivers/tqm8xx_pcmcia.c +++ b/drivers/tqm8xx_pcmcia.c @@ -10,11 +10,11 @@ #undef CONFIG_PCMCIA -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) #define CONFIG_PCMCIA #endif -#if ((CONFIG_COMMANDS & CFG_CMD_IDE) || defined(CONFIG_CMD_IDE)) && defined(CONFIG_IDE_8xx_PCCARD) +#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_8xx_PCCARD) #define CONFIG_PCMCIA #endif @@ -241,7 +241,7 @@ int pcmcia_hardware_enable(int slot) } -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || defined(CONFIG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) int pcmcia_hardware_disable(int slot) { u_long reg; diff --git a/drivers/tsec.c b/drivers/tsec.c index e717cd748..55334d69e 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -176,7 +176,7 @@ int tsec_initialize(bd_t * bis, int index, char *devname) priv->regs->maccfg1 |= MACCFG1_SOFT_RESET; priv->regs->maccfg1 &= ~(MACCFG1_SOFT_RESET); -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) \ +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ && !defined(BITBANGMII) miiphy_register(dev->name, tsec_miiphy_read, tsec_miiphy_write); #endif @@ -1443,7 +1443,7 @@ static void relocate_cmds(void) relocated = 1; } -#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) || defined(CONFIG_CMD_MII) \ +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ && !defined(BITBANGMII) struct tsec_private *get_priv_for_phy(unsigned char phyaddr) @@ -1502,7 +1502,6 @@ static int tsec_miiphy_write(char *devname, unsigned char addr, return 0; } -#endif /* defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII) - && !defined(BITBANGMII) */ +#endif #endif /* CONFIG_TSEC_ENET */ diff --git a/drivers/tsi108_eth.c b/drivers/tsi108_eth.c index a25728eac..524e9daa4 100644 --- a/drivers/tsi108_eth.c +++ b/drivers/tsi108_eth.c @@ -27,7 +27,7 @@ #include -#if ((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) && defined(CONFIG_NET_MULTI) \ +#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) \ && defined(CONFIG_TSI108_ETH) #if !defined(CONFIG_TSI108_ETH_NUM_PORTS) || (CONFIG_TSI108_ETH_NUM_PORTS > 2) diff --git a/drivers/tsi108_i2c.c b/drivers/tsi108_i2c.c index 2c90eed0d..3a3b75c39 100644 --- a/drivers/tsi108_i2c.c +++ b/drivers/tsi108_i2c.c @@ -28,7 +28,7 @@ #ifdef CONFIG_TSI108_I2C #include -#if (CONFIG_COMMANDS & CFG_CMD_I2C) || defined(CONFIG_CMD_I2C) +#if defined(CONFIG_CMD_I2C) #define I2C_DELAY 100000 #undef DEBUG_I2C @@ -279,5 +279,5 @@ int i2c_probe (uchar chip) return i2c_read (chip, 0, 1, (char *)&tmp, 1); } -#endif /* (CONFIG_COMMANDS & CFG_CMD_I2C) */ +#endif #endif /* CONFIG_TSI108_I2C */ -- cgit v1.2.3-70-g09d2 From 7507d56ccaf7aae1c474342a9a5540165cd7e9d9 Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Tue, 8 May 2007 17:23:02 -0500 Subject: Fix Marvell 88e1145 PHY init code Fix a bug in the Marvell 88e1145 PHY init code in the TSEC driver where the reset was being done after the errata code instead of before. Signed-off-by: Haiying Wang Signed-off-by: Andy Fleming --- drivers/tsec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index 129847870..c19d87fc6 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -1037,14 +1037,16 @@ static struct phy_info phy_info_M88E1145 = { "Marvell 88E1145", 4, (struct phy_cmd[]){ /* config */ + /* Reset the PHY */ + {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + /* Errata E0, E1 */ {29, 0x001b, NULL}, {30, 0x418f, NULL}, {29, 0x0016, NULL}, {30, 0xa2da, NULL}, - /* Reset and configure the PHY */ - {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + /* Configure the PHY */ {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, {MIIM_88E1011_PHY_SCR, MIIM_88E1011_PHY_MDI_X_AUTO, -- cgit v1.2.3-70-g09d2 From 2a3cee43c3b71fa5b8d91db19f05067865290f3e Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Wed, 9 May 2007 00:54:20 -0500 Subject: tsec: Fix PHY code to match first driver Jarrold Wen noticed that the generic PHY code always matches under the current implementation. Change it so the first match wins, and *only* unknown PHYs trigger the generic driver Signed-off-by: Andy Fleming --- drivers/tsec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index c19d87fc6..467df8430 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -1353,8 +1353,10 @@ struct phy_info *get_phy_info(struct eth_device *dev) /* loop through all the known PHY types, and find one that */ /* matches the ID we read from the PHY. */ for (i = 0; phy_info[i]; i++) { - if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) + if (phy_info[i]->id == (phy_ID >> phy_info[i]->shift)) { theInfo = phy_info[i]; + break; + } } if (theInfo == NULL) { -- cgit v1.2.3-70-g09d2 From 5a56af3b522ba47fb33a3fee84d23bf1e5429654 Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Fri, 8 Jun 2007 16:41:18 -0500 Subject: Remove erroneous errata code from Marvel 88E1111S driver The Marvel 88E1111S driver for the TSEC was copied from the 88E1101 driver, and included a fix for an erratum which does not exist on that part. Now it is removed Signed-off-by: Andy Fleming --- drivers/tsec.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index 467df8430..b6c086f4a 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -993,11 +993,6 @@ struct phy_info phy_info_M88E1111S = { (struct phy_cmd[]){ /* config */ /* Reset and configure the PHY */ {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, - {0x1d, 0x1f, NULL}, - {0x1e, 0x200c, NULL}, - {0x1d, 0x5, NULL}, - {0x1e, 0x0, NULL}, - {0x1e, 0x100, NULL}, {0x14, 0x0cd2, NULL}, /* Delay RGMII TX and RX */ {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, -- cgit v1.2.3-70-g09d2 From c7e717ebc2b044d7a71062552c9dc0f54ea9b779 Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Fri, 3 Aug 2007 04:05:25 -0500 Subject: Add Marvell 1149 PHY support to the TSEC --- drivers/tsec.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index f7bb9c123..1399d0768 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -898,6 +898,39 @@ static void tsec_halt(struct eth_device *dev) phy_run_commands(priv, priv->phyinfo->shutdown); } +struct phy_info phy_info_M88E1149S = { + 0x1410ca, + "Marvell 88E1149S", + 4, + (struct phy_cmd[]){ /* config */ + /* Reset and configure the PHY */ + {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + {0x1d, 0x1f, NULL}, + {0x1e, 0x200c, NULL}, + {0x1d, 0x5, NULL}, + {0x1e, 0x0, NULL}, + {0x1e, 0x100, NULL}, + {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, + {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, + {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init}, + {miim_end,} + }, + (struct phy_cmd[]){ /* startup */ + /* Status is read once to clear old link state */ + {MIIM_STATUS, miim_read, NULL}, + /* Auto-negotiate */ + {MIIM_STATUS, miim_read, &mii_parse_sr}, + /* Read the status */ + {MIIM_88E1011_PHY_STATUS, miim_read, + &mii_parse_88E1011_psr}, + {miim_end,} + }, + (struct phy_cmd[]){ /* shutdown */ + {miim_end,} + }, +}; + /* The 5411 id is 0x206070, the 5421 is 0x2060e0 */ struct phy_info phy_info_BCM5461S = { 0x02060c1, /* 5461 ID */ @@ -1318,6 +1351,7 @@ struct phy_info *phy_info[] = { &phy_info_M88E1011S, &phy_info_M88E1111S, &phy_info_M88E1145, + &phy_info_M88E1149S, &phy_info_dm9161, &phy_info_lxt971, &phy_info_VSC8244, -- cgit v1.2.3-70-g09d2 From 5728be389e65fd47f34b33c2596271eb4db751ae Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 6 Aug 2007 01:01:49 +0200 Subject: Coding style cleanup. Update CHANGELOG. Signed-off-by: Wolfgang Denk --- CHANGELOG | 931 ++++++++++++++++++++++++++++++++++++++++++--- cpu/ppc4xx/44x_spd_ddr.c | 2 +- drivers/tsec.c | 62 +-- include/configs/ADNPESC1.h | 6 +- include/configs/APC405.h | 2 +- include/configs/Adder.h | 8 +- include/configs/BAB7xx.h | 6 +- include/configs/BC3450.h | 2 +- include/configs/CANBT.h | 2 +- include/configs/CPCI750.h | 24 +- include/configs/CU824.h | 2 +- 11 files changed, 931 insertions(+), 116 deletions(-) (limited to 'drivers/tsec.c') diff --git a/CHANGELOG b/CHANGELOG index 207f1bc65..58ef66ecd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,830 @@ +commit 8092fef4c29b395958bb649647da7e3775731517 +Author: Martin Krause +Date: Tue Dec 12 14:26:01 2006 +0100 + + Add functions to list of exported functions + + Additionally export the following fuctions (to make trab_config build again): + - simple_strtol() + - strcmp() + + Also bump the ABI version to reflect this change + + Signed-off-by: Martin Krause + +commit 63cec5814fab5d2b1c86982327433807a5ac0249 +Author: Ed Swarthout +Date: Thu Aug 2 14:09:49 2007 -0500 + + Make MPC8641's PCI/PCI-E driver a common driver for many FSL parts. + + All of the PCI/PCI-Express driver and initialization code that + was in the MPC8641HPCN port has now been moved into the common + drivers/fsl_pci_init.c. In a subsequent patch, this will be + utilized by the 85xx ports as well. + + Common PCI-E IMMAP register blocks for FSL 85xx/86xx are added. + + Also enable the second PCI-Express controller on 8641 + by getting its BATS and CFG_ setup right. + + Fixed a u16 vendor compiler warning in AHCI driver too. + + Signed-off-by: Ed Swarthout + Signed-off-by: Zhang Wei + Signed-off-by: Jon Loeliger + +commit c7e717ebc2b044d7a71062552c9dc0f54ea9b779 +Author: Andy Fleming +Date: Fri Aug 3 04:05:25 2007 -0500 + + Add Marvell 1149 PHY support to the TSEC + +commit 63e22764d2f8653f68888c667eb65b3996b52680 +Author: Wolfgang Denk +Date: Thu Aug 2 10:11:18 2007 +0200 + + Minor cleanup of _nand build rules. + +commit cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197 +Author: Wolfgang Denk +Date: Thu Aug 2 00:48:45 2007 +0200 + + Fix build errors and warnings / code cleanup. + + Signed-off-by: Wolfgang Denk + +commit 5a56af3b522ba47fb33a3fee84d23bf1e5429654 +Author: Andy Fleming +Date: Fri Jun 8 16:41:18 2007 -0500 + + Remove erroneous errata code from Marvel 88E1111S driver + + The Marvel 88E1111S driver for the TSEC was copied from the + 88E1101 driver, and included a fix for an erratum which does not + exist on that part. Now it is removed + + Signed-off-by: Andy Fleming + +commit 982efcf23fd03647e01e2fbe28a7a36239156cc0 +Author: Andy Fleming +Date: Tue Jun 5 16:38:44 2007 -0500 + + From: eran liberty + + adds the reset register to 85xx immap + + Signed-off-by: Eran Liberty + Signed-off-by: Andy Fleming + +commit d3ec0d943a045bdb99e159e7bbc77430e09f11d7 +Author: Andy Fleming +Date: Thu May 10 17:50:01 2007 -0500 + + Polished the 85xx ADS config files + + Made the boot commands use device trees by default. + Also moved the ramdisk to 1000000 (I think the previous address + was getting overridden during boot). + + Signed-off-by: Andy Fleming + +commit bfb37b32d1b0b03f18077dba49cc66a6e76fa038 +Author: Ed Swarthout +Date: Wed May 9 11:03:32 2007 -0500 + + 8544ds: Fix Makefile after moving pixis to board/freescale. + + The OBJTREE != SRCTREE build scenario was broken. + This fixes it. + + Signed-off-by: Ed Swarthout + Signed-off-by: Jon Loeliger + +commit 2a3cee43c3b71fa5b8d91db19f05067865290f3e +Author: Andy Fleming +Date: Wed May 9 00:54:20 2007 -0500 + + tsec: Fix PHY code to match first driver + + Jarrold Wen noticed that the generic PHY code always matches + under the current implementation. Change it so the first match + wins, and *only* unknown PHYs trigger the generic driver + + Signed-off-by: Andy Fleming + +commit ccc091aac61a38cd998d575d92f7232e256d6312 +Author: Andy Fleming +Date: Tue May 8 17:27:43 2007 -0500 + + Add support for CPM device tree configuration to 8560 ADS + + * Adds code to modify CPM frequencies + * Cleans up the config file to #define TSEC and (for now) #undef FCC + * Adds the MII command for all 8560 ADS configurations + * Updates config file to provide convenience commands for booting + with a device tree + + Signed-off-by: Vitaly Bordug + Signed-off-by: Andy Fleming + +commit 7507d56ccaf7aae1c474342a9a5540165cd7e9d9 +Author: Andy Fleming +Date: Tue May 8 17:23:02 2007 -0500 + + Fix Marvell 88e1145 PHY init code + + Fix a bug in the Marvell 88e1145 PHY init code in the TSEC driver + where the reset was being done after the errata code instead of + before. + + Signed-off-by: Haiying Wang + Signed-off-by: Andy Fleming + +commit 5dc210dec5bace98a50b6ba905347890091a9bb0 +Author: Ed Swarthout +Date: Wed Jul 11 14:52:16 2007 -0500 + + Add simple agent/end-point configuration in PCI AutoConfig for PCI_CLASS_PROCESSOR_POWERPC. + + Signed-off-by: Ed Swarthout + +commit e8b85f3ba4cd8930e0a2fea2100c815d64201765 +Author: Ed Swarthout +Date: Wed Jul 11 14:52:08 2007 -0500 + + pciauto setup bridge + + The P2P bridge bus numbers programmed into the device are relative to + hose->first_busno. + + Signed-off-by: Ed Swarthout + +commit 571f49fa717004ca4268b4e24057efc7bf9f987b +Author: Ed Swarthout +Date: Wed Jul 11 14:52:01 2007 -0500 + + Support PCIe extended config registers + + FSL PCIe block has extended cfg registers in the 100 and 400 range. + For example, to read the LTSSM register: pci display .0 404 1 + + Signed-off-by: Ed Swarthout + +commit ba5feb12581bb2912ce301e4866b71f846e9fc07 +Author: Ed Swarthout +Date: Wed Jul 11 14:51:48 2007 -0500 + + Minor improvements to drivers/pci_auto.c + + - Make pciauto_{pre,post}scan_setup_bridge non-static + - Added physical address display in debug messages. + + Signed-off-by: Ed Swarthout + +commit 40e81addab7bb74d20ddf681ce9babc880a828ee +Author: Ed Swarthout +Date: Wed Jul 11 14:51:35 2007 -0500 + + Start pci hose scan from hose->current_busno. + + Ensure hose->current_busno is not less than first_busno. This fixes + broken board code which leaves current_busno=0 when first_busno is + greater than 0 for the cases with multiple controllers. + + Signed-off-by: Ed Swarthout + +commit 3865b1fb7843a08ad49a6319a36415752276ff48 +Author: Stefan Roese +Date: Wed Jul 11 12:13:53 2007 +0200 + + Fix some compile problems introduced by the latest CFG_CMD_xxx cleanup + + Signed-off-by: Stefan Roese + +commit e9514751cfa5cce61ea699fa0d3eb37898a5eeb5 +Author: Stefan Roese +Date: Sun Jul 8 13:44:27 2007 +0200 + + Fix malloc problem introduced with the relocation fixup for the PPC platform + + The relocation fixup didn't handle the malloc pointer initialization + correctly. This patch fixes this problem. Tested successfully on 4xx. + The relocation fixup patches for 4xx will follow soon. + + Signed-off-by: Stefan Roese + +commit b3aff0cb9ecf236d7e8c93761dd1dadf6837a582 +Author: Jon Loeliger +Date: Tue Jul 10 11:19:50 2007 -0500 + + disk/ doc/ lib_*/ and tools/: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit ddb5d86f0215bcb6c293510c50eb050e92883b7a +Author: Jon Loeliger +Date: Tue Jul 10 11:13:21 2007 -0500 + + drivers/: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit f40a7f3e3888b42a43674b099e5470022c8c544c +Author: Jon Loeliger +Date: Tue Jul 10 11:07:56 2007 -0500 + + fs/: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit 610f2e9c28a9c101e09fa1b78143cf5f00ed1593 +Author: Jon Loeliger +Date: Tue Jul 10 11:05:02 2007 -0500 + + net/: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit 902531788376046da212afd1661cffb62f3daa1c +Author: Jon Loeliger +Date: Tue Jul 10 11:02:44 2007 -0500 + + common/: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit d39b57415838c73fb0a37eca84de3c68ba990586 +Author: Jon Loeliger +Date: Tue Jul 10 10:48:22 2007 -0500 + + board/[j-z]*: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit 77a318545d57aefa844752465b94c7e09a3f26d0 +Author: Jon Loeliger +Date: Tue Jul 10 10:39:10 2007 -0500 + + board/[A-Za-i]*: Remove lingering references to CFG_CMD_* symbols. + + Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. + Those always evaluated TRUE, and thus were always compiled + even when IDE really wasn't defined/wanted. + + Signed-off-by: Jon Loeliger + +commit 068b60a0eb7e73b243ca55399f2a7df76e2c3f3d +Author: Jon Loeliger +Date: Tue Jul 10 10:27:39 2007 -0500 + + cpu/ rtc/ include/: Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 079a136c3588814784561d6e4856970ee82d6e2a +Author: Jon Loeliger +Date: Tue Jul 10 10:12:10 2007 -0500 + + include/configs/[p-z]* + misc: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 7f5c01577400c74cc5bac74f41dd0d3c79df623c +Author: Jon Loeliger +Date: Tue Jul 10 09:38:02 2007 -0500 + + include/configs/[g-o]*: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 80ff4f99b84b64edca3fd10da365ec1493be1c95 +Author: Jon Loeliger +Date: Tue Jul 10 09:29:01 2007 -0500 + + include/configs/[a-e]*: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit a1aa0bb502e25fd598b5e0ccdfb2c174921d714a +Author: Jon Loeliger +Date: Tue Jul 10 09:22:23 2007 -0500 + + include/configs/[P-Z]*: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 659e2f6736232a08acca8785c206e2b4d9cd07d7 +Author: Jon Loeliger +Date: Tue Jul 10 09:10:49 2007 -0500 + + include/configs/[J-O]*: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 11799434c5ff15a612577bb1ad1f4ea1a0595e4b +Author: Jon Loeliger +Date: Tue Jul 10 09:02:57 2007 -0500 + + include/configs/[A-I]*: Cleanup BOOTP and lingering CFG_CMD_*. + + Explicitly add in default CONFIG_BOOTP_* options where cmd_confdefs.h + used to be included but CONFIG_BOOTP_MASK was not defined. + + Remove lingering references to CFG_CMD_* symbols. + + Signed-off-by: Jon Loeliger + +commit 1fe80d79c5c4e52d3410a7ab4b8515da095cdab3 +Author: Jon Loeliger +Date: Mon Jul 9 22:08:34 2007 -0500 + + Finally retire cmd_confdefs.h and CONFIG_BOOTP_MASK! + + All of the choices for CONFIG_BOOTP_ are now documented in + the README file. You must now individually select exactly + the set that you want using a series of + #define CONFIG_BOOTP_ + statements in the board port config files now. + + Signed-off-by: Jon Loeliger + +commit d3b8c1a743dcd31625c99e6a44590f207eb00028 +Author: Jon Loeliger +Date: Mon Jul 9 21:57:31 2007 -0500 + + include/configs/[m-z]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit 2fd90ce575b02d189cbf443c85309bcd001aa393 +Author: Jon Loeliger +Date: Mon Jul 9 21:48:26 2007 -0500 + + include/configs/[a-m]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit 37d4bb70586659dedef1658ce1bed071be098aec +Author: Jon Loeliger +Date: Mon Jul 9 21:38:02 2007 -0500 + + include/configs/[T-Z]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit 18225e8dd1950bd6dbf35011e436db7f474c187d +Author: Jon Loeliger +Date: Mon Jul 9 21:31:24 2007 -0500 + + include/configs/[P-S]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit 7be044e4ea644b0ef1c486dadc1a4c2665b4374d +Author: Jon Loeliger +Date: Mon Jul 9 21:24:19 2007 -0500 + + include/configs/[H-N]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit 5d2ebe1b3ef0055c661bb1a0d252bf252380069f +Author: Jon Loeliger +Date: Mon Jul 9 21:16:53 2007 -0500 + + include/configs/[A-G]*: Directly use CONFIG_BOOTP_* symbols rather than CONFIG_BOOTP_MASK. + + Signed-off-by: Jon Loeliger + +commit f55f7f8d83f36021ab1f0e3d738f5d8c8083a7e3 +Author: Jon Loeliger +Date: Mon Jul 9 19:12:30 2007 -0500 + + Retire CONFIG_COMMANDS finally. + Strip old CFG_CMD_* symbols out. + + Signed-off-by: Jon Loeliger + +commit b5501f7d720fed99ab0b42c83f5dea52868ce007 +Author: Jon Loeliger +Date: Mon Jul 9 19:10:03 2007 -0500 + + Update README.* to reference new CONFIG_CMD_* names now. + + Signed-off-by: Jon Loeliger + +commit 4431283c7e6d54ae180d466e51bf2d97471a0ad9 +Author: Jon Loeliger +Date: Mon Jul 9 19:06:00 2007 -0500 + + cpu/m*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 3a1ed1e1f922c419bb71f7df4949d783ade369fa +Author: Jon Loeliger +Date: Mon Jul 9 18:57:22 2007 -0500 + + cpu/[7a-ln-z]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit ab3abcbabd840928fb1eb5122118ca466b5e5013 +Author: Jon Loeliger +Date: Mon Jul 9 18:45:16 2007 -0500 + + board/[q-z]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 3fe00109a5f12de55b6e25b1f98dfc24bc9090c9 +Author: Jon Loeliger +Date: Mon Jul 9 18:38:39 2007 -0500 + + board/[m-p]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit c508a4cefd8a953fc64957650506a035e6e3d9d1 +Author: Jon Loeliger +Date: Mon Jul 9 18:31:28 2007 -0500 + + board/[f-l]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit b9307262f8a9f3b5c9e15a6067eadc17407146f6 +Author: Jon Loeliger +Date: Mon Jul 9 18:24:55 2007 -0500 + + board/[d-e]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit fcec2eb93e126400009729328e797f12bc94f1fd +Author: Jon Loeliger +Date: Mon Jul 9 18:19:09 2007 -0500 + + board/[A-Za-c]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit a593814f2be0c9cdc3133cd550b167b8a988328f +Author: Jon Loeliger +Date: Mon Jul 9 18:10:50 2007 -0500 + + rtc/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 67350568f9d46e66c21829f3513b3db0caeb948b +Author: Jon Loeliger +Date: Mon Jul 9 18:05:38 2007 -0500 + + lib_{arm,avr32,blackfin,generic,i386}/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 7def6b34f910f08d7ef0a14646da067719237ca2 +Author: Jon Loeliger +Date: Mon Jul 9 18:02:11 2007 -0500 + + lib_{m68k,microblaze,mips,ppc}/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit dd60d1223b99a88a7216f3e041fe40634ad4c2bb +Author: Jon Loeliger +Date: Mon Jul 9 17:56:50 2007 -0500 + + fs/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit c91898bbc505aff3e12a807af88e76da18efb7ee +Author: Jon Loeliger +Date: Mon Jul 9 17:46:09 2007 -0500 + + tools/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 643d1ab23960950b52e0a2803c2d3ea4c558fa01 +Author: Jon Loeliger +Date: Mon Jul 9 17:45:14 2007 -0500 + + net/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit cb51c0bf88f95a1bca68324b0126f8eed8b43273 +Author: Jon Loeliger +Date: Mon Jul 9 17:39:42 2007 -0500 + + drivers/[n-z]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 07d38a17e964aec4c7827f0ee9a583bc8cc1ad6b +Author: Jon Loeliger +Date: Mon Jul 9 17:30:01 2007 -0500 + + drivers/[a-m]*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit cde5c64d17cf4834aa7b5c373f288bc7dad27b29 +Author: Jon Loeliger +Date: Mon Jul 9 17:22:37 2007 -0500 + + disk/: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit 639221c76c88215bd55af83ad174fc30d1940f8f +Author: Jon Loeliger +Date: Mon Jul 9 17:15:49 2007 -0500 + + include/: Remove obsolete references to CONFIG_COMMANDS + Mostly removed from comments here. + + Signed-off-by: Jon Loeliger + +commit 4ef218f6fdf8d747f4589da5252b004e7d2c2876 +Author: Wolfgang Denk +Date: Tue Jul 10 00:01:28 2007 +0200 + + Coding style cleanup; update CHANGELOG. + + Signed-off-by: Wolfgang Denk + +commit c3517f919d0f61650cf3027fd4faf0f631142f6c +Author: Jon Loeliger +Date: Sun Jul 8 18:10:08 2007 -0500 + + common/* non-cmd*: Remove obsolete references to CONFIG_COMMANDS + + Signed-off-by: Jon Loeliger + +commit fd9bcaa35be64fe41a4223fdb6ecdbad52470b39 +Author: Jon Loeliger +Date: Sun Jul 8 18:05:39 2007 -0500 + + common/cmd_[p-x]*: Remove obsolete references to CONFIG_COMMANDS. + + Signed-off-by: Jon Loeliger + +commit c76fe47425afc7d5d670ff0539823c85d65d9c42 +Author: Jon Loeliger +Date: Sun Jul 8 18:02:23 2007 -0500 + + common/cmd_[i-n]*: Remove obsolete references to CONFIG_COMMANDS. + + Signed-off-by: Jon Loeliger + +commit baa26db4113679b80970ff447d91cc10217742a6 +Author: Jon Loeliger +Date: Sun Jul 8 17:51:39 2007 -0500 + + common/cmd_[af]*: Remove obsolete references to CONFIG_COMMANDS. + + Signed-off-by: Jon Loeliger + +commit af075ee96e52dda7b6bca6c937588aeaaec5f2cd +Author: Jon Loeliger +Date: Sun Jul 8 17:02:01 2007 -0500 + + Clear up confusion over the CMD_POST and POST_DIAG mess. + + For some reason, CONFIG_POST permeated as CONFIG_CMD_POST_DIAG + when it really means just CONFIG_CMD_DIAG. There is no CMD_POST. + Clear this mess up some. + + Signed-off-by: Jon Loeliger + +commit b3631487105a57ab7cbadfc26efbaf9676275018 +Author: Jon Loeliger +Date: Sun Jul 8 15:45:08 2007 -0500 + + Remove references to the old cmd_confdefs.h include file. + + Signed-off-by: Jon Loeliger + +commit a22d4da95e20049b4daa1c2a022f61e8a72f2fb6 +Author: Jon Loeliger +Date: Sun Jul 8 15:42:59 2007 -0500 + + include/configs: Catch some CONFIG_CMD_* conversion stragglers. + + Use new CONFIG_CMD_* in lwmon5.h board config file. + Fix CONFIG_CMD_* typo braindamage in omap1510inn.h + + Signed-off-by: Jon Loeliger + +commit a5562901661bd428f7e5feb333f796372cb81019 +Author: Jon Loeliger +Date: Sun Jul 8 15:31:57 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various [TUVWZYZ]* named board config files. + + Signed-off-by: Jon Loeliger + +commit fe7f782d5b8c64a0195c68c31a0a11d4f641355e +Author: Jon Loeliger +Date: Sun Jul 8 15:02:44 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various S* named board config files. + + Signed-off-by: Jon Loeliger + +commit e9a0f8f15c11f337967aa0600ad6e8af33037f50 +Author: Jon Loeliger +Date: Sun Jul 8 15:12:40 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various R* named board config files. + + Signed-off-by: Jon Loeliger + +commit 12aa9fd23d724bd6ab88e1baa0db35133a27303f +Author: Jon Loeliger +Date: Sun Jul 8 14:55:07 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various Q* named board config files. + + Signed-off-by: Jon Loeliger + +commit acf0269779422f3e147d2ddfb499c9f6ff10ad5e +Author: Jon Loeliger +Date: Sun Jul 8 14:49:44 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various P* named board config files. + + Signed-off-by: Jon Loeliger + +commit e18a1061a8630cb67995fdf99afd3fb50d1b187d +Author: Jon Loeliger +Date: Sun Jul 8 14:21:43 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various [NO]* named board config files. + + Signed-off-by: Jon Loeliger + +commit 8353e139bfad9059c54f5b2421f1a3090e15a2e2 +Author: Jon Loeliger +Date: Sun Jul 8 14:14:17 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various M* named board config files. + + Signed-off-by: Jon Loeliger + +commit 348f258f24253433e4a2302a0bbceb6740a67246 +Author: Jon Loeliger +Date: Sun Jul 8 13:46:18 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various [IJKL]* named board config files. + + Signed-off-by: Jon Loeliger + +commit 6c4f4da9bfc9f9403f54fce678ed0364b7c86a6a +Author: Jon Loeliger +Date: Sun Jul 8 10:09:35 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various H* named board config files. + + Signed-off-by: Jon Loeliger + +commit 60a0876b5106b34220e459c208bbf648073306c0 +Author: Jon Loeliger +Date: Sat Jul 7 21:04:26 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various F* and G* named board config files. + + Signed-off-by: Jon Loeliger + +commit dcaa71562826a2466e894c868d132509dcda8444 +Author: Jon Loeliger +Date: Sat Jul 7 20:56:05 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various E* named board config files. + + Signed-off-by: Jon Loeliger + +commit 3c3227f3c737502311b25b72084573901cbbf17d +Author: Jon Loeliger +Date: Sat Jul 7 20:40:43 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various D* named board config files. + + Signed-off-by: Jon Loeliger + +commit 49cf7e8ee7ef943fdfe866ce28410b0bfbf6a26c +Author: Jon Loeliger +Date: Thu Jul 5 19:52:35 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various C* named board config files. + + Signed-off-by: Jon Loeliger + +commit de8b2a6e33298dcdb10bdda48db25e53c3089eba +Author: Jon Loeliger +Date: Thu Jul 5 19:32:07 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various B* named board config files. + + Signed-off-by: Jon Loeliger + +commit 498ff9a228485bd4b9f23d066bada268f9add1dd +Author: Jon Loeliger +Date: Thu Jul 5 19:13:52 2007 -0500 + + include/configs: Use new CONFIG_CMD_* in various A* named board config files. + + Since ADS860.h includes "board/fads/fads.h" with ramifications + on the CONFIG_COMMAND treatment, it too has to be adjusted to + exclude already configured commands in this same commit. + + Signed-off-by: Jon Loeliger + +commit 6b0a174a1e6f55e1f5a1fbb223cdad7645a4646e +Author: Stefan Roese +Date: Fri Jul 6 09:45:47 2007 +0200 + + Fix problem with get/setdcr commands introduced by cfg patches + + Signed-off-by: Stefan Roese + +commit f1152f8c28db4a22087c21c618a3f7baa48e9a4f +Author: Wolfgang Denk +Date: Fri Jul 6 02:50:19 2007 +0200 + + Code cleanup and default config update for STC GP3 SSA board. + + Signed-off-by: Wolfgang Denk + +commit e4dbe1b215f5c6c462e76909d240bd96472b84de +Author: Wolfgang Denk +Date: Thu Jul 5 17:56:27 2007 +0200 + + Fixing some typos etc. introduced mainly by cfg patches. + + Signed-off-by: Wolfgang Denk + +commit b6b4684546809f89c8bac72863ca49b5fd8ac0cd +Author: Wolfgang Denk +Date: Thu Jul 5 11:12:16 2007 +0200 + + Minor coding style cleanup. Update CHANGELOG. + commit dca3b3d6d6396b67e5e84af53452164923c73443 Author: Jon Loeliger Date: Wed Jul 4 22:33:46 2007 -0500 @@ -198,6 +1025,14 @@ Date: Wed Jul 4 22:30:06 2007 -0500 Signed-off-by: Jon Loeliger +commit b44896215a09c60fa40cae906f7ed207bbc2c492 +Author: Sergei Poselenov +Date: Thu Jul 5 08:17:37 2007 +0200 + + Merged POST framework with the current TOT. + + Signed-off-by: Sergei Poselenov + commit b24629fa377214d63bb40d1360e354b6d3e4af56 Author: Jon Loeliger Date: Wed Jun 13 13:23:15 2007 -0500 @@ -232,6 +1067,28 @@ Date: Wed Jun 13 13:21:37 2007 -0500 Signed-off-by: Jon Loeliger +commit f780b83316d9af1f61d71cc88b1917b387b9b995 +Author: Niklaus Giger +Date: Wed Jun 27 18:11:38 2007 +0200 + + resubmit: ppc4xx: Remove sequoia/sequioa.h. Cleanup ppc440.h for PPC440EPX + + Signed-off-by: Niklaus Giger + +commit 04e6c38b766eaa2f3287561563c9e215e0c3a0d4 +Author: Stefan Roese +Date: Wed Jul 4 10:06:30 2007 +0200 + + ppc4xx: Update lwmon5 board + + - Add optional ECC generation routine to preserve existing + RAM values. This is needed for the Linux log-buffer support + - Add optional DDR2 setup with CL=4 + - GPIO50 not used anymore + - Lime register setup added + + Signed-off-by: Stefan Roese + commit 6810a34677dbc446334f5e451f1682426dd33b49 Author: Grant Likely Date: Tue Jul 3 00:17:28 2007 -0600 @@ -440,14 +1297,6 @@ Date: Tue Jul 3 00:32:53 2007 -0600 Signed-off-by: Grant Likely -commit f1152f8c28db4a22087c21c618a3f7baa48e9a4f -Author: Wolfgang Denk -Date: Fri Jul 6 02:50:19 2007 +0200 - - Code cleanup and default config update for STC GP3 SSA board. - - Signed-off-by: Wolfgang Denk - commit 52b8704d0245e589f86d462e9ec25aeb7ecbbbdd Author: Wolfgang Denk Date: Wed Jul 4 00:43:53 2007 +0200 @@ -456,14 +1305,6 @@ Date: Wed Jul 4 00:43:53 2007 +0200 Signed-off-by: Wolfgang Denk -commit b44896215a09c60fa40cae906f7ed207bbc2c492 -Author: Sergei Poselenov -Date: Thu Jul 5 08:17:37 2007 +0200 - - Merged POST framework with the current TOT. - - Signed-off-by: Sergei Poselenov - commit 78e0cf2de7be7f1eaeeb622eb61fd50e4d5e205c Author: Wolfgang Denk Date: Wed Jul 4 00:38:38 2007 +0200 @@ -478,14 +1319,6 @@ Date: Mon Jun 11 19:03:44 2007 -0500 Signed-off-by: Jon Loeliger -commit f780b83316d9af1f61d71cc88b1917b387b9b995 -Author: Niklaus Giger -Date: Wed Jun 27 18:11:38 2007 +0200 - - resubmit: ppc4xx: Remove sequoia/sequioa.h. Cleanup ppc440.h for PPC440EPX - - Signed-off-by: Niklaus Giger - commit 602ad3b33d9ceef83dbab46be68646d645d637ee Author: Jon Loeliger Date: Mon Jun 11 19:03:39 2007 -0500 @@ -494,20 +1327,6 @@ Date: Mon Jun 11 19:03:39 2007 -0500 Signed-off-by: Jon Loeliger -commit 04e6c38b766eaa2f3287561563c9e215e0c3a0d4 -Author: Stefan Roese -Date: Wed Jul 4 10:06:30 2007 +0200 - - ppc4xx: Update lwmon5 board - - - Add optional ECC generation routine to preserve existing - RAM values. This is needed for the Linux log-buffer support - - Add optional DDR2 setup with CL=4 - - GPIO50 not used anymore - - Lime register setup added - - Signed-off-by: Stefan Roese - commit 72a074cec68e5bad60d63206c050974e08afd804 Author: Jon Loeliger Date: Mon Jun 11 19:03:34 2007 -0500 @@ -1875,7 +2694,7 @@ Date: Sat May 5 08:12:30 2007 +0200 5xxx: write MAC address to mac-address and local-mac-address Some device trees have a mac-address property, some have local-mac-address, - and some have both. To support all of these device trees, ftp_cpu_setup() + and some have both. To support all of these device trees, ftp_cpu_setup() should write the MAC address to mac-address and local-mac-address, if they exist. @@ -2017,7 +2836,7 @@ Date: Sat May 5 08:12:30 2007 +0200 5xxx: write MAC address to mac-address and local-mac-address Some device trees have a mac-address property, some have local-mac-address, - and some have both. To support all of these device trees, ftp_cpu_setup() + and some have both. To support all of these device trees, ftp_cpu_setup() should write the MAC address to mac-address and local-mac-address, if they exist. @@ -2148,7 +2967,7 @@ Date: Mon Apr 30 13:59:50 2007 -0500 Fix memory initialization on MPC8349E-mITX Define CFG_DDR_SDRAM_CLK_CNTL for the MPC8349E-mITX and MPC8349E-mITX-GP. - This allows ddr->sdram_clk_cntl to be properly initialized. This is necessary + This allows ddr->sdram_clk_cntl to be properly initialized. This is necessary on some ITX boards, notably those with a revision 3.1 CPU. Also change spd_sdram() in cpu/mpc83xx/spd_sdram.c to not write anything into @@ -2305,7 +3124,7 @@ Date: Mon Feb 12 13:34:55 2007 -0600 85xx: write MAC address to mac-address and local-mac-address Some device trees have a mac-address property, some have local-mac-address, - and some have both. To support all of these device trees, ftp_cpu_setup() + and some have both. To support all of these device trees, ftp_cpu_setup() should write the MAC address to mac-address and local-mac-address, if they exist. @@ -2614,7 +3433,7 @@ Date: Fri Apr 20 14:12:26 2007 -0500 mpc86xx; Write MAC address to mac-address and local-mac-address Some device trees have a mac-address property, some have local-mac-address, - and some have both. To support all of these device trees, ftp_cpu_setup() + and some have both. To support all of these device trees, ftp_cpu_setup() should write the MAC address to mac-address and local-mac-address, if they exist. @@ -2667,7 +3486,7 @@ Date: Thu Apr 19 23:14:39 2007 -0400 What was suppose to be a stack variable was declared as a pointer, overwriting random memory. - Also moved the libfdt.a requirement into the main Makefile. That is + Also moved the libfdt.a requirement into the main Makefile. That is The U-Boot Way. commit d21686263574e95cb3e9e9b0496f968b1b897fdb @@ -3262,7 +4081,7 @@ Date: Sat Mar 31 12:22:10 2007 -0400 Add a flattened device tree (fdt) command (1 of 2) The fdt command uses David Gibson's libfdt library to manipulate as well - as print the flattened device tree. This patch is the new command, + as print the flattened device tree. This patch is the new command, the second part is the modifications to the existing code. commit 3af0d587d93e0be5f96e1b30fa41e662f8b0803e @@ -3963,7 +4782,7 @@ Date: Tue Feb 13 10:41:42 2007 -0600 mpc83xx: write MAC address to mac-address and local-mac-address Some device trees have a mac-address property, some have local-mac-address, - and some have both. To support all of these device trees, this patch + and some have both. To support all of these device trees, this patch updates ftp_cpu_setup() to write the MAC address to mac-address if it exists. This function already updates local-mac-address. @@ -4186,7 +5005,7 @@ Date: Wed Dec 6 21:23:55 2006 -0500 mpc83xx: Put the version (and magic) after the HRCW. - Put the version (and magic) after the HRCW. This puts it in a fixed + Put the version (and magic) after the HRCW. This puts it in a fixed location in flash, not at the start of flash but as close as we can get. Signed-off-by: Jerry Van Baren @@ -4480,7 +5299,7 @@ Date: Tue Feb 20 09:05:31 2007 +0100 [PATCH 7_9] Replace ace_readw_ace_writeb functions with macros - Register read/write does not need to be wrapped in a full function. The + Register read/write does not need to be wrapped in a full function. The patch replaces them with macros. Signed-off-by: Grant Likely @@ -4783,7 +5602,7 @@ commit fdef388758506765d4d6a7155c8f1584c63ff581 Author: roy zang Date: Mon Jan 22 13:19:21 2007 +0800 - use CFG_WRITE_SWAPPED_DATA define instead of define CFG_FLASH_CFI_SWAP + use CFG_WRITE_SWAPPED_DATA define instead of define CFG_FLASH_CFI_SWAP The patch by Heiko Schocher on Jan, 19, 2007 fixes cfi_driver bug for mpc7448hpc2 board. The default cfi_driver can support mpc7448hpc2 board. @@ -5471,7 +6290,7 @@ Date: Mon Nov 27 17:04:06 2006 +0100 [PATCH] Allow CONFIG_OF_FLAT_TREE to boot a non-arch/powerpc kernel This patch allows an arch/ppc kernel to be booted by just passing 1 or 2 - arguments to bootm. It removes the getenv("disable_of") test that used + arguments to bootm. It removes the getenv("disable_of") test that used to be used for this purpose. Signed-off-by: Grant Likely @@ -6047,7 +6866,7 @@ Date: Thu Nov 2 19:08:55 2006 +0800 Gigabit Ethernet ports,E0 and E1. It uses a single Management interface to manage the two physical connection devices (PHYs). Each Ethernet port has its own statistics monitor that tracks and reports key interface - statistics. Each port supports a 256-entry hash table for address + statistics. Each port supports a 256-entry hash table for address filtering. In addition, each port is bridged to the Switch Fabric through a 2-Kbyte transmit FIFO and a 4-Kbyte Receive FIFO. @@ -6093,7 +6912,7 @@ commit 87c4db09699c6b89176b31004afcb83eb1585d47 Author: roy zang Date: Thu Nov 2 18:59:15 2006 +0800 - Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. + Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. mpc7448hpc2 board support high level code:tsi108 init + mpc7448hpc2. Signed-off-by: Alexandre Bounine @@ -6103,7 +6922,7 @@ commit 27801b8ab11c61b577e45742a515bb3b23b80241 Author: roy zang Date: Thu Nov 2 18:57:21 2006 +0800 - Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. + Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. Make ,config.mk and link file for the mpc7448hpc2 board. Signed-off-by: Alexandre Bounine @@ -6113,7 +6932,7 @@ commit c6411c0c3bbc79f9ba8aef58296a42d8f9d8a0a6 Author: roy zang Date: Thu Nov 2 18:55:04 2006 +0800 - Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. + Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. The mpc7448hpc2 board support header file. Signed-off-by: Alexandre Bounine @@ -6123,7 +6942,7 @@ commit 625bb5ddb50b243f931262ca8c46956409471917 Author: roy zang Date: Thu Nov 2 18:52:21 2006 +0800 - Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. + Add mpc7448hpc2 (mpc7448 + tsi108) board associated code support. The mpc7448hpc2 board support low level assemble language init code. Signed-off-by: Alexandre Bounine @@ -6348,7 +7167,7 @@ Date: Tue Oct 24 23:47:37 2006 -0500 If a Multi-Image file contains a third image we try to use it as a device tree. The device tree image is assumed to be uncompressed in the - image file. We automatically allocate space for the device tree in memory + image file. We automatically allocate space for the device tree in memory and provide an 8k pad to allow more than a reasonable amount of growth. Additionally, a device tree that was contained in flash will now automatically diff --git a/cpu/ppc4xx/44x_spd_ddr.c b/cpu/ppc4xx/44x_spd_ddr.c index 8c18d0f4e..4a31d3230 100644 --- a/cpu/ppc4xx/44x_spd_ddr.c +++ b/cpu/ppc4xx/44x_spd_ddr.c @@ -1017,7 +1017,7 @@ static int short_mem_test(void) */ for (i = 0; i < NUMMEMTESTS; i++) { for (j = 0; j < NUMMEMWORDS; j++) { -//printf("bank enabled base:%x\n", &membase[j]); + /*printf("bank enabled base:%x\n", &membase[j]);*/ membase[j] = test[i][j]; ppcDcbf((unsigned long)&(membase[j])); } diff --git a/drivers/tsec.c b/drivers/tsec.c index 1399d0768..60bef9af3 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -899,36 +899,36 @@ static void tsec_halt(struct eth_device *dev) } struct phy_info phy_info_M88E1149S = { - 0x1410ca, - "Marvell 88E1149S", - 4, - (struct phy_cmd[]){ /* config */ - /* Reset and configure the PHY */ - {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, - {0x1d, 0x1f, NULL}, - {0x1e, 0x200c, NULL}, - {0x1d, 0x5, NULL}, - {0x1e, 0x0, NULL}, - {0x1e, 0x100, NULL}, - {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, - {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, - {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, - {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init}, - {miim_end,} - }, - (struct phy_cmd[]){ /* startup */ - /* Status is read once to clear old link state */ - {MIIM_STATUS, miim_read, NULL}, - /* Auto-negotiate */ - {MIIM_STATUS, miim_read, &mii_parse_sr}, - /* Read the status */ - {MIIM_88E1011_PHY_STATUS, miim_read, - &mii_parse_88E1011_psr}, - {miim_end,} - }, - (struct phy_cmd[]){ /* shutdown */ - {miim_end,} - }, + 0x1410ca, + "Marvell 88E1149S", + 4, + (struct phy_cmd[]){ /* config */ + /* Reset and configure the PHY */ + {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + {0x1d, 0x1f, NULL}, + {0x1e, 0x200c, NULL}, + {0x1d, 0x5, NULL}, + {0x1e, 0x0, NULL}, + {0x1e, 0x100, NULL}, + {MIIM_GBIT_CONTROL, MIIM_GBIT_CONTROL_INIT, NULL}, + {MIIM_ANAR, MIIM_ANAR_INIT, NULL}, + {MIIM_CONTROL, MIIM_CONTROL_RESET, NULL}, + {MIIM_CONTROL, MIIM_CONTROL_INIT, &mii_cr_init}, + {miim_end,} + }, + (struct phy_cmd[]){ /* startup */ + /* Status is read once to clear old link state */ + {MIIM_STATUS, miim_read, NULL}, + /* Auto-negotiate */ + {MIIM_STATUS, miim_read, &mii_parse_sr}, + /* Read the status */ + {MIIM_88E1011_PHY_STATUS, miim_read, + &mii_parse_88E1011_psr}, + {miim_end,} + }, + (struct phy_cmd[]){ /* shutdown */ + {miim_end,} + }, }; /* The 5411 id is 0x206070, the 5421 is 0x2060e0 */ @@ -1351,7 +1351,7 @@ struct phy_info *phy_info[] = { &phy_info_M88E1011S, &phy_info_M88E1111S, &phy_info_M88E1145, - &phy_info_M88E1149S, + &phy_info_M88E1149S, &phy_info_dm9161, &phy_info_lxt971, &phy_info_VSC8244, diff --git a/include/configs/ADNPESC1.h b/include/configs/ADNPESC1.h index d4ee14c83..77938b140 100644 --- a/include/configs/ADNPESC1.h +++ b/include/configs/ADNPESC1.h @@ -563,8 +563,6 @@ #define CONFIG_POST CFG_POST_RTC #define CFG_NIOS_POST_WORD_ADDR (CFG_MONITOR_BASE + CFG_MONITOR_LEN) - - /* * BOOTP options */ @@ -585,7 +583,7 @@ #undef CONFIG_CMD_DOC #undef CONFIG_CMD_DTT #undef CONFIG_CMD_EEPROM -#undef CONFIG_CMD_ELF +#undef CONFIG_CMD_ELF #undef CONFIG_CMD_FAT #undef CONFIG_CMD_FDC #undef CONFIG_CMD_FDOS @@ -610,7 +608,6 @@ #undef CONFIG_CMD_DATE #endif - /*------------------------------------------------------------------------ * KGDB *----------------------------------------------------------------------*/ @@ -657,7 +654,6 @@ #undef CFG_LOAD_ADDR /* force error break */ #endif - /* MEM test area */ #if (CFG_SDRAM_SIZE != 0) diff --git a/include/configs/APC405.h b/include/configs/APC405.h index 6dcfbc15d..f6495e484 100644 --- a/include/configs/APC405.h +++ b/include/configs/APC405.h @@ -92,7 +92,7 @@ #define CONFIG_CMD_I2C #define CONFIG_CMD_MII #define CONFIG_CMD_PING -#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_EEPROM #define CONFIG_MAC_PARTITION #define CONFIG_DOS_PARTITION diff --git a/include/configs/Adder.h b/include/configs/Adder.h index 5e076dcc4..4304ecca7 100644 --- a/include/configs/Adder.h +++ b/include/configs/Adder.h @@ -67,10 +67,10 @@ */ #include -#define CONFIG_CMD_DHCP -#define CONFIG_CMD_IMMAP -#define CONFIG_CMD_MII -#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_IMMAP +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING #define CONFIG_BOOTDELAY 5 /* Autoboot after 5 seconds */ diff --git a/include/configs/BAB7xx.h b/include/configs/BAB7xx.h index d8d09838e..c11e9c911 100644 --- a/include/configs/BAB7xx.h +++ b/include/configs/BAB7xx.h @@ -84,10 +84,10 @@ #define CONFIG_CMD_PCI #define CONFIG_CMD_JFFS2 -#define CONFIG_CMD_SCSI +#define CONFIG_CMD_SCSI #define CONFIG_CMD_IDE -#define CONFIG_CMD_DATE -#define CONFIG_CMD_FDC +#define CONFIG_CMD_DATE +#define CONFIG_CMD_FDC #define CONFIG_CMD_ELF diff --git a/include/configs/BC3450.h b/include/configs/BC3450.h index 844bdc5d8..5c2bfc991 100644 --- a/include/configs/BC3450.h +++ b/include/configs/BC3450.h @@ -192,7 +192,7 @@ #ifdef CONFIG_BC3450_USB #define CONFIG_CMD_USB #endif - + #ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif diff --git a/include/configs/CANBT.h b/include/configs/CANBT.h index 0e082b318..ae32f6b14 100644 --- a/include/configs/CANBT.h +++ b/include/configs/CANBT.h @@ -72,7 +72,7 @@ #include #define CONFIG_CMD_IRQ -#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_EEPROM #undef CONFIG_CMD_NET diff --git a/include/configs/CPCI750.h b/include/configs/CPCI750.h index 8d04104e5..48e29a208 100644 --- a/include/configs/CPCI750.h +++ b/include/configs/CPCI750.h @@ -148,18 +148,18 @@ */ #include -#define CONFIG_CMD_ASKENV -#define CONFIG_CMD_I2C -#define CONFIG_CMD_CACHE -#define CONFIG_CMD_EEPROM -#define CONFIG_CMD_PCI -#define CONFIG_CMD_ELF -#define CONFIG_CMD_DATE -#define CONFIG_CMD_NET -#define CONFIG_CMD_PING -#define CONFIG_CMD_IDE -#define CONFIG_CMD_FAT -#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_I2C +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_EEPROM +#define CONFIG_CMD_PCI +#define CONFIG_CMD_ELF +#define CONFIG_CMD_DATE +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING +#define CONFIG_CMD_IDE +#define CONFIG_CMD_FAT +#define CONFIG_CMD_EXT2 #define CONFIG_DOS_PARTITION diff --git a/include/configs/CU824.h b/include/configs/CU824.h index f7fdd2d6e..68e816a74 100644 --- a/include/configs/CU824.h +++ b/include/configs/CU824.h @@ -73,7 +73,7 @@ */ #include -#define CONFIG_CMD_BEDBUG +#define CONFIG_CMD_BEDBUG #define CONFIG_CMD_DHCP #define CONFIG_CMD_PCI #define CONFIG_CMD_NFS -- cgit v1.2.3-70-g09d2 From dcb84b7208ade0bbebbeb56bec9c2c64f8b2eede Mon Sep 17 00:00:00 2001 From: Joe Hamman Date: Thu, 9 Aug 2007 09:08:18 -0500 Subject: tsec: Allow Ten Bit Interface address to be configurable Allow the address of the Ten Bit Interface (TBI) to be changed in the event of a conflict with another device. Signed-off by: Joe Hamman --- drivers/tsec.c | 4 ++-- drivers/tsec.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index 60bef9af3..c9e7f97e7 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -296,9 +296,9 @@ static int init_phy(struct eth_device *dev) volatile tsec_t *regs = (volatile tsec_t *)(TSEC_BASE_ADDR); /* Assign a Physical address to the TBI */ - regs->tbipa = TBIPA_VALUE; + regs->tbipa = CFG_TBIPA_VALUE; regs = (volatile tsec_t *)(TSEC_BASE_ADDR + TSEC_SIZE); - regs->tbipa = TBIPA_VALUE; + regs->tbipa = CFG_TBIPA_VALUE; asm("sync"); /* Reset MII (due to new addresses) */ diff --git a/drivers/tsec.h b/drivers/tsec.h index 7bf3dee2b..2f0092ad5 100644 --- a/drivers/tsec.h +++ b/drivers/tsec.h @@ -70,7 +70,9 @@ #define miim_end -2 #define miim_read -1 -#define TBIPA_VALUE 0x1f +#ifndef CFG_TBIPA_VALUE + #define CFG_TBIPA_VALUE 0x1f +#endif #define MIIMCFG_INIT_VALUE 0x00000003 #define MIIMCFG_RESET 0x80000000 -- cgit v1.2.3-70-g09d2 From ed8106433522f2ea8933e9808346860d061d7731 Mon Sep 17 00:00:00 2001 From: Zach Sadecki Date: Tue, 31 Jul 2007 12:27:25 -0500 Subject: tsec: fix multiple PHY support The change entitled "Reduce CONFIG_MPC8YXX_TSECx to CONFIG_TSECx" broke multiple PHY support in tsec.c. This fixes it. Signed-off-by: Zach Sadecki Signed-off-by: Kim Phillips --- drivers/tsec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/tsec.c') diff --git a/drivers/tsec.c b/drivers/tsec.c index c9e7f97e7..c01112349 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -71,6 +71,7 @@ static struct tsec_info_struct tsec_info[] = { #else {TSEC1_PHY_ADDR, TSEC_GIGABIT, TSEC1_PHYIDX}, #endif +#else {0, 0, 0}, #endif #if defined(CONFIG_TSEC2) @@ -79,6 +80,7 @@ static struct tsec_info_struct tsec_info[] = { #else {TSEC2_PHY_ADDR, TSEC_GIGABIT, TSEC2_PHYIDX}, #endif +#else {0, 0, 0}, #endif #ifdef CONFIG_MPC85XX_FEC -- cgit v1.2.3-70-g09d2 From 53a5c424bf8655b7b4e2c305a441963259a26a81 Mon Sep 17 00:00:00 2001 From: David Updegraff Date: Mon, 11 Jun 2007 10:41:07 -0500 Subject: multicast tftp: RFC2090 Implemented IETF RFC2090, Multicast TFTP. Initial implementation on Realtek RTL8139 and Freescale TSEC. Signed-off-by: David Updegraff Signed-off-by: Ben Warren --- README | 10 +++ drivers/rtl8139.c | 7 ++ drivers/tsec.c | 48 +++++++++++ include/net.h | 11 ++- net/eth.c | 45 +++++++++++ net/net.c | 8 ++ net/tftp.c | 238 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 7 files changed, 360 insertions(+), 7 deletions(-) (limited to 'drivers/tsec.c') diff --git a/README b/README index 6af6aaa02..291b30468 100644 --- a/README +++ b/README @@ -1066,6 +1066,16 @@ The following options need to be configured: Defines a default value for theIP address of a TFTP server to contact when using the "tftboot" command. +- Multicast TFTP Mode: + CONFIG_MCAST_TFTP + + Defines whether you want to support multicast TFTP as per + rfc-2090; for example to work with atftp. Lets lots of targets + tftp down the same boot image concurrently. Note: the ethernet + driver in use must provide a function: mcast() to join/leave a + multicast group. + + CONFIG_BOOTP_RANDOM_DELAY - BOOTP Recovery Mode: CONFIG_BOOTP_RANDOM_DELAY diff --git a/drivers/rtl8139.c b/drivers/rtl8139.c index 9045523a3..3e259b6b1 100644 --- a/drivers/rtl8139.c +++ b/drivers/rtl8139.c @@ -193,6 +193,10 @@ static void rtl_reset(struct eth_device *dev); static int rtl_transmit(struct eth_device *dev, volatile void *packet, int length); static int rtl_poll(struct eth_device *dev); static void rtl_disable(struct eth_device *dev); +#ifdef CONFIG_MCAST_TFTP/* This driver already accepts all b/mcast */ +static int rtl_bcast_addr (struct eth_device *dev, u8 bcast_mac, u8 set) + { return (0); } +#endif static struct pci_device_id supported[] = { {PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139}, @@ -228,6 +232,9 @@ int rtl8139_initialize(bd_t *bis) dev->halt = rtl_disable; dev->send = rtl_transmit; dev->recv = rtl_poll; +#ifdef CONFIG_MCAST_TFTP + dev->mcast = rtl_bcast_addr; +#endif eth_register (dev); diff --git a/drivers/tsec.c b/drivers/tsec.c index c01112349..fd21ed4ed 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -129,6 +129,9 @@ static int tsec_miiphy_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value); static int tsec_miiphy_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value); +#ifdef CONFIG_MCAST_TFTP +static int tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set); +#endif /* Initialize device structure. Returns success if PHY * initialization succeeded (i.e. if it recognizes the PHY) @@ -167,6 +170,9 @@ int tsec_initialize(bd_t * bis, int index, char *devname) dev->halt = tsec_halt; dev->send = tsec_send; dev->recv = tsec_recv; +#ifdef CONFIG_MCAST_TFTP + dev->mcast = tsec_mcast_addr; +#endif /* Tell u-boot to get the addr from the env */ for (i = 0; i < 6; i++) @@ -1539,4 +1545,46 @@ static int tsec_miiphy_write(char *devname, unsigned char addr, #endif +#ifdef CONFIG_MCAST_TFTP + +/* CREDITS: linux gianfar driver, slightly adjusted... thanx. */ + +/* Set the appropriate hash bit for the given addr */ + +/* The algorithm works like so: + * 1) Take the Destination Address (ie the multicast address), and + * do a CRC on it (little endian), and reverse the bits of the + * result. + * 2) Use the 8 most significant bits as a hash into a 256-entry + * table. The table is controlled through 8 32-bit registers: + * gaddr0-7. gaddr0's MSB is entry 0, and gaddr7's LSB is + * gaddr7. This means that the 3 most significant bits in the + * hash index which gaddr register to use, and the 5 other bits + * indicate which bit (assuming an IBM numbering scheme, which + * for PowerPC (tm) is usually the case) in the tregister holds + * the entry. */ +static int +tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set) +{ + struct tsec_private *priv = privlist[1]; + volatile tsec_t *regs = priv->regs; + volatile u32 *reg_array, value; + u8 result, whichbit, whichreg; + + result = (u8)((ether_crc(MAC_ADDR_LEN,mcast_mac) >> 24) & 0xff); + whichbit = result & 0x1f; /* the 5 LSB = which bit to set */ + whichreg = result >> 5; /* the 3 MSB = which reg to set it in */ + value = (1 << (31-whichbit)); + + reg_array = &(regs->hash.gaddr0); + + if (set) { + reg_array[whichreg] |= value; + } else { + reg_array[whichreg] &= ~value; + } + return 0; +} +#endif /* Multicast TFTP ? */ + #endif /* CONFIG_TSEC_ENET */ diff --git a/include/net.h b/include/net.h index aa58e333a..603452ab3 100644 --- a/include/net.h +++ b/include/net.h @@ -99,10 +99,12 @@ struct eth_device { int state; int (*init) (struct eth_device*, bd_t*); - int (*send) (struct eth_device*, volatile void* pachet, int length); + int (*send) (struct eth_device*, volatile void* packet, int length); int (*recv) (struct eth_device*); void (*halt) (struct eth_device*); - +#ifdef CONFIG_MCAST_TFTP + int (*mcast) (struct eth_device*, u32 ip, u8 set); +#endif struct eth_device *next; void *priv; }; @@ -124,6 +126,11 @@ extern int eth_rx(void); /* Check for received packets */ extern void eth_halt(void); /* stop SCC */ extern char *eth_get_name(void); /* get name of current device */ +#ifdef CONFIG_MCAST_TFTP +int eth_mcast_join( IPaddr_t mcast_addr, u8 join); +u32 ether_crc (size_t len, unsigned char const *p); +#endif + /**********************************************************************/ /* diff --git a/net/eth.c b/net/eth.c index c8f92a526..9ccbccac0 100644 --- a/net/eth.c +++ b/net/eth.c @@ -353,6 +353,51 @@ void eth_set_enetaddr(int num, char *addr) { memcpy(dev->enetaddr, enetaddr, 6); } +#ifdef CONFIG_MCAST_TFTP +/* Multicast. + * mcast_addr: multicast ipaddr from which multicast Mac is made + * join: 1=join, 0=leave. + */ +int eth_mcast_join( IPaddr_t mcast_ip, u8 join) +{ + u8 mcast_mac[6]; + if (!eth_current || !eth_current->mcast) + return -1; + mcast_mac[5] = htonl(mcast_ip) & 0xff; + mcast_mac[4] = (htonl(mcast_ip)>>8) & 0xff; + mcast_mac[3] = (htonl(mcast_ip)>>16) & 0x7f; + mcast_mac[2] = 0x5e; + mcast_mac[1] = 0x0; + mcast_mac[0] = 0x1; + return eth_current->mcast(eth_current, mcast_mac, join); +} + +/* the 'way' for ethernet-CRC-32. Spliced in from Linux lib/crc32.c + * and this is the ethernet-crc method needed for TSEC -- and perhaps + * some other adapter -- hash tables + */ +#define CRCPOLY_LE 0xedb88320 +u32 ether_crc (size_t len, unsigned char const *p) +{ + int i; + u32 crc; + crc = ~0; + while (len--) { + crc ^= *p++; + for (i = 0; i < 8; i++) + crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); + } + /* an reverse the bits, cuz of way they arrive -- last-first */ + crc = (crc >> 16) | (crc << 16); + crc = (crc >> 8 & 0x00ff00ff) | (crc << 8 & 0xff00ff00); + crc = (crc >> 4 & 0x0f0f0f0f) | (crc << 4 & 0xf0f0f0f0); + crc = (crc >> 2 & 0x33333333) | (crc << 2 & 0xcccccccc); + crc = (crc >> 1 & 0x55555555) | (crc << 1 & 0xaaaaaaaa); + return crc; +} + +#endif + int eth_init(bd_t *bis) { diff --git a/net/net.c b/net/net.c index e9d775764..2b11a1365 100644 --- a/net/net.c +++ b/net/net.c @@ -118,6 +118,10 @@ char NetOurHostName[32]={0,}; /* Our hostname */ char NetOurRootPath[64]={0,}; /* Our bootpath */ ushort NetBootFileSize=0; /* Our bootfile size in blocks */ +#ifdef CONFIG_MCAST_TFTP /* Multicast TFTP */ +IPaddr_t Mcast_addr; +#endif + /** END OF BOOTP EXTENTIONS **/ ulong NetBootFileXferSize; /* The actual transferred size of the bootfile (in bytes) */ @@ -1386,6 +1390,9 @@ NetReceive(volatile uchar * inpkt, int len) } tmp = NetReadIP(&ip->ip_dst); if (NetOurIP && tmp != NetOurIP && tmp != 0xFFFFFFFF) { +#ifdef CONFIG_MCAST_TFTP + if (Mcast_addr != tmp) +#endif return; } /* @@ -1492,6 +1499,7 @@ NetReceive(volatile uchar * inpkt, int len) } #endif + #ifdef CONFIG_NETCONSOLE nc_input_packet((uchar *)ip +IP_HDR_SIZE, ntohs(ip->udp_dst), diff --git a/net/tftp.c b/net/tftp.c index d56e30b5b..95fee775e 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -61,10 +61,43 @@ static char *tftp_filename; extern flash_info_t flash_info[]; #endif +/* 512 is poor choice for ethernet, MTU is typically 1500. + * Minus eth.hdrs thats 1468. Can get 2x better throughput with + * almost-MTU block sizes. At least try... fall back to 512 if need be. + */ +#define TFTP_MTU_BLOCKSIZE 1468 +static unsigned short TftpBlkSize=TFTP_BLOCK_SIZE; +static unsigned short TftpBlkSizeOption=TFTP_MTU_BLOCKSIZE; + +#ifdef CONFIG_MCAST_TFTP +#include +#define MTFTP_BITMAPSIZE 0x1000 +static unsigned *Bitmap; +static int PrevBitmapHole,Mapsize=MTFTP_BITMAPSIZE; +static uchar ProhibitMcast=0, MasterClient=0; +static uchar Multicast=0; +extern IPaddr_t Mcast_addr; +static int Mcast_port; +static ulong TftpEndingBlock; /* can get 'last' block before done..*/ + +static void parse_multicast_oack(char *pkt,int len); + +static void +mcast_cleanup(void) +{ + if (Mcast_addr) eth_mcast_join(Mcast_addr, 0); + if (Bitmap) free(Bitmap); + Bitmap=NULL; + Mcast_addr = Multicast = Mcast_port = 0; + TftpEndingBlock = -1; +} + +#endif /* CONFIG_MCAST_TFTP */ + static __inline__ void store_block (unsigned block, uchar * src, unsigned len) { - ulong offset = block * TFTP_BLOCK_SIZE + TftpBlockWrapOffset; + ulong offset = block * TftpBlkSize + TftpBlockWrapOffset; ulong newsize = offset + len; #ifdef CFG_DIRECT_FLASH_TFTP int i, rc = 0; @@ -90,6 +123,10 @@ store_block (unsigned block, uchar * src, unsigned len) { (void)memcpy((void *)(load_addr + offset), src, len); } +#ifdef CONFIG_MCAST_TFTP + if (Multicast) + ext2_set_bit(block, Bitmap); +#endif if (NetBootFileXferSize < newsize) NetBootFileXferSize = newsize; @@ -108,6 +145,13 @@ TftpSend (void) int len = 0; volatile ushort *s; +#ifdef CONFIG_MCAST_TFTP + /* Multicast TFTP.. non-MasterClients do not ACK data. */ + if (Multicast + && (TftpState == STATE_DATA) + && (MasterClient == 0)) + return; +#endif /* * We will always be sending some sort of packet, so * cobble together the packet headers now. @@ -132,11 +176,30 @@ TftpSend (void) printf("send option \"timeout %s\"\n", (char *)pkt); #endif pkt += strlen((char *)pkt) + 1; + /* try for more effic. blk size */ + pkt += sprintf((char *)pkt,"blksize%c%d%c", + 0,htons(TftpBlkSizeOption),0); +#ifdef CONFIG_MCAST_TFTP + /* Check all preconditions before even trying the option */ + if (!ProhibitMcast + && (Bitmap=malloc(Mapsize)) + && eth_get_dev()->mcast) { + free(Bitmap); + Bitmap=NULL; + pkt += sprintf((char *)pkt,"multicast%c%c",0,0); + } +#endif /* CONFIG_MCAST_TFTP */ len = pkt - xp; break; - case STATE_DATA: case STATE_OACK: +#ifdef CONFIG_MCAST_TFTP + /* My turn! Start at where I need blocks I missed.*/ + if (Multicast) + TftpBlock=ext2_find_next_zero_bit(Bitmap,(Mapsize*8),0); + /*..falling..*/ +#endif + case STATE_DATA: xp = pkt; s = (ushort *)pkt; *s++ = htons(TFTP_ACK); @@ -177,8 +240,13 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) { ushort proto; ushort *s; + int i; if (dest != TftpOurPort) { +#ifdef CONFIG_MCAST_TFTP + if (Multicast + && (!Mcast_port || (dest != Mcast_port))) +#endif return; } if (TftpState != STATE_RRQ && src != TftpServerPort) { @@ -208,6 +276,24 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) #endif TftpState = STATE_OACK; TftpServerPort = src; + /* Check for 'blksize' option */ + for (i=0;i>20); } else { if (((TftpBlock - 1) % 10) == 0) { @@ -248,6 +334,11 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) TftpBlockWrap = 0; TftpBlockWrapOffset = 0; +#ifdef CONFIG_MCAST_TFTP + if (Multicast) { /* start!=1 common if mcast */ + TftpLastBlock = TftpBlock - 1; + } else +#endif if (TftpBlock != 1) { /* Assertion */ printf ("\nTFTP error: " "First block is not block 1 (%ld)\n" @@ -274,9 +365,44 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) * Acknoledge the block just received, which will prompt * the server for the next one. */ +#ifdef CONFIG_MCAST_TFTP + /* if I am the MasterClient, actively calculate what my next + * needed block is; else I'm passive; not ACKING + */ + if (Multicast) { + if (len < TftpBlkSize) { + TftpEndingBlock = TftpBlock; + } else if (MasterClient) { + TftpBlock = PrevBitmapHole = + ext2_find_next_zero_bit( + Bitmap, + (Mapsize*8), + PrevBitmapHole); + if (TftpBlock > ((Mapsize*8) - 1)) { + printf ("tftpfile too big\n"); + /* try to double it and retry */ + Mapsize<<=1; + mcast_cleanup(); + NetStartAgain (); + return; + } + TftpLastBlock = TftpBlock; + } + } +#endif TftpSend (); - if (len < TFTP_BLOCK_SIZE) { +#ifdef CONFIG_MCAST_TFTP + if (Multicast) { + if (MasterClient && (TftpBlock >= TftpEndingBlock)) { + puts ("\nMulticast tftp done\n"); + mcast_cleanup(); + NetState = NETLOOP_SUCCESS; + } + } + else +#endif + if (len < TftpBlkSize) { /* * We received the whole thing. Try to * run it. @@ -290,6 +416,9 @@ TftpHandler (uchar * pkt, unsigned dest, unsigned src, unsigned len) printf ("\nTFTP error: '%s' (%d)\n", pkt + 2, ntohs(*(ushort *)pkt)); puts ("Starting again\n\n"); +#ifdef CONFIG_MCAST_TFTP + mcast_cleanup(); +#endif NetStartAgain (); break; } @@ -301,6 +430,9 @@ TftpTimeout (void) { if (++TftpTimeoutCount > TIMEOUT_COUNT) { puts ("\nRetry count exceeded; starting again\n"); +#ifdef CONFIG_MCAST_TFTP + mcast_cleanup(); +#endif NetStartAgain (); } else { puts ("T "); @@ -370,6 +502,7 @@ TftpStart (void) TftpState = STATE_RRQ; /* Use a pseudo-random port unless a specific port is set */ TftpOurPort = 1024 + (get_timer(0) % 3072); + #ifdef CONFIG_TFTP_PORT if ((ep = getenv("tftpdstp")) != NULL) { TftpServerPort = simple_strtol(ep, NULL, 10); @@ -382,8 +515,103 @@ TftpStart (void) /* zero out server ether in case the server ip has changed */ memset(NetServerEther, 0, 6); + /* Revert TftpBlkSize to dflt */ + TftpBlkSize = TFTP_BLOCK_SIZE; +#ifdef CONFIG_MCAST_TFTP + mcast_cleanup(); +#endif TftpSend (); } -#endif +#ifdef CONFIG_MCAST_TFTP +/* Credits: atftp project. + */ + +/* pick up BcastAddr, Port, and whether I am [now] the master-client. * + * Frame: + * +-------+-----------+---+-------~~-------+---+ + * | opc | multicast | 0 | addr, port, mc | 0 | + * +-------+-----------+---+-------~~-------+---+ + * The multicast addr/port becomes what I listen to, and if 'mc' is '1' then + * I am the new master-client so must send ACKs to DataBlocks. If I am not + * master-client, I'm a passive client, gathering what DataBlocks I may and + * making note of which ones I got in my bitmask. + * In theory, I never go from master->passive.. + * .. this comes in with pkt already pointing just past opc + */ +static void parse_multicast_oack(char *pkt, int len) +{ + int i; + IPaddr_t addr; + char *mc_adr, *port, *mc; + + mc_adr=port=mc=NULL; + /* march along looking for 'multicast\0', which has to start at least + * 14 bytes back from the end. + */ + for (i=0;i= (len-14)) /* non-Multicast OACK, ign. */ + return; + + i+=10; /* strlen multicast */ + mc_adr = pkt+i; + for (;i