summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunfeng Yun <chunfeng.yun@mediatek.com>2017-12-07 12:53:35 +0100
committerKishon Vijay Abraham I <kishon@ti.com>2017-12-29 08:30:35 +0100
commit93a04f4f1607c55452c85c7adaee043321afb3ae (patch)
tree9fa8bc29e1f3a468bba7dc3f78f56c82b3c3ef55
parentphy: phy-mtk-tphy: use auto instead of force to bypass utmi signals (diff)
downloadlinux-93a04f4f1607c55452c85c7adaee043321afb3ae.tar.xz
linux-93a04f4f1607c55452c85c7adaee043321afb3ae.zip
phy: phy-mtk-tphy: make shared banks optional for V1 TPHY
V1 TPHY for SATA doesn't have shared banks if it isn't shared with PCIe or USB, so make it optional. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r--drivers/phy/mediatek/phy-mtk-tphy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 54cc44b2d289..11cab1d84a02 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platform_device *pdev)
tphy->dev = dev;
platform_set_drvdata(pdev, tphy);
- if (tphy->pdata->version == MTK_PHY_V1) {
+ sif_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ /* SATA phy of V1 needn't it if not shared with PCIe or USB */
+ if (sif_res && tphy->pdata->version == MTK_PHY_V1) {
/* get banks shared by multiple phys */
- sif_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
tphy->sif_base = devm_ioremap_resource(dev, sif_res);
if (IS_ERR(tphy->sif_base)) {
dev_err(dev, "failed to remap sif regs\n");