mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
msm: pci: Dump PCIe clock registers on link failure
Dump PCie clocks on failure to enter link into L0, linkdown interrupt, and on receiving wake IRQ from device. Change-Id: I89430b25feeb165709ac44d3af65c73b8ab4eada Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com> Signed-off-by: Prudhvi Yarlagadda <quic_pyarlaga@quicinc.com>
This commit is contained in:
parent
0b800d87c4
commit
51dafa59bf
|
|
@ -35,6 +35,7 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/kfifo.h>
|
||||
#include <linux/clk/qcom.h>
|
||||
|
||||
#include "../pci.h"
|
||||
|
||||
|
|
@ -304,7 +305,6 @@
|
|||
pr_err("%s: " fmt, __func__, arg); \
|
||||
} while (0)
|
||||
|
||||
|
||||
enum msm_pcie_res {
|
||||
MSM_PCIE_RES_PARF,
|
||||
MSM_PCIE_RES_PHY,
|
||||
|
|
@ -2943,6 +2943,28 @@ static bool msm_pcie_check_ltssm_state(struct msm_pcie_dev_t *dev, u32 state)
|
|||
return false;
|
||||
}
|
||||
|
||||
void msm_pcie_clk_dump(struct msm_pcie_dev_t *pcie_dev)
|
||||
{
|
||||
struct msm_pcie_clk_info_t *clk_info;
|
||||
int i;
|
||||
|
||||
PCIE_ERR(pcie_dev,
|
||||
"PCIe: RC%d: Dump PCIe clocks\n",
|
||||
pcie_dev->rc_idx);
|
||||
|
||||
clk_info = pcie_dev->clk;
|
||||
for (i = 0; i < pcie_dev->num_clk; i++, clk_info++) {
|
||||
if (clk_info->hdl)
|
||||
qcom_clk_dump(clk_info->hdl, NULL, 0);
|
||||
}
|
||||
|
||||
clk_info = pcie_dev->pipe_clk;
|
||||
for (i = 0; i < pcie_dev->num_pipe_clk; i++, clk_info++) {
|
||||
if (clk_info->hdl)
|
||||
qcom_clk_dump(clk_info->hdl, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* msm_pcie_iatu_config - configure outbound address translation region
|
||||
* @dev: root commpex
|
||||
|
|
@ -5772,6 +5794,7 @@ static irqreturn_t handle_wake_irq(int irq, void *data)
|
|||
|
||||
if (dev->drv_supported && !dev->suspending &&
|
||||
dev->link_status == MSM_PCIE_LINK_ENABLED) {
|
||||
msm_pcie_clk_dump(dev);
|
||||
pcie_phy_dump(dev);
|
||||
pcie_parf_dump(dev);
|
||||
pcie_dm_core_dump(dev);
|
||||
|
|
@ -5847,6 +5870,7 @@ static void msm_pcie_handle_linkdown(struct msm_pcie_dev_t *dev)
|
|||
PCIE_DUMP(dev,
|
||||
"PCIe:Linkdown IRQ for RC%d Dumping PCIe registers\n",
|
||||
dev->rc_idx);
|
||||
msm_pcie_clk_dump(dev);
|
||||
pcie_phy_dump(dev);
|
||||
pcie_parf_dump(dev);
|
||||
pcie_dm_core_dump(dev);
|
||||
|
|
@ -7165,6 +7189,7 @@ int msm_pcie_prevent_l1(struct pci_dev *pci_dev)
|
|||
PCIE_ERR(pcie_dev,
|
||||
"PCIe: RC%d: dump PCIe registers\n",
|
||||
pcie_dev->rc_idx);
|
||||
msm_pcie_clk_dump(pcie_dev);
|
||||
pcie_parf_dump(pcie_dev);
|
||||
pcie_dm_core_dump(pcie_dev);
|
||||
pcie_phy_dump(pcie_dev);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user