[U-Boot] [PATCH 5/6] net: Kirkwood_egiga: forced interface speed config support
Prafulla Wadaskar
prafulla at marvell.com
Thu Jul 16 17:45:20 CEST 2009
> -----Original Message-----
> From: Dieter Kiermaier [mailto:dk-arm-linux at gmx.de]
> Sent: Thursday, July 16, 2009 8:15 PM
> To: u-boot at lists.denx.de
> Cc: Prafulla Wadaskar; Manas Saksena; Ronen Shitrit; Nicolas
> Pitre; Ashish Karkare; Prabhanjan Sarnaik; Lennert Buijtenhek
> Subject: Re: [U-Boot] [PATCH 5/6] net: Kirkwood_egiga: forced
> interface speed config support
>
> Hi Prafulla, hi Marvell engineers,
>
>
> > By default Auto Negotiation is enabled for interface speed
> but on some
> > platforms like RD6281A it does not work.
> > If you want to forced program it to desired speed, this patch helps-
>
> do you have some information why auto negotiation doesn't
> work on RD6281A?
Hi Dieter
I do not have good answer for this with me :-(
On RD6281A I thought Auto negotiation should work, but it did not.
During my debugging, I performed several trial and error methods and forcing PHY interface speed to 1000BPs worked for me.
So I exposed this configuration through this patch.
I will certainly look for better answer for you
Regards..
Prafulla . .
> I'm working on custom hardware and don't want to do the same
> mistake :)
>
> Many thanks,
> Dieter
>
>
>
> >
> > Through this patch Auto negotiation can be disabled and desired
> > interface speed can be configured
> >
> > This patch is tested on RD6281A Kirkwood board
> >
> > Signed-off-by: Prafulla Wadaskar <prafulla at marvell.com>
> > ---
> > drivers/net/kirkwood_egiga.c | 24 ++++++++++++++++++++++++
> > 1 files changed, 24 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/kirkwood_egiga.c
> > b/drivers/net/kirkwood_egiga.c index 3c5db19..1dfd567 100644
> > --- a/drivers/net/kirkwood_egiga.c
> > +++ b/drivers/net/kirkwood_egiga.c
> > @@ -415,7 +415,31 @@ static int kwgbe_init(struct eth_device *dev)
> > /* Assign port configuration and command. */
> > KWGBEREG_WR(regs->pxc, PRT_CFG_VAL);
> > KWGBEREG_WR(regs->pxcx, PORT_CFG_EXTEND_VALUE);
> > + /*
> > + * Forced 10/100/1000BASE-T interface speed configuration
> > + * By default Auto Negotiation of interface speed is enabled
> > + * This can be forced disabled and desired speed can be
> configured
> > + */
> > +#ifdef CONFIG_DIS_AUTO_NEG_SPEED_GMII #if (!defined
> > +(CONFIG_PHY_SPEED) || (CONFIG_PHY_SPEED == _1000BASET))
> > + KWGBEREG_WR(regs->psc0, PORT_SERIAL_CONTROL_VALUE
> > + | KWGBE_DIS_AUTO_NEG_SPEED_GMII
> > + | KWGBE_SET_GMII_SPEED_TO_1000);
> > +#elif (CONFIG_PHY_SPEED == _100BASET)
> > + KWGBEREG_WR(regs->psc0, PORT_SERIAL_CONTROL_VALUE
> > + | KWGBE_DIS_AUTO_NEG_SPEED_GMII
> > + | KWGBE_SET_GMII_SPEED_TO_10_100
> > + | KWGBE_SET_MII_SPEED_TO_100);
> > +#elif (CONFIG_PHY_SPEED == _10BASET)
> > + KWGBEREG_WR(regs->psc0, PORT_SERIAL_CONTROL_VALUE
> > + | KWGBE_DIS_AUTO_NEG_SPEED_GMII
> > + | KWGBE_SET_GMII_SPEED_TO_10_100
> > + | KWGBE_SET_MII_SPEED_TO_10);
> > +#endif /* CONFIG_PHY_SPEED == _10BASET */ #else
> > KWGBEREG_WR(regs->psc0, PORT_SERIAL_CONTROL_VALUE);
> > +#endif /* CONFIG_DIS_AUTO_NEG_SPEED_GMII */
> > +
> > /* Disable port initially */
> > KWGBEREG_BITS_SET(regs->psc0, KWGBE_SERIAL_PORT_EN);
> >
>
>
>
More information about the U-Boot
mailing list