mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
PCI: rockchip: dw: Add PCIE_DW_ROCKCHIP_RC_DMATEST macro limit for dma test unregister
Change-Id: Id9ba68883db0045f4709f8bd59d52914e66babfe Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -573,13 +573,13 @@ static int rk_pcie_init_dma_trx(struct rk_pcie *rk_pcie)
|
||||
if (!rk_pcie_udma_enabled(rk_pcie))
|
||||
return 0;
|
||||
|
||||
#ifdef PCIE_DW_ROCKCHIP_RC_DMATEST
|
||||
rk_pcie->dma_obj = pcie_dw_dmatest_register(rk_pcie->pci->dev, true);
|
||||
if (IS_ERR(rk_pcie->dma_obj)) {
|
||||
dev_err(rk_pcie->pci->dev, "failed to prepare dmatest\n");
|
||||
return -EINVAL;
|
||||
if (IS_ENABLED(CONFIG_PCIE_DW_ROCKCHIP_RC_DMATEST)) {
|
||||
rk_pcie->dma_obj = pcie_dw_dmatest_register(rk_pcie->pci->dev, true);
|
||||
if (IS_ERR(rk_pcie->dma_obj)) {
|
||||
dev_err(rk_pcie->pci->dev, "failed to prepare dmatest\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!rk_pcie->dma_obj)
|
||||
return 0;
|
||||
@@ -1802,7 +1802,8 @@ static int rk_pcie_remove(struct platform_device *pdev)
|
||||
dw_pcie_host_deinit(&rk_pcie->pci->pp);
|
||||
rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_INTR_MASK, 0xffffffff);
|
||||
destroy_workqueue(rk_pcie->hot_rst_wq);
|
||||
pcie_dw_dmatest_unregister(rk_pcie->dma_obj);
|
||||
if (IS_ENABLED(CONFIG_PCIE_DW_ROCKCHIP_RC_DMATEST))
|
||||
pcie_dw_dmatest_unregister(rk_pcie->dma_obj);
|
||||
rockchip_pcie_debugfs_exit(rk_pcie);
|
||||
if (rk_pcie->irq_domain) {
|
||||
int virq, j;
|
||||
|
||||
Reference in New Issue
Block a user