diff options
author | Wolfgang Denk <wd@denx.de> | 2010-07-15 22:48:46 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-07-15 22:48:46 +0200 |
commit | 93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658 (patch) | |
tree | 85bf8677d8e8095ef18453199a99c5e4131d217d /drivers/net/tsec.c | |
parent | dce6538f5d21a0def8a4df5328d536abed3e136a (diff) | |
parent | d6f324d03d7829a1da1dee8b60f91b173a3976f0 (diff) | |
download | u-boot-imx-93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658.zip u-boot-imx-93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658.tar.gz u-boot-imx-93502a5e0adcfc0ce6cf8e3daa7eb9a4f4e53658.tar.bz2 |
Merge branch 'master' of ../master
Diffstat (limited to 'drivers/net/tsec.c')
-rw-r--r-- | drivers/net/tsec.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 5fa6f61..54c4a70 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -95,14 +95,23 @@ static struct tsec_info_struct tsec_info[] = { #endif }; +/* + * Initialize all the TSEC devices + * + * Returns the number of TSEC devices that were initialized + */ int tsec_eth_init(bd_t *bis, struct tsec_info_struct *tsecs, int num) { int i; + int ret, count = 0; - for (i = 0; i < num; i++) - tsec_initialize(bis, &tsecs[i]); + for (i = 0; i < num; i++) { + ret = tsec_initialize(bis, &tsecs[i]); + if (ret > 0) + count += ret; + } - return 0; + return count; } int tsec_standard_init(bd_t *bis) @@ -1631,6 +1640,27 @@ static struct phy_info phy_info_dm9161 = { }, }; +/* micrel KSZ804 */ +static struct phy_info phy_info_ksz804 = { + 0x0022151, + "Micrel KSZ804 PHY", + 4, + (struct phy_cmd[]) { /* config */ + {PHY_BMCR, PHY_BMCR_RESET, NULL}, + {PHY_BMCR, PHY_BMCR_AUTON|PHY_BMCR_RST_NEG, NULL}, + {miim_end,} + }, + (struct phy_cmd[]) { /* startup */ + {PHY_BMSR, miim_read, NULL}, + {PHY_BMSR, miim_read, &mii_parse_sr}, + {PHY_BMSR, miim_read, &mii_parse_link}, + {miim_end,} + }, + (struct phy_cmd[]) { /* shutdown */ + {miim_end,} + } +}; + /* a generic flavor. */ static struct phy_info phy_info_generic = { 0, @@ -1794,6 +1824,7 @@ static struct phy_info *phy_info[] = { &phy_info_M88E1145, &phy_info_M88E1149S, &phy_info_dm9161, + &phy_info_ksz804, &phy_info_lxt971, &phy_info_VSC8211, &phy_info_VSC8244, |