diff options
| author | Rakesh Babu Bodla <rbodla@nvidia.com> | 2016-04-04 08:40:48 -0400 |
|---|---|---|
| committer | Rakesh Babu Bodla <rbodla@nvidia.com> | 2016-04-07 02:27:35 -0400 |
| commit | c70cfb7ded8d7e0713d9124cdb325ec3afb5fc56 (patch) | |
| tree | 656b311ba4c811d6583c22759948375fc7727458 | |
| parent | b87785970c299e5f3fe3ab053e71bd6cb88bfd15 (diff) | |
t186: padctl_uphy: create sata/ufs phy based on lanes
Sata/UFS phy will be created only if the lanes are
assigned to particular module.
Bug 200178286
Change-Id: Ieeb443fcaa99a5c4a62e484d2123d83d0b10cacb
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/1119737
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
| -rw-r--r-- | drivers/pinctrl/pinctrl-tegra186-padctl-uphy.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra186-padctl-uphy.c b/drivers/pinctrl/pinctrl-tegra186-padctl-uphy.c index a89d31e75..70a6a7724 100644 --- a/drivers/pinctrl/pinctrl-tegra186-padctl-uphy.c +++ b/drivers/pinctrl/pinctrl-tegra186-padctl-uphy.c | |||
| @@ -5230,21 +5230,25 @@ static int tegra186_padctl_uphy_probe(struct platform_device *pdev) | |||
| 5230 | phy_set_drvdata(phy, uphy); | 5230 | phy_set_drvdata(phy, uphy); |
| 5231 | } | 5231 | } |
| 5232 | 5232 | ||
| 5233 | phy = devm_phy_create(dev, NULL, &sata_phy_ops, NULL); | 5233 | if (uphy->sata_lanes) { |
| 5234 | if (IS_ERR(phy)) { | 5234 | phy = devm_phy_create(dev, NULL, &sata_phy_ops, NULL); |
| 5235 | err = PTR_ERR(phy); | 5235 | if (IS_ERR(phy)) { |
| 5236 | goto uphy_pll_deinit; | 5236 | err = PTR_ERR(phy); |
| 5237 | goto uphy_pll_deinit; | ||
| 5238 | } | ||
| 5239 | uphy->sata_phys[0] = phy; | ||
| 5240 | phy_set_drvdata(phy, uphy); | ||
| 5237 | } | 5241 | } |
| 5238 | uphy->sata_phys[0] = phy; | ||
| 5239 | phy_set_drvdata(phy, uphy); | ||
| 5240 | 5242 | ||
| 5241 | phy = devm_phy_create(dev, NULL, &ufs_phy_ops, NULL); | 5243 | if (uphy->ufs_lanes) { |
| 5242 | if (IS_ERR(phy)) { | 5244 | phy = devm_phy_create(dev, NULL, &ufs_phy_ops, NULL); |
| 5243 | err = PTR_ERR(phy); | 5245 | if (IS_ERR(phy)) { |
| 5244 | goto uphy_pll_deinit; | 5246 | err = PTR_ERR(phy); |
| 5247 | goto uphy_pll_deinit; | ||
| 5248 | } | ||
| 5249 | uphy->ufs_phys[0] = phy; | ||
| 5250 | phy_set_drvdata(phy, uphy); | ||
| 5245 | } | 5251 | } |
| 5246 | uphy->ufs_phys[0] = phy; | ||
| 5247 | phy_set_drvdata(phy, uphy); | ||
| 5248 | 5252 | ||
| 5249 | INIT_WORK(&uphy->otg_vbus_work, tegra_xusb_otg_vbus_work); | 5253 | INIT_WORK(&uphy->otg_vbus_work, tegra_xusb_otg_vbus_work); |
| 5250 | INIT_WORK(&uphy->mbox_req_work, tegra_xusb_phy_mbox_work); | 5254 | INIT_WORK(&uphy->mbox_req_work, tegra_xusb_phy_mbox_work); |
