phy: ti: Init node before reading
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> Reviewed-by: <hannes.schmelzer@br-automation.com>
This commit is contained in:
committed by
Joe Hershberger
parent
77b508d34b
commit
6845b368f1
@@ -138,6 +138,10 @@ static int dp83867_of_init(struct phy_device *phydev)
|
|||||||
|
|
||||||
/* Optional configuration */
|
/* 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
|
* Keep the default value if ti,clk-output-sel is not set
|
||||||
* or to high
|
* or to high
|
||||||
@@ -147,10 +151,6 @@ static int dp83867_of_init(struct phy_device *phydev)
|
|||||||
ofnode_read_u32_default(node, "ti,clk-output-sel",
|
ofnode_read_u32_default(node, "ti,clk-output-sel",
|
||||||
DP83867_CLK_O_SEL_REF_CLK);
|
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"))
|
if (ofnode_read_bool(node, "ti,max-output-impedance"))
|
||||||
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
|
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
|
||||||
else if (ofnode_read_bool(node, "ti,min-output-impedance"))
|
else if (ofnode_read_bool(node, "ti,min-output-impedance"))
|
||||||
|
|||||||
Reference in New Issue
Block a user