mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 05:08:24 +00:00
pci: mediatek: make pcie-phy optional for gen3
Set pcie-phy optional for PCIe gen3. MT7988 doesn't require it and making it mandatory prevent the driver to correctly probe. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
63d0f683ef
commit
ca54ef2434
1 changed files with 12 additions and 10 deletions
|
@ -284,9 +284,8 @@ static int mtk_pcie_power_on(struct udevice *dev)
|
|||
|
||||
pcie->priv = dev;
|
||||
|
||||
err = generic_phy_get_by_name(dev, "pcie-phy", &pcie->phy);
|
||||
if (err)
|
||||
return err;
|
||||
/* pcie-phy is optional (mt7988 doesn't need it) */
|
||||
generic_phy_get_by_name(dev, "pcie-phy", &pcie->phy);
|
||||
|
||||
/*
|
||||
* Upstream linux kernel devine these clock without clock-names
|
||||
|
@ -308,6 +307,7 @@ static int mtk_pcie_power_on(struct udevice *dev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
if (pcie->phy.dev) {
|
||||
err = generic_phy_init(&pcie->phy);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -315,6 +315,7 @@ static int mtk_pcie_power_on(struct udevice *dev)
|
|||
err = generic_phy_power_on(&pcie->phy);
|
||||
if (err)
|
||||
goto err_phy_on;
|
||||
}
|
||||
|
||||
err = clk_enable(&pcie->pl_250m_ck);
|
||||
if (err)
|
||||
|
@ -348,6 +349,7 @@ err_clk_tl_26m:
|
|||
err_clk_pl_250m:
|
||||
clk_disable(&pcie->pl_250m_ck);
|
||||
err_phy_on:
|
||||
if (pcie->phy.dev)
|
||||
generic_phy_exit(&pcie->phy);
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Add table
Reference in a new issue