[U-Boot] [PATCH 12/13] IXP NPE: add support for fixed-speed MII ports

Wolfgang Denk
2011-01-25T20:48:01Z

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 <michael@schwingen.org>
> ---
> 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, &reg_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_