mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 20:03:33 -04:00
Merge "pci: msm: Dump PCIe registers upon WAKE assertion"
This commit is contained in:
commit
aa01bdf5fa
1 changed files with 14 additions and 7 deletions
|
|
@ -721,7 +721,6 @@ struct msm_pcie_dev_t {
|
|||
bool enumerated;
|
||||
struct work_struct handle_wake_work;
|
||||
struct mutex recovery_lock;
|
||||
spinlock_t wakeup_lock;
|
||||
spinlock_t irq_lock;
|
||||
struct mutex aspm_lock;
|
||||
int prevent_l1;
|
||||
|
|
@ -768,6 +767,8 @@ struct msm_pcie_dev_t {
|
|||
int drv_disable_pc_vote;
|
||||
struct mutex drv_pc_lock;
|
||||
|
||||
bool drv_supported;
|
||||
|
||||
void (*rumi_init)(struct msm_pcie_dev_t *pcie_dev);
|
||||
};
|
||||
|
||||
|
|
@ -4799,7 +4800,7 @@ static irqreturn_t handle_wake_irq(int irq, void *data)
|
|||
unsigned long irqsave_flags;
|
||||
int i;
|
||||
|
||||
spin_lock_irqsave(&dev->wakeup_lock, irqsave_flags);
|
||||
spin_lock_irqsave(&dev->irq_lock, irqsave_flags);
|
||||
|
||||
dev->wake_counter++;
|
||||
PCIE_DBG(dev, "PCIe: No. %ld wake IRQ for RC%d\n",
|
||||
|
|
@ -4825,11 +4826,18 @@ static irqreturn_t handle_wake_irq(int irq, void *data)
|
|||
MSM_PCIE_EVENT_WAKEUP);
|
||||
}
|
||||
} else {
|
||||
if (dev->drv_supported && !dev->suspending &&
|
||||
dev->link_status == MSM_PCIE_LINK_ENABLED) {
|
||||
pcie_phy_dump(dev);
|
||||
pcie_parf_dump(dev);
|
||||
pcie_dm_core_dump(dev);
|
||||
}
|
||||
|
||||
msm_pcie_notify_client(dev, MSM_PCIE_EVENT_WAKEUP);
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&dev->wakeup_lock, irqsave_flags);
|
||||
spin_unlock_irqrestore(&dev->irq_lock, irqsave_flags);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
@ -5549,7 +5557,6 @@ static int msm_pcie_probe(struct platform_device *pdev)
|
|||
int i, j;
|
||||
struct msm_pcie_dev_t *pcie_dev;
|
||||
struct device_node *of_node;
|
||||
bool drv_supported;
|
||||
|
||||
dev_info(&pdev->dev, "PCIe: %s\n", __func__);
|
||||
|
||||
|
|
@ -5827,8 +5834,9 @@ static int msm_pcie_probe(struct platform_device *pdev)
|
|||
goto decrease_rc_num;
|
||||
}
|
||||
|
||||
drv_supported = of_property_read_bool(of_node, "qcom,drv-supported");
|
||||
if (drv_supported) {
|
||||
pcie_dev->drv_supported = of_property_read_bool(of_node,
|
||||
"qcom,drv-supported");
|
||||
if (pcie_dev->drv_supported) {
|
||||
ret = msm_pcie_setup_drv(pcie_dev, of_node);
|
||||
if (ret)
|
||||
PCIE_ERR(pcie_dev,
|
||||
|
|
@ -6522,7 +6530,6 @@ static int __init pcie_init(void)
|
|||
mutex_init(&msm_pcie_dev[i].recovery_lock);
|
||||
mutex_init(&msm_pcie_dev[i].aspm_lock);
|
||||
mutex_init(&msm_pcie_dev[i].drv_pc_lock);
|
||||
spin_lock_init(&msm_pcie_dev[i].wakeup_lock);
|
||||
spin_lock_init(&msm_pcie_dev[i].irq_lock);
|
||||
msm_pcie_dev[i].drv_ready = false;
|
||||
msm_pcie_dev[i].l23_rdy_poll_timeout = L23_READY_POLL_TIMEOUT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue