]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: mtk-tphy: make shared reg optional for v1
authorFrank Wunderlich <frank-w@public-files.de>
Thu, 20 Aug 2020 14:37:52 +0000 (16:37 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 24 Aug 2020 18:11:31 +0000 (14:11 -0400)
make the shared reg optional when version is v1 for sata

Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
drivers/phy/phy-mtk-tphy.c

index 326227a30ddb2f5403b68ef0ef779d976d09b2ec..3d7b9cd2b12942c34686c4538c46d6204f0caaa7 100644 (file)
@@ -698,11 +698,10 @@ static int mtk_tphy_probe(struct udevice *dev)
        tphy->dev = dev;
        tphy->version = dev_get_driver_data(dev);
 
-       /* v1 has shared banks */
+       /* v1 has shared banks for usb/pcie mode, */
+       /* but not for sata mode */
        if (tphy->version == MTK_TPHY_V1) {
                tphy->sif_base = dev_read_addr_ptr(dev);
-               if (!tphy->sif_base)
-                       return -ENOENT;
        }
 
        dev_for_each_subnode(subnode, dev) {