From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/6] arm: mvf600: Add FEC support for Vybrid MVF600
Date: Wed, 15 May 2013 16:19:30 +0200 (CEST) [thread overview]
Message-ID: <1550567114.841785.1368627570474.JavaMail.root@advansee.com> (raw)
In-Reply-To: <51934427.6030500@denx.de>
Hi Stefano, Alison,
On Wednesday, May 15, 2013 10:15:35 AM, Stefano Babic wrote:
> On 14/05/2013 11:51, Alison Wang wrote:
> > This patch adds FEC support for Vybrid MVF600 platform.
> > Add code to use RMII for MVF600.
> >
> > Signed-off-by: Alison Wang <b18965@freescale.com>
> > ---
> > Changes in v2:
> > - Use common FEC driver fec_mxc.c
> >
> > drivers/net/fec_mxc.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> > index 4dbcdca..21e58f4 100644
> > --- a/drivers/net/fec_mxc.c
> > +++ b/drivers/net/fec_mxc.c
> > @@ -518,7 +518,11 @@ static int fec_open(struct eth_device *edev)
> > u32 ecr = readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_SPEED;
> > u32 rcr = (readl(&fec->eth->r_cntrl) &
> > ~(FEC_RCNTRL_RMII | FEC_RCNTRL_RMII_10T)) |
> > - FEC_RCNTRL_RGMII | FEC_RCNTRL_MII_MODE;
> > + FEC_RCNTRL_MII_MODE;
> > + if (fec->xcv_type == RGMII)
> > + rcr |= FEC_RCNTRL_RGMII;
> > + else if (fec->xcv_type == RMII)
> > + rcr |= FEC_RCNTRL_RMII;
> > if (speed == _1000BASET)
> > ecr |= FEC_ECNTRL_SPEED;
> > else if (speed != _100BASET)
> >
>
> This can generally be applied, it is not only related to the new SOC.
>
> Acked-by: Stefano Babic <sbabic@denx.de>
This is already done in fec_reg_setup(), so the piece of code above could
perhaps just leave untouched the FEC_RCNTRL_RGMII / FEC_RCNTRL_RMII /
FEC_RCNTRL_MII_MODE bits, i.e.:
---
#ifdef FEC_QUIRK_ENET_MAC
{
u32 ecr = readl(&fec->eth->ecntrl) & ~FEC_ECNTRL_SPEED;
- u32 rcr = (readl(&fec->eth->r_cntrl) &
- ~(FEC_RCNTRL_RMII | FEC_RCNTRL_RMII_10T)) |
- FEC_RCNTRL_RGMII | FEC_RCNTRL_MII_MODE;
+ u32 rcr = readl(&fec->eth->r_cntrl) & ~FEC_RCNTRL_RMII_10T;
if (speed == _1000BASET)
ecr |= FEC_ECNTRL_SPEED;
else if (speed != _100BASET)
---
Best regards,
Beno?t
next prev parent reply other threads:[~2013-05-15 14:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 9:51 [U-Boot] [PATCH v2 0/6] arm: mvf600: Add Freescale Vybrid MVF600 CPU and MVF600TWR board support Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 1/6] arm: mvf600: Add Vybrid MVF600 CPU support Alison Wang
2013-05-15 8:13 ` Stefano Babic
2013-05-15 12:09 ` Albert ARIBAUD
2013-05-15 12:24 ` Stefano Babic
2013-05-15 12:39 ` Albert ARIBAUD
2013-05-15 13:20 ` Stefano Babic
[not found] ` <81BA6E5E0BC2344391CABCEE22D1B6D8322144@039-SN1MPN1-002.039d.mgd.msft.net>
2013-05-15 14:23 ` [U-Boot] 答复: " Stefano Babic
2013-05-16 4:00 ` [U-Boot] " Wang Huan-B18965
2013-05-14 9:51 ` [U-Boot] [PATCH v2 2/6] arm: mvf600: Add IOMUX support for Vybrid MVF600 Alison Wang
2013-05-15 8:16 ` Stefano Babic
2013-05-15 13:53 ` Benoît Thébaudeau
2013-05-14 9:51 ` [U-Boot] [PATCH v2 3/6] arm: mvf600: Add FEC " Alison Wang
2013-05-15 8:15 ` Stefano Babic
2013-05-15 14:19 ` Benoît Thébaudeau [this message]
2013-05-14 9:51 ` [U-Boot] [PATCH v2 4/6] arm: mvf600: Add watchdog " Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 5/6] arm: mvf600: Add uart " Alison Wang
2013-05-14 9:51 ` [U-Boot] [PATCH v2 6/6] arm: mvf600: Add basic support for Vybrid MVF600TWR board Alison Wang
2013-05-15 4:14 ` Shawn Guo
2013-05-15 8:11 ` Wang Huan-B18965
2013-05-15 9:01 ` Stefano Babic
2013-05-17 15:20 ` Wang Huan-B18965
2013-05-17 16:07 ` Stefano Babic
2013-05-17 16:06 ` Benoît Thébaudeau
2013-05-17 16:57 ` Stefano Babic
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=1550567114.841785.1368627570474.JavaMail.root@advansee.com \
--to=benoit.thebaudeau@advansee.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox