From: Trent Piepho <tpiepho@impinj.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/12] Net: phy: ti: Fix fifo_depth register write
Date: Thu, 14 Jun 2018 17:09:35 +0000 [thread overview]
Message-ID: <1528996174.28705.196.camel@impinj.com> (raw)
In-Reply-To: <mailman.46137.1528973633.142.u-boot@lists.denx.de>
On Thu, 2018-06-14 at 10:53 +0000, u-boot-request at lists.denx.de wrote:
> Message: 52
> Date: Thu, 14 Jun 2018 11:48:48 +0200
> From: Janine Hagemann <j.hagemann@phytec.de>
> To: albert.u.boot at aribaud.net, sjg at chromium.org,
> philipp.tomsich at theobroma-systems.com, w.egorov at phytec.de,
> joe.hershberger at ni.com, u-boot at lists.denx.de
> Subject: [U-Boot] [PATCH 04/12] Net: phy: ti: Fix fifo_depth register
> write
> Message-ID: <1528969736-44037-4-git-send-email-j.hagemann@phytec.de>
>
> The register was not read before the writing, so the
> previous value was overwritten.
>
> @@ -233,9 +235,14 @@ static int dp83867_config(struct phy_device *phydev)
> val | DP83867_SW_RESTART);
>
> if (phy_interface_is_rgmii(phydev)) {
> + val = phy_read(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL);
> + if (val < 0)
> + return val;
> + val &= ~DP83867_PHYCR_FIFO_DEPTH_MASK;
> + val |= (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT);
> ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL,
> - (DP83867_MDI_CROSSOVER_AUTO << DP83867_MDI_CROSSOVER) |
> - (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT));
> + val);
> +
> if (ret)
> goto err_out;
> } else if (phy_interface_is_sgmii(phydev)) {
If any of the bits that prevent the phy from working are set, like
DEEP_POWER_DOWN_EN, POWER_SAVE_MODE, and so on, they won't be reset
anymore. I.e., put phy in power save mode, reboot, phy doesn't work
anymore. I think the code here is suppose to be configuring the phy,
rather than changing a configuration that was done elsewhere.
next parent reply other threads:[~2018-06-14 17:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.46137.1528973633.142.u-boot@lists.denx.de>
2018-06-14 17:09 ` Trent Piepho [this message]
2018-06-14 17:45 ` [U-Boot] [PATCH 04/12] Net: phy: ti: Fix fifo_depth register write Joe Hershberger
2018-06-14 9:48 [U-Boot] [PATCH 01/12] arch: arm: mach-rockchip: rk3288: Enable regulators in board_init Janine Hagemann
2018-06-14 9:48 ` [U-Boot] [PATCH 04/12] Net: phy: ti: Fix fifo_depth register write Janine Hagemann
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=1528996174.28705.196.camel@impinj.com \
--to=tpiepho@impinj.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 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.