From: Hector Palacios <hector.palacios@digi.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: mxs: Do not reconfigure FEC clock in FEC init
Date: Mon, 14 Oct 2013 09:46:41 +0200 [thread overview]
Message-ID: <525BA161.2090300@digi.com> (raw)
In-Reply-To: <1381677634-6589-1-git-send-email-marex@denx.de>
Dear Marek,
On 10/13/2013 05:20 PM, Marek Vasut wrote:
> Do not reconfigure the FEC clock during board_eth_init(), otherwise
> the FEC might have stability issues, refuse to autonegotiate link
> entirely or even corrupt packets while indicating correct checksum
> on them. Instead, move the FEC clock init to board_early_init_f(),
> where all the other upstream clock are initialized and also make
> sure there is proper stabilization delay.
Do you have any means to reproduce the problem?
I have seldom seen times when the Ethernet did not work, but it was so infrequent that
it was impossible to know where it came from or how to reproduce it.
[...]
> diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
> index 33d38cf..5065ee8 100644
> --- a/board/denx/m28evk/m28evk.c
> +++ b/board/denx/m28evk/m28evk.c
> @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR;
> */
> int board_early_init_f(void)
> {
> + struct mxs_clkctrl_regs *clkctrl_regs =
> + (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
> +
You may want to wrap these within #ifdef CONFIG_CMD_NET to avoid a warning if not defined.
> diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c
> index 7f0b591..9d3c970 100644
> --- a/board/schulercontrol/sc_sps_1/sc_sps_1.c
> +++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
> @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR;
> */
> int board_early_init_f(void)
> {
> + struct mxs_clkctrl_regs *clkctrl_regs =
> + (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
> +
And the same here.
It works ok, but I can't say if it fixes exactly those seldom initialization problems
because I don't have a reliable way to reproduce them.
Tested-by: Hector Palacios <hector.palacios@digi.com>
Best regards,
--
Hector Palacios
next prev parent reply other threads:[~2013-10-14 7:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-13 15:20 [U-Boot] [PATCH] ARM: mxs: Do not reconfigure FEC clock in FEC init Marek Vasut
2013-10-13 20:20 ` Marek Vasut
2013-10-14 7:46 ` Hector Palacios [this message]
2013-10-14 8:17 ` Hector Palacios
2013-10-14 8:34 ` Stefano Babic
2013-10-15 21:19 ` Marek Vasut
2013-10-16 9:10 ` Stefano Babic
2013-10-16 14:06 ` Marek Vasut
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=525BA161.2090300@digi.com \
--to=hector.palacios@digi.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