phy: ti: Init node before reading
Subsystems (2)
PATCH 1/1 phy: ti: Init node before reading
There is a need to fill node before clk_output_sel is setup.
---
drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/phy/ti.c +4 -4
@@ -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" ))
Signature · 1 line
1.9.1
PATCH 1/1 phy: ti: Init node before reading
"U-Boot" <[email protected]> schrieb am 16.03.2019 12:43:17:
Quoted 8 lines
Von: Michal Simek <[email protected]>
An: u-boot at lists.denx.de
Kopie: Janine Hagemann <[email protected]>, Joe Hershberger <[email protected]>, Hannes Schmelzer <[email protected]>
Datum: 16.03.2019 12:43
Betreff: [U-Boot] [PATCH] phy: ti: Init node before reading Gesendet von: "U-Boot" <[email protected]>
Quoted 8 lines
There is a need to fill node before
clk_output_selis setup.Signed-off-by Michal Simek <[email protected]>---
drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
PATCH 1/1 phy: ti: Init node before reading
Quoted 12 lines · Hannes Schmelzer
"U-Boot" <[email protected]> schrieb am 16.03.2019 12:43:17:
Quoted 10 lines
Von: Michal Simek <[email protected]>
An: u-boot at lists.denx.de
Kopie: Janine Hagemann <[email protected]>, Joe Hershberger <[email protected]>, Hannes Schmelzer <[email protected]>
Datum: 16.03.2019 12:43
Betreff: [U-Boot] [PATCH] phy: ti: Init node before reading Gesendet von: "U-Boot" <[email protected]>There is a need to fill node before
clk_output_selis setup.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Michal Simek <[email protected]>---
drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)Reviewed-by <[email protected]>
Joe: Do you want to take it via your net tree?
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190409/d660689f/attachment.sig>
PATCH 1/1 phy: ti: Init node before reading
Hi Michal,
Quoted 18 lines · Michal Simek
Quoted 16 lines · Hannes Schmelzer
"U-Boot" <[email protected]> schrieb am 16.03.2019 12:43:17:
Quoted 14 lines
Von: Michal Simek <[email protected]>
An: u-boot at lists.denx.de
Kopie: Janine Hagemann <[email protected]>, Joe Hershberger <[email protected]>, Hannes Schmelzer <[email protected]>
Datum: 16.03.2019 12:43
Betreff: [U-Boot] [PATCH] phy: ti: Init node before reading Gesendet von: "U-Boot" <[email protected]>There is a need to fill node before
clk_output_selis setup.Signed-off-by Michal Simek <[email protected]>---
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)Reviewed-by <[email protected]>Joe: Do you want to take it via your net tree?
Sure, I'll take it through my tree. I have to figure out which patch on my tree is breaking Tom's board, but once I get that figured out, I'll be pulling things in. I see it is already delegated to me in patchwork.
Thanks,
-Joe
PATCH 1/1 phy: ti: Init node before reading
In reply to Michal SimekHi Michal,
Quoted 1 line
There is a need to fill node before
clk_output_selis setup.
Could you be more specific about this issue ?
I assume that the issue is on a system where Xilinx is used. I did my work/testing on a system where TI's SoC was used instead, so I'm curious what are the problems on Xilinx.
Thanks in advance.
Quoted 34 lines
Signed-off-by Michal Simek <[email protected]>---
drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/phy/ti.c +4
-4@@ -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,
Quoted 1 line
"ti,min-output-impedance"))
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190318/eb420b69/attachment.sig>
PATCH 1/1 phy: ti: Init node before reading
Hi,
Quoted 9 lines · Lukasz Majewski
Hi Michal,
Quoted 1 line
There is a need to fill node before
clk_output_selis setup.Could you be more specific about this issue ?
I assume that the issue is on a system where Xilinx is used. I did my work/testing on a system where TI's SoC was used instead, so I'm curious what are the problems on Xilinx.
I didn't run this on any board - it is just fixing logic there.
Just look at the code that this. ofnode_read_u32_default(node, "ti,clk-output-sel",
is using node. But node variable is not initialized at that time. It initialized below this.
It means I expect that this read will always setup default value no matter what you have in ti,clk-output-sel property.
Thanks,
Michal
Hi Michal,
https://patchwork.ozlabs.org/patch/1057355/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe