From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 25 Jan 2011 21:48:01 +0100 Subject: [U-Boot] [PATCH 12/13] IXP NPE: add support for fixed-speed MII ports In-Reply-To: <1294062338-21084-13-git-send-email-michael@schwingen.org> References: <1294062338-21084-1-git-send-email-michael@schwingen.org> <1294062338-21084-13-git-send-email-michael@schwingen.org> Message-ID: <20110125204801.C88B4B187@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Michael Schwingen, In message <1294062338-21084-13-git-send-email-michael@schwingen.org> you wrote: > add support for MII ports that lack a PHY with standard PHY registers > > Signed-off-by: Michael Schwingen > --- > arch/arm/cpu/ixp/npe/npe.c | 18 +++++++++++++++++- > include/configs/actux2.h | 5 +++++ > include/configs/actux3.h | 5 +++++ > 3 files changed, 27 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c > index 9d1090e..87f4600 100644 > --- a/arch/arm/cpu/ixp/npe/npe.c > +++ b/arch/arm/cpu/ixp/npe/npe.c > @@ -359,6 +359,21 @@ static int npe_init(struct eth_device *dev, bd_t * bis) > > debug("%s: 1\n", __FUNCTION__); > > +#ifdef CONFIG_MII_NPE0_FIXEDLINK > + if (0 == p_npe->eth_id) { > + speed = CONFIG_MII_NPE0_SPEED; > + duplex = CONFIG_MII_NPE0_FULLDUPLEX ? FULL : HALF; > + } > + else > +#endif > +#ifdef CONFIG_MII_NPE1_FIXEDLINK > + if (1 == p_npe->eth_id) { > + speed = CONFIG_MII_NPE1_SPEED; > + duplex = CONFIG_MII_NPE1_FULLDUPLEX ? FULL : HALF; > + } > + else > +#endif > + { > miiphy_read (dev->name, p_npe->phy_no, PHY_BMSR, ®_short); Incorrect indentation staring here... > /* > @@ -388,7 +403,8 @@ static int npe_init(struct eth_device *dev, bd_t * bis) > > speed = miiphy_speed (dev->name, p_npe->phy_no); > duplex = miiphy_duplex (dev->name, p_npe->phy_no); > - > + } ...and ending here. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A student of probability soon realizes that by its nature the billion-to-one chance crops up nine times out of ten, and that the greatest odds boil down to a double-sided statement: it will happen, or it will not. - Terry Pratchett, _The Dark Side of the Sun_