All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: Re: tx51 ethernet regression
Date: Mon, 16 Jul 2012 13:44:06 +0200	[thread overview]
Message-ID: <20120716134406.57843f19@eb-e6520> (raw)
In-Reply-To: <5003FACD.80400@cmotion.eu>

Hi Christian,

Le Mon, 16 Jul 2012 13:28:13 +0200,
Christian Kapeller <christian.kapeller@cmotion.eu> a écrit :
> I recently came to update my barebox port based on the karo tx51 imx
> module from v2012.03.0 to v2012.07.0.
> 
> I discovered, that, when trying to use the ethernet connection, I more
> often than not get frame errors reported by the FEC.
> 
> --snip--
> barebox@Ka-Ro tx51:/ dhcp
> phy0: Link is up - 1000/Full
> error frame: 0x97b961c0 0x00000890
> error frame: 0x97b96188 0x00000882
> DHCP client bound to address 10.41.14.147
> --snap--
> 
> The errors range from 'non octet aligned frame' over 'Fifo overrun' to
> timeouts. It renders the ethernet support unusable. Small images may
> work but, require the one and other retry.
> 
> One thing that catches my eye is that the auto negotioation resulted in
> a 1000MBit link. The imx fec does only support 100MBit. I forced the
> link to be set to 10MBit by declaring xcv_type=MII10 in the
> fec_platform_data structure. Interestingly the link is now reported as
> 100MBit, and shows the same behaviour.
> 
> Another thing I checked was the changed pad definitions in commit
> 2bdc9f57a86dff41cfc1f87b644a2e53fdcce2b6. Not only the type of the pad
> data structure changed, but also some of their configuration as well.
> For example, pads that were configured with FEC_PAD_CTL, now have other
> settings enabled.
> 
> I'reverted the pad changes, but still no luck. Auto negtiation starts,
> but I don't seem to get any packets.
> 
> So my question is: What change since v2012.03.0 could cause this kind of
> behaviour?
> 
same problem here. the problem comes from :
68b32be4926d3ab5b72036c0ceecef2f82aa0625 "i.MX51: Synchronize iomux
header file from kernel"
as now most pins have NO_PAD_CTRL which means the pad doesn't get
reconfigured and thus some pads to communicate with the FEC are no more
working.

A dirty workaround to default PAD config is :
diff --git a/arch/arm/mach-imx/iomux-v3.c b/arch/arm/mach-imx/iomux-v3.c
index 680d260..c21d8a2 100644
--- a/arch/arm/mach-imx/iomux-v3.c
+++ b/arch/arm/mach-imx/iomux-v3.c
@@ -45,6 +45,8 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
 
        if (!(pad_ctrl & NO_PAD_CTRL) && pad_ctrl_ofs)
                __raw_writel(pad_ctrl, base + pad_ctrl_ofs);
+       else if ((pad_ctrl & NO_PAD_CTRL) && pad_ctrl_ofs)
+               __raw_writel(0, base + pad_ctrl_ofs);
 
        return 0;
 }


Eric


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-07-16 11:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 11:28 tx51 ethernet regression Christian Kapeller
2012-07-16 11:44 ` Eric Bénard [this message]
2012-07-16 12:52   ` Christian Kapeller
2012-07-16 14:21     ` Sascha Hauer
2012-07-17  9:49       ` [PATCH] imx51: fix pad definition used for fec communication Christian Kapeller

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=20120716134406.57843f19@eb-e6520 \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    /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.