]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: phy-mtk-tphy: make ref clock optional
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 9 Jan 2020 03:35:10 +0000 (11:35 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jan 2020 14:39:45 +0000 (09:39 -0500)
If make the ref clock optional, no need refer to fixed-clock when
the ref clock is always on or comes from oscillator directly.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
drivers/phy/phy-mtk-tphy.c

index c4fb404f203f957872d72520ba99e9afac2d6519..fd33062ae4e32cc4699ea327bb7931adbfc186b5 100644 (file)
@@ -338,7 +338,8 @@ static int mtk_tphy_probe(struct udevice *dev)
                tphy->phys[index] = instance;
                index++;
 
-               err = clk_get_by_index_nodev(subnode, 0, &instance->ref_clk);
+               err = clk_get_optional_nodev(subnode, "ref",
+                                            &instance->ref_clk);
                if (err)
                        return err;
        }