phy: for 4.9 -rc
phy fixes: *) Add a empty function for phy_reset when CONFIG_GENERIC_PHY is not set *) change the phy lookup table for da8xx-usb to match it with the name present in the board configuraion file (used for non-dt boot) *) Fix incorrect programming sequence in w.r.t deassert of phy_rst in phy-rockchip-pcie *) Fix to avoid NULL pointer dereferencing error in sun4i phy Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJYHdt2AAoJEA5ceFyATYLZXGQQAJ3zOzY9bVBGj7HYhyorpY7Q Ya1EtzMQyZgkUgiMQ4R/+XpWkwE0j3C0Yrvr02AqyLUNDuCQwknzNDqPdVfBiS3/ COx/GUYxiY4WOBnxarNDzzzKN1ttDjCp+f8u+H/Fjkbwr5goB5805HBgUcu/HlKT hwsU54zfSWjFcuvj5XKL65eR4MeyXbpJ7RCswA81bQ4Hby8tYHt4ByC3Qj3TOsAs C9nzh3XDVsY+CTQMn036fcmQQDYPTb3l5dSheu5oEvK2RU4iXUp0aM5HPCdh3FwC PvF54rszGSJbvJaG2+ORmvPhrLlQdJwGDNlTZJNQ8vyTPLQF4riZoglG7GUSOVdU ZSfdHp1ZB+AYdbirp+zIYCboKvDXR+07fKu2ewWzGHV6WLpVhdI3uOieQPUSwfic tPdavHzz4h1JtFMnYyI4ab4fjtDaV1G6pnr66GAJ4Zv9zTW6zK60x2aFhkBxFxgf MfZddxQS1n5RKnyuhkJbuf4NSmcxrZTYOcmdMDO1cncb+JgHUxasKI2a/wfxMdv+ RGQDkhOF0DprDEU4s+AaETVTePeJquU1xfnmisPyupaNd3diSicWCI2r2263QqI8 3Qphgh0tu2hmUhkZZjT5evC/nHePbEFOGASbes8AnH5rKVhIwTLBrOWA5caOoP+G iZfYv0Q+VJrbcw7krEur =uTAz -----END PGP SIGNATURE----- Merge tag 'phy-for-4.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.9 -rc phy fixes: *) Add a empty function for phy_reset when CONFIG_GENERIC_PHY is not set *) change the phy lookup table for da8xx-usb to match it with the name present in the board configuraion file (used for non-dt boot) *) Fix incorrect programming sequence in w.r.t deassert of phy_rst in phy-rockchip-pcie *) Fix to avoid NULL pointer dereferencing error in sun4i phy Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
commit
e244978163
|
@ -198,7 +198,8 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev)
|
|||
} else {
|
||||
int ret;
|
||||
|
||||
ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
|
||||
ret = phy_create_lookup(d_phy->usb11_phy, "usb-phy",
|
||||
"ohci-da8xx");
|
||||
if (ret)
|
||||
dev_warn(dev, "Failed to create usb11 phy lookup\n");
|
||||
ret = phy_create_lookup(d_phy->usb20_phy, "usb-phy",
|
||||
|
@ -216,7 +217,7 @@ static int da8xx_usb_phy_remove(struct platform_device *pdev)
|
|||
|
||||
if (!pdev->dev.of_node) {
|
||||
phy_remove_lookup(d_phy->usb20_phy, "usb-phy", "musb-da8xx");
|
||||
phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci.0");
|
||||
phy_remove_lookup(d_phy->usb11_phy, "usb-phy", "ohci-da8xx");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -249,21 +249,10 @@ err_refclk:
|
|||
static int rockchip_pcie_phy_exit(struct phy *phy)
|
||||
{
|
||||
struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
|
||||
int err = 0;
|
||||
|
||||
clk_disable_unprepare(rk_phy->clk_pciephy_ref);
|
||||
|
||||
err = reset_control_deassert(rk_phy->phy_rst);
|
||||
if (err) {
|
||||
dev_err(&phy->dev, "deassert phy_rst err %d\n", err);
|
||||
goto err_reset;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
||||
err_reset:
|
||||
clk_prepare_enable(rk_phy->clk_pciephy_ref);
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct phy_ops ops = {
|
||||
|
|
|
@ -264,7 +264,7 @@ static int sun4i_usb_phy_init(struct phy *_phy)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (data->cfg->enable_pmu_unk1) {
|
||||
if (phy->pmu && data->cfg->enable_pmu_unk1) {
|
||||
val = readl(phy->pmu + REG_PMU_UNK1);
|
||||
writel(val & ~2, phy->pmu + REG_PMU_UNK1);
|
||||
}
|
||||
|
|
|
@ -253,6 +253,13 @@ static inline int phy_set_mode(struct phy *phy, enum phy_mode mode)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int phy_reset(struct phy *phy)
|
||||
{
|
||||
if (!phy)
|
||||
return 0;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int phy_get_bus_width(struct phy *phy)
|
||||
{
|
||||
return -ENOSYS;
|
||||
|
|
Loading…
Reference in a new issue