Merge tag 'efi-2019-10-rc1-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / drivers / net / phy / ti.c
index 25f1332ca98b6ef0328a3b1dcecd07779f132977..75099364659374cff16a60e8961763b494e9151d 100644 (file)
@@ -103,7 +103,7 @@ struct dp83867_private {
        int io_impedance;
        bool rxctrl_strap_quirk;
        int port_mirroring;
-       int clk_output_sel;
+       unsigned int clk_output_sel;
 };
 
 static int dp83867_config_port_mirroring(struct phy_device *phydev)
@@ -136,17 +136,11 @@ static int dp83867_of_init(struct phy_device *phydev)
        ofnode node;
        u16 val;
 
-       /* 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
-        */
-
+       /* Keep the default value if ti,clk-output-sel is not set */
        dp83867->clk_output_sel =
                ofnode_read_u32_default(node, "ti,clk-output-sel",
                                        DP83867_CLK_O_SEL_REF_CLK);
@@ -162,14 +156,14 @@ static int dp83867_of_init(struct phy_device *phydev)
                dp83867->rxctrl_strap_quirk = true;
        dp83867->rx_id_delay = ofnode_read_u32_default(node,
                                                       "ti,rx-internal-delay",
-                                                      -1);
+                                                      DEFAULT_RX_ID_DELAY);
 
        dp83867->tx_id_delay = ofnode_read_u32_default(node,
                                                       "ti,tx-internal-delay",
-                                                      -1);
+                                                      DEFAULT_TX_ID_DELAY);
 
        dp83867->fifo_depth = ofnode_read_u32_default(node, "ti,fifo-depth",
-                                                     -1);
+                                                     DEFAULT_FIFO_DEPTH);
        if (ofnode_read_bool(node, "enet-phy-lane-swap"))
                dp83867->port_mirroring = DP83867_PORT_MIRRORING_EN;