pci: msm: Bring pine EP out of reset after link up
This change is to bring pine EP out of reset post link-up. Change-Id: Ied7533258496e8c08f619997626d70bcd6f0f8de Signed-off-by: Ramya SR <quic_rsr@quicinc.com> Signed-off-by: Yogesh Jadav <quic_yjadav@quicinc.com> Signed-off-by: Joco Zhang <quic_pingshen@quicinc.com>
This commit is contained in:
parent
f8b910e71e
commit
caf2e99f0c
1 changed files with 13 additions and 1 deletions
|
|
@ -1043,6 +1043,7 @@ struct pcie_i2c_ctrl {
|
|||
u32 reg_update_count;
|
||||
u32 version_reg;
|
||||
bool force_i2c_setting;
|
||||
bool ep_reset_postlinkup;
|
||||
struct pcie_i2c_reg_update *switch_reg_update;
|
||||
u32 switch_reg_update_count;
|
||||
/* client specific callbacks */
|
||||
|
|
@ -6137,7 +6138,8 @@ static int msm_pcie_enable_link(struct msm_pcie_dev_t *dev)
|
|||
msleep(20);
|
||||
}
|
||||
/* bring eps out of reset */
|
||||
if (dev->i2c_ctrl.client && dev->i2c_ctrl.client_i2c_reset) {
|
||||
if (dev->i2c_ctrl.client && dev->i2c_ctrl.client_i2c_reset
|
||||
&& !dev->i2c_ctrl.ep_reset_postlinkup) {
|
||||
dev->i2c_ctrl.client_i2c_reset(&dev->i2c_ctrl, false);
|
||||
msleep(100);
|
||||
}
|
||||
|
|
@ -6303,6 +6305,14 @@ static int msm_pcie_enable(struct msm_pcie_dev_t *dev)
|
|||
msm_pcie_config_link_pm(dev, true);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C)
|
||||
/* Bring pine EP out of reset*/
|
||||
if (dev->i2c_ctrl.client && dev->i2c_ctrl.client_i2c_reset
|
||||
&& dev->i2c_ctrl.ep_reset_postlinkup) {
|
||||
dev->i2c_ctrl.client_i2c_reset(&dev->i2c_ctrl, false);
|
||||
msleep(100);
|
||||
}
|
||||
#endif
|
||||
goto out;
|
||||
|
||||
link_fail:
|
||||
|
|
@ -8281,6 +8291,8 @@ static int msm_pcie_i2c_ctrl_init(struct msm_pcie_dev_t *pcie_dev)
|
|||
&i2c_ctrl->version_reg);
|
||||
i2c_ctrl->force_i2c_setting = of_property_read_bool(i2c_client_node,
|
||||
"force-i2c-setting");
|
||||
i2c_ctrl->ep_reset_postlinkup = of_property_read_bool(i2c_client_node,
|
||||
"ep_reset_postlinkup");
|
||||
of_get_property(i2c_client_node, "dump-regs", &size);
|
||||
|
||||
if (size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue