Loading arch/arm/mach-msm/include/mach/msm_pcie.h +12 −0 Original line number Diff line number Diff line Loading @@ -106,4 +106,16 @@ int msm_pcie_deregister_event(struct msm_pcie_register_event *reg); * Return: 0 on success, negative value on error */ int msm_pcie_recover_config(struct pci_dev *dev); /** * msm_pcie_shadow_control - control the shadowing of PCIe config space. * @dev: pci device structure * @enable: shadowing should be enabled or disabled * * This function gives PCIe endpoint device drivers the control to enable * or disable the shadowing of PCIe config space. * * Return: 0 on success, negative value on error */ int msm_pcie_shadow_control(struct pci_dev *dev, bool enable); #endif arch/arm/mach-msm/pcie.c +28 −0 Original line number Diff line number Diff line Loading @@ -2259,3 +2259,31 @@ int msm_pcie_recover_config(struct pci_dev *dev) return ret; } EXPORT_SYMBOL(msm_pcie_recover_config); int msm_pcie_shadow_control(struct pci_dev *dev, bool enable) { int ret = 0; struct msm_pcie_dev_t *pcie_dev; if (dev) { pcie_dev = PCIE_BUS_PRIV_DATA(dev); PCIE_DBG(pcie_dev, "Recovery for the link of RC%d\n", pcie_dev->rc_idx); } else { pr_err("PCIe: the input pci dev is NULL.\n"); return -ENODEV; } PCIE_DBG(pcie_dev, "The shadowing of RC%d is %s enabled currently.\n", pcie_dev->rc_idx, pcie_dev->shadow_en ? "" : "not"); pcie_dev->shadow_en = enable; PCIE_DBG(pcie_dev, "Shadowing of RC%d is turned %s upon user's request.\n", pcie_dev->rc_idx, enable ? "on" : "off"); return ret; } EXPORT_SYMBOL(msm_pcie_shadow_control); Loading
arch/arm/mach-msm/include/mach/msm_pcie.h +12 −0 Original line number Diff line number Diff line Loading @@ -106,4 +106,16 @@ int msm_pcie_deregister_event(struct msm_pcie_register_event *reg); * Return: 0 on success, negative value on error */ int msm_pcie_recover_config(struct pci_dev *dev); /** * msm_pcie_shadow_control - control the shadowing of PCIe config space. * @dev: pci device structure * @enable: shadowing should be enabled or disabled * * This function gives PCIe endpoint device drivers the control to enable * or disable the shadowing of PCIe config space. * * Return: 0 on success, negative value on error */ int msm_pcie_shadow_control(struct pci_dev *dev, bool enable); #endif
arch/arm/mach-msm/pcie.c +28 −0 Original line number Diff line number Diff line Loading @@ -2259,3 +2259,31 @@ int msm_pcie_recover_config(struct pci_dev *dev) return ret; } EXPORT_SYMBOL(msm_pcie_recover_config); int msm_pcie_shadow_control(struct pci_dev *dev, bool enable) { int ret = 0; struct msm_pcie_dev_t *pcie_dev; if (dev) { pcie_dev = PCIE_BUS_PRIV_DATA(dev); PCIE_DBG(pcie_dev, "Recovery for the link of RC%d\n", pcie_dev->rc_idx); } else { pr_err("PCIe: the input pci dev is NULL.\n"); return -ENODEV; } PCIE_DBG(pcie_dev, "The shadowing of RC%d is %s enabled currently.\n", pcie_dev->rc_idx, pcie_dev->shadow_en ? "" : "not"); pcie_dev->shadow_en = enable; PCIE_DBG(pcie_dev, "Shadowing of RC%d is turned %s upon user's request.\n", pcie_dev->rc_idx, enable ? "on" : "off"); return ret; } EXPORT_SYMBOL(msm_pcie_shadow_control);