Enhancements to pcie-tegra194 driver
Subsystems (4)
v2 cover Enhancements to pcie-tegra194 driver
This patch series contains enhancements to the pcie-tegra194.c driver that works for both Tegra194 and Tegra234 SoCs and for both RootPort and Endpoint modes.
V2:
* Addressed review comments from test bot and Vinod
Vidya Sagar (9):
PCI: tegra194: Use devm_gpiod_get_optional() to parse
"nvidia,refclk-select"
PCI: tegra194: Drive CLKREQ signal low explicitly
PCI: tegra194: Fix polling delay for L2 state
PCI: tegra194: Handle errors in BPMP response
PCI: tegra194: Apply pinctrl settings for both PCIe RP and EP
PCI: tegra194: Refactor LTSSM state polling on surprise down
PCI: tegra194: Disable direct speed change for EP
phy: tegra: p2u: Set ENABLE_L2_EXIT_RATE_CHANGE in calibration
PCI: tegra194: Calibrate P2U for endpoint mode
drivers/pci/controller/dwc/pcie-tegra194.c | 126 +++++++++++++++------ drivers/phy/tegra/phy-tegra194-p2u.c | 14 +++ 2 files changed, 104 insertions(+), 36 deletions(-)
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 1/9 PCI: tegra194: Use devm_gpiod_get_optional() to parse "nvidia,refclk-select"
The GPIO DT property "nvidia,refclk-select" to select the PCIe reference clock is optional. Use devm_gpiod_get_optional() to get it.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +3 -3
@@ -1176,9 +1176,9 @@ static int tegra_pcie_dw_parse_dt(struct tegra_pcie_dw *pcie)return err; } - pcie->pex_refclk_sel_gpiod =devm_gpiod_get (pcie->dev, -"nvidia,refclk-select" , -GPIOD_OUT_HIGH ); + pcie->pex_refclk_sel_gpiod =devm_gpiod_get_optional (pcie->dev, +"nvidia,refclk-select" , +GPIOD_OUT_HIGH );if (IS_ERR (pcie->pex_refclk_sel_gpiod)) {int err =PTR_ERR (pcie->pex_refclk_sel_gpiod);const char *level =KERN_ERR ;
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 2/9 PCI: tegra194: Drive CLKREQ signal low explicitly
In reply to Vidya SagarCurrently, the default setting is that CLKREQ signal of a Root Port is internally overridden to '0' to enable REFCLK flowing out to the slot. It is observed that one of the PCIe switches (case in point Broadcom PCIe Gen4 switch) is propagating the CLKREQ signal of the root port to the downstream side of the switch and expecting the endpoints to pull it low so that it (PCIe switch) can give out the REFCLK although the Switch as such doesn't support CLK-PM or ASPM-L1SS. So, as a work-around, this patch drives the CLKREQ of the Root Port itself low to avoid link up issues between PCIe switch downstream port and endpoints. This is not a wrong thing to do after all the CLKREQ is anyway being overridden to '0' internally and now it is just that the same is being propagated outside also.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -46,6 +46,7 @@#define APPL_PINMUX_CLKREQ_OVERRIDE BIT(3)#define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN BIT(4)#define APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE BIT(5) +#define APPL_PINMUX_CLKREQ_DEFAULT_VALUE BIT(13)#define APPL_CTRL 0x4#define APPL_CTRL_SYS_PRE_DET_STATE BIT(6)
@@ -1453,6 +1454,7 @@ static int tegra_pcie_config_controller(struct tegra_pcie_dw *pcie, val =appl_readl (pcie,APPL_PINMUX ); val |=APPL_PINMUX_CLKREQ_OVERRIDE_EN ; val &= ~APPL_PINMUX_CLKREQ_OVERRIDE ; + val &= ~APPL_PINMUX_CLKREQ_DEFAULT_VALUE ;appl_writel (pcie, val,APPL_PINMUX ); }
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 3/9 PCI: tegra194: Fix polling delay for L2 state
In reply to Vidya SagarCurrent L2 state polling with 1us interval is too aggressive. Based on the experiments with different endpoints, LTSSM state transisition to L2 is happening between 6us ~ 40us. Hence, update the polling delay for L2 state from 1us to 100us for a better utilization of CPU cycles.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +3 -2
@@ -206,7 +206,8 @@#define CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_MASK GENMASK(11, 8)#define CAP_SPCIE_CAP_OFF_USP_TX_PRESET0_SHIFT 8 -#define PME_ACK_TIMEOUT 10000 +#define PME_ACK_DELAY 100/* 100 us */ +#define PME_ACK_TIMEOUT 10000/* 10 ms */ #define LTSSM_TIMEOUT 50000/* 50ms */
@@ -1556,7 +1557,7 @@ static int tegra_pcie_try_link_l2(struct tegra_pcie_dw *pcie)return readl_poll_timeout_atomic (pcie->appl_base +APPL_DEBUG , val, val &APPL_DEBUG_PM_LINKST_IN_L2_LAT , -1 ,PME_ACK_TIMEOUT ); +PME_ACK_DELAY ,PME_ACK_TIMEOUT ); }static void tegra_pcie_dw_pme_turnoff (struct tegra_pcie_dw *pcie)
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 4/9 PCI: tegra194: Handle errors in BPMP response
In reply to Vidya SagarThe return value from tegra_bpmp_transfer indicates the success or failure of the IPC transaction with BPMP. If the transaction succeeded, we also need to check the actual command's result code. Add code to do this.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +16 -2
@@ -1203,6 +1203,7 @@ static int tegra_pcie_bpmp_set_ctrl_state(struct tegra_pcie_dw *pcie,struct mrq_uphy_response resp;struct tegra_bpmp_message msg;struct mrq_uphy_request req; +int err;/* * Controller-5 doesn't need to have its state set by BPMP-FW in
@@ -1225,7 +1226,13 @@ static int tegra_pcie_bpmp_set_ctrl_state(struct tegra_pcie_dw *pcie, msg.rx.data = &resp; msg.rx.size =sizeof (resp); -return tegra_bpmp_transfer (pcie->bpmp, &msg); + err =tegra_bpmp_transfer (pcie->bpmp, &msg); +if (err) +return err; +if (msg.rx.ret) +return -EINVAL ; + +return 0 ; } static int tegra_pcie_bpmp_set_pll_state(struct tegra_pcie_dw *pcie,
@@ -1234,6 +1241,7 @@ static int tegra_pcie_bpmp_set_pll_state(struct tegra_pcie_dw *pcie,struct mrq_uphy_response resp;struct tegra_bpmp_message msg;struct mrq_uphy_request req; +int err;memset (&req,0 ,sizeof (req));memset (&resp,0 ,sizeof (resp));
@@ -1253,7 +1261,13 @@ static int tegra_pcie_bpmp_set_pll_state(struct tegra_pcie_dw *pcie, msg.rx.data = &resp; msg.rx.size =sizeof (resp); -return tegra_bpmp_transfer (pcie->bpmp, &msg); + err =tegra_bpmp_transfer (pcie->bpmp, &msg); +if (err) +return err; +if (msg.rx.ret) +return -EINVAL ; + +return 0 ; }static void tegra_pcie_downstream_dev_to_D0 (struct tegra_pcie_dw *pcie)
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 5/9 PCI: tegra194: Apply pinctrl settings for both PCIe RP and EP
In reply to Vidya SagarPERST# and CLKREQ# pinctrl settings should be applied for both root port and endpoint mode. Move pinctrl_pm_select_default_state() function call from root port specific configuration function to probe().
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +13 -6
@@ -1659,12 +1659,6 @@ static int tegra_pcie_config_rp(struct tegra_pcie_dw *pcie) goto fail_pm_get_sync; } - ret =pinctrl_pm_select_default_state (dev); -if (ret <0 ) { -dev_err (dev,"Failed to configure sideband pins: %d\n" , ret); - goto fail_pm_get_sync; - } - ret =tegra_pcie_init_controller (pcie);if (ret <0 ) {dev_err (dev,"Failed to initialize controller: %d\n" , ret);
@@ -2120,6 +2114,19 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) pp = &pci->pp; pp->num_vectors =MAX_MSI_IRQS ; + ret =pinctrl_pm_select_default_state (dev); +if (ret <0 ) { +const char *level =KERN_ERR ; + +if (ret == -EPROBE_DEFER ) + level =KERN_DEBUG ; + +dev_printk (level, dev, +"Failed to configure sideband pins: %d\n" , + ret); +return ret; + } + ret =tegra_pcie_dw_parse_dt (pcie);if (ret <0 ) {const char *level =KERN_ERR ;
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 6/9 PCI: tegra194: Refactor LTSSM state polling on surprise down
In reply to Vidya SagarOn surprise down LTSSM state transisition from L0 -> Recovery.RcvrLock -> Recovery.RcvrSpeed -> Gen1 Recovery.RcvrLock -> Detect. Recovery.RcvrLock and Recovery.RcvrSpeed time is 24 msec and 48 msec respectively. It takes ~96 msec to move from L0 to detect state, hence, increase the poll time to 120 msec. Disable the LTSSM state after it moves to detect to avoid LTSSM toggle between polling and detect.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 69 ++++++++++++++-------- 1 file changed, 46 insertions(+), 23 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +46 -23
@@ -140,7 +140,11 @@#define APPL_DEBUG_PM_LINKST_IN_L0 0x11#define APPL_DEBUG_LTSSM_STATE_MASK GENMASK(8, 3)#define APPL_DEBUG_LTSSM_STATE_SHIFT 3 -#define LTSSM_STATE_PRE_DETECT 5 +#define LTSSM_STATE_DETECT_QUIET 0x00 +#define LTSSM_STATE_DETECT_ACT 0x08 +#define LTSSM_STATE_PRE_DETECT_QUIET 0x28 +#define LTSSM_STATE_DETECT_WAIT 0x30 +#define LTSSM_STATE_L2_IDLE 0xa8#define APPL_RADM_STATUS 0xE4#define APPL_PM_XMT_TURNOFF_STATE BIT(0)
@@ -209,7 +213,8 @@#define PME_ACK_DELAY 100/* 100 us */ #define PME_ACK_TIMEOUT 10000/* 10 ms */ -#define LTSSM_TIMEOUT 50000/* 50ms */ +#define LTSSM_DELAY 10000/* 10 ms */ +#define LTSSM_TIMEOUT 120000/* 120 ms */ #define GEN3_GEN4_EQ_PRESET_INIT 5
@@ -1606,23 +1611,31 @@ static void tegra_pcie_dw_pme_turnoff(struct tegra_pcie_dw *pcie) data &= ~APPL_PINMUX_PEX_RST ;appl_writel (pcie, data,APPL_PINMUX ); -/* -* Some cards do not go to detect state even after de-asserting -* PERST#. So, de-assert LTSSM to bring link to detect state. -*/ - data =readl (pcie->appl_base +APPL_CTRL ); - data &= ~APPL_CTRL_LTSSM_EN ; -writel (data, pcie->appl_base +APPL_CTRL ); - err =readl_poll_timeout_atomic (pcie->appl_base +APPL_DEBUG , data, ((data & -APPL_DEBUG_LTSSM_STATE_MASK ) >> -APPL_DEBUG_LTSSM_STATE_SHIFT ) == -LTSSM_STATE_PRE_DETECT , -1 ,LTSSM_TIMEOUT ); +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_QUIET ) || + ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_ACT ) || + ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_PRE_DETECT_QUIET ) || + ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_WAIT ), +LTSSM_DELAY ,LTSSM_TIMEOUT );if (err)dev_info (pcie->dev,"Link didn't go to detect state\n" ); + +/* +* Deassert LTSSM state to stop the state toggling between +* polling and detect. +*/ + data =readl (pcie->appl_base +APPL_CTRL ); + data &= ~APPL_CTRL_LTSSM_EN ; +writel (data, pcie->appl_base +APPL_CTRL ); }/* * DBI registers may not be accessible after this as PLL-E would be
@@ -1698,19 +1711,29 @@ static void pex_ep_event_pex_rst_assert(struct tegra_pcie_dw *pcie)if (pcie->ep_state ==EP_STATE_DISABLED )return ; -/* Disable LTSSM */ + ret =readl_poll_timeout (pcie->appl_base +APPL_DEBUG , val, + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_QUIET ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_ACT ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_PRE_DETECT_QUIET ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_WAIT ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_L2_IDLE ), +LTSSM_DELAY ,LTSSM_TIMEOUT ); +if (ret) +dev_err (pcie->dev,"LTSSM state: 0x%x timeout: %d\n" , val, ret); + +/* +* Deassert LTSSM state to stop the state toggling between +* polling and detect. +*/ val =appl_readl (pcie,APPL_CTRL ); val &= ~APPL_CTRL_LTSSM_EN ;appl_writel (pcie, val,APPL_CTRL ); - ret =readl_poll_timeout (pcie->appl_base +APPL_DEBUG , val, - ((val &APPL_DEBUG_LTSSM_STATE_MASK ) >> -APPL_DEBUG_LTSSM_STATE_SHIFT ) == -LTSSM_STATE_PRE_DETECT , -1 ,LTSSM_TIMEOUT ); -if (ret) -dev_err (pcie->dev,"Failed to go Detect state: %d\n" , ret); -reset_control_assert (pcie->core_rst);tegra_pcie_disable_phy (pcie);
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH V2 6/9] PCI: tegra194: Refactor LTSSM state polling on surprise down
Quoted 6 lines · Vidya Sagar
On surprise down LTSSM state transisition from L0 -> Recovery.RcvrLock -> Recovery.RcvrSpeed -> Gen1 Recovery.RcvrLock -> Detect. Recovery.RcvrLock and Recovery.RcvrSpeed time is 24 msec and 48 msec respectively. It takes ~96 msec to move from L0 to detect state, hence, increase the poll time to 120 msec. Disable the LTSSM state after it moves to detect to avoid LTSSM toggle between polling and detect.
s/transisition/transition/
Quoted 9 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2
-4err = readl_poll_timeout_atomic(pcie->appl_base + APPL_DEBUG, data, ((data & -APPL_DEBUG_LTSSM_STATE_MASK ) >> -APPL_DEBUG_LTSSM_STATE_SHIFT ) == -LTSSM_STATE_PRE_DETECT , -1 ,LTSSM_TIMEOUT ); + APPL_DEBUG_LTSSM_STATE_MASK) == + LTSSM_STATE_DETECT_QUIET) ||
drivers/pci/controller/dwc/pcie-tegra194.c static void tegra_pcie_dw_pme_turnoff(struct tegra_pcie_dw *pcie) · line 1628
Quoted 10 lines
drivers/pci/controller/dwc/pcie-tegra194.c +10
-0+ ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_ACT ) || + ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_PRE_DETECT_QUIET ) || + ((data & +APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_WAIT ), + LTSSM_DELAY, LTSSM_TIMEOUT);
I know we usually line up the function parameters with that opening paren, but I think overall it would be nicer to drop a couple of the leading tabs so these don't wrap so awkwardly.
drivers/pci/controller/dwc/pcie-tegra194.c static void pex_ep_event_pex_rst_assert(struct tegra_pcie_dw *pcie) · line 1725
Quoted 12 lines
drivers/pci/controller/dwc/pcie-tegra194.c +12
-0+ ret =readl_poll_timeout (pcie->appl_base +APPL_DEBUG , val, + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_QUIET ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_ACT ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_PRE_DETECT_QUIET ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_DETECT_WAIT ) || + ((val &APPL_DEBUG_LTSSM_STATE_MASK ) == +LTSSM_STATE_L2_IDLE ), +LTSSM_DELAY ,LTSSM_TIMEOUT );
Ditto.
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 7/9 PCI: tegra194: Disable direct speed change for EP
In reply to Vidya SagarDisable direct speed change for endpoint to prevent it from doing speed change by itself post physical layer link up at gen1 and also to leave link speed in control of the host.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +4 -0
@@ -1872,6 +1872,10 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)reset_control_deassert (pcie->core_rst); + val =dw_pcie_readl_dbi (pci,PCIE_LINK_WIDTH_SPEED_CONTROL ); + val &= ~PORT_LOGIC_SPEED_CHANGE ; +dw_pcie_writel_dbi (pci,PCIE_LINK_WIDTH_SPEED_CONTROL , val); +if (pcie->update_fc_fixup) { val =dw_pcie_readl_dbi (pci,CFG_TIMER_CTRL_MAX_FUNC_NUM_OFF ); val |=0x1 <<CFG_TIMER_CTRL_ACK_NAK_SHIFT ;
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 8/9 phy: tegra: p2u: Set ENABLE_L2_EXIT_RATE_CHANGE in calibration
In reply to Vidya SagarSet ENABLE_L2_EXIT_RATE_CHANGE to request UPHY PLL rate change to Gen1 during initialization. This helps in the below surprise down cases,
- Surprise down happens at Gen3/Gen4 link speed
- Surprise down happens and external REFCLK is cut off which causes
UPHY PLL rate to deviate to an invalid rate
ENABLE_L2_EXIT_RATE_CHANGE needs to be set to bring the UPHY PLL rate back to Gen1 during controller initialization for the link up.
---
V2:
* Addressed review comment from test bot and Vinod
drivers/phy/tegra/phy-tegra194-p2u.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/phy/tegra/phy-tegra194-p2u.c +14 -0
@@ -15,6 +15,7 @@#include <linux/phy/phy.h> #define P2U_CONTROL_CMN 0x74 +#define P2U_CONTROL_CMN_ENABLE_L2_EXIT_RATE_CHANGE BIT(13)#define P2U_CONTROL_CMN_SKP_SIZE_PROTECTION_EN BIT(20)#define P2U_PERIODIC_EQ_CTRL_GEN3 0xc0
@@ -85,8 +86,21 @@ static int tegra_p2u_power_on(struct phy *x)return 0 ; } +static int tegra_p2u_calibrate (struct phy *x) +{ +struct tegra_p2u *phy =phy_get_drvdata (x); +u32 val; + + val =p2u_readl (phy,P2U_CONTROL_CMN ); + val |=P2U_CONTROL_CMN_ENABLE_L2_EXIT_RATE_CHANGE ; +p2u_writel (phy, val,P2U_CONTROL_CMN ); + +return 0 ; +} +static const struct phy_ops ops = { .power_on = tegra_p2u_power_on, + .calibrate = tegra_p2u_calibrate, .owner =THIS_MODULE , };
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH V2 8/9] phy: tegra: p2u: Set ENABLE_L2_EXIT_RATE_CHANGE in calibration
Quoted 11 lines · Vidya Sagar
Set
ENABLE_L2_EXIT_RATE_CHANGEto request UPHY PLL rate change to Gen1 during initialization. This helps in the below surprise down cases,
- Surprise down happens at Gen3/Gen4 link speed
- Surprise down happens and external REFCLK is cut off which causes
UPHY PLL rate to deviate to an invalid rate
ENABLE_L2_EXIT_RATE_CHANGEneeds to be set to bring the UPHY PLL rate back to Gen1 during controller initialization for the link up.Signed-off-by Vidya Sagar <[email protected]>Reported-by kernel test robot <[email protected]>
I doubt the kernel test robot reported the issue being fixed by this patch. More likely it reported a syntax or similar issue in v1, and I think the "reported-by" tag is meaningless in cases like that.
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH v2 9/9 PCI: tegra194: Calibrate P2U for endpoint mode
In reply to Vidya SagarCalibrate P2U for endpoint to request UPHY PLL rate change to Gen1 during initialization.
---
V2:
* None
drivers/pci/controller/dwc/pcie-tegra194.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +3 -0
@@ -1078,6 +1078,9 @@ static int tegra_pcie_enable_phy(struct tegra_pcie_dw *pcie) ret =phy_power_on (pcie->phys[i]);if (ret <0 ) goto phy_exit; + +if (pcie->of_data->mode ==DW_PCIE_EP_TYPE ) +phy_calibrate (pcie->phys[i]); }return 0 ;
Signature · 7 lines
2.17.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy