Commit 560bb7a0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "pci: msm: Bring pine EP out of reset after link up"

parents b48d25e6 0923ae55
......@@ -720,6 +720,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 */
......@@ -4773,7 +4774,8 @@ static int msm_pcie_enable(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);
}
......@@ -4824,6 +4826,12 @@ static int msm_pcie_enable(struct msm_pcie_dev_t *dev)
if (dev->enumerated)
msm_msi_config(dev_get_msi_domain(&dev->dev->dev));
/* 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);
}
goto out;
link_fail:
......@@ -6087,6 +6095,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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment