From: Dieter Kiermaier <dk-arm-linux@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] net: Kirkwood_egiga: forced interface speed config support
Date: Thu, 16 Jul 2009 16:45:09 +0200 [thread overview]
Message-ID: <200907161645.09913.dk-arm-linux@gmx.de> (raw)
In-Reply-To: <1247758084-12296-5-git-send-email-prafulla@marvell.com>
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?
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@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);
>
next prev parent reply other threads:[~2009-07-16 14:45 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 15:27 [U-Boot] [PATCH 1/6] include/config_cmd_default.h cleanup Prafulla Wadaskar
2009-07-16 15:28 ` [U-Boot] [PATCH v7 2/6] Marvell Sheevaplug Board support Prafulla Wadaskar
2009-07-16 15:28 ` [U-Boot] [PATCH v13 3/6] Marvell MV88F6281GTW_GE " Prafulla Wadaskar
2009-07-16 15:28 ` [U-Boot] [PATCH 4/6] net: phy: bugfixes: mv88E61xx multichip addressing support Prafulla Wadaskar
2009-07-16 15:28 ` [U-Boot] [PATCH 5/6] net: Kirkwood_egiga: forced interface speed config support Prafulla Wadaskar
2009-07-16 14:45 ` Dieter Kiermaier [this message]
2009-07-16 15:45 ` Prafulla Wadaskar
2009-07-16 15:28 ` [U-Boot] [PATCH 6/6] Marvell RD6281A Board support Prafulla Wadaskar
2009-07-18 18:48 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-19 4:50 ` Prafulla Wadaskar
2009-07-18 18:43 ` [U-Boot] [PATCH 5/6] net: Kirkwood_egiga: forced interface speed config support Jean-Christophe PLAGNIOL-VILLARD
2009-07-19 4:54 ` Prafulla Wadaskar
2009-07-21 6:22 ` Ben Warren
2009-07-21 7:39 ` Wolfgang Denk
2009-07-21 19:08 ` Prafulla Wadaskar
2009-07-21 6:51 ` Ben Warren
2009-07-21 7:41 ` Wolfgang Denk
2009-07-21 7:43 ` Ben Warren
2009-07-21 19:01 ` Prafulla Wadaskar
2009-07-21 19:20 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-21 19:32 ` Lennert Buytenhek
2009-07-21 6:52 ` [U-Boot] [PATCH 4/6] net: phy: bugfixes: mv88E61xx multichip addressing support Ben Warren
2009-08-10 8:09 ` Wolfgang Denk
2009-08-10 8:25 ` Wolfgang Denk
2009-08-10 8:59 ` Prafulla Wadaskar
2009-08-10 8:31 ` Prafulla Wadaskar
2009-07-18 18:40 ` [U-Boot] [PATCH v13 3/6] Marvell MV88F6281GTW_GE Board support Jean-Christophe PLAGNIOL-VILLARD
2009-07-19 4:55 ` Prafulla Wadaskar
2009-07-16 15:32 ` [U-Boot] [PATCH 6/6][repost] Marvell RD6281A " Prafulla Wadaskar
2009-07-22 22:15 ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-18 17:41 ` [U-Boot] [PATCH v7 2/6] Marvell Sheevaplug " Jean-Christophe PLAGNIOL-VILLARD
2009-07-19 4:56 ` Prafulla Wadaskar
2009-07-17 21:26 ` [U-Boot] [PATCH 1/6] include/config_cmd_default.h cleanup Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907161645.09913.dk-arm-linux@gmx.de \
--to=dk-arm-linux@gmx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.