public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] phy: ti: Init node before reading
@ 2019-03-16 11:43 Michal Simek
  2019-03-16 23:06 ` Hannes Schmelzer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michal Simek @ 2019-03-16 11:43 UTC (permalink / raw)
  To: u-boot

There is a need to fill node before clk_output_sel is setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
---

 drivers/net/phy/ti.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 6db6edd0d0c8..10989dd40309 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -216,6 +216,10 @@ static int dp83867_of_init(struct phy_device *phydev)
 
 	/* Optional configuration */
 
+	node = phy_get_ofnode(phydev);
+	if (!ofnode_valid(node))
+		return -EINVAL;
+
 	/*
 	 * Keep the default value if ti,clk-output-sel is not set
 	 * or to high
@@ -225,10 +229,6 @@ static int dp83867_of_init(struct phy_device *phydev)
 		ofnode_read_u32_default(node, "ti,clk-output-sel",
 					DP83867_CLK_O_SEL_REF_CLK);
 
-	node = phy_get_ofnode(phydev);
-	if (!ofnode_valid(node))
-		return -EINVAL;
-
 	if (ofnode_read_bool(node, "ti,max-output-impedance"))
 		dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
 	else if (ofnode_read_bool(node, "ti,min-output-impedance"))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-14 20:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-16 11:43 [U-Boot] [PATCH] phy: ti: Init node before reading Michal Simek
2019-03-16 23:06 ` Hannes Schmelzer
2019-04-09 10:51   ` Michal Simek
2019-04-09 17:14     ` Joe Hershberger
2019-03-18  8:38 ` Lukasz Majewski
2019-03-18  9:33   ` Michal Simek
2019-05-14 20:03 ` [U-Boot] " Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox