ep_pcie: core: Initialize the edma only after successful enumeration
If enumeration fails all the resources will be turned off and then if try to access at that point system is crashing. Change-Id: I3b0a5c02df84671dc96bcb6e99de2ff4ea1ee069 Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
This commit is contained in:
parent
d65ddb2c3d
commit
823e37ac3c
@ -1391,6 +1391,11 @@ static void ep_pcie_enumeration_complete(struct ep_pcie_dev_t *dev)
|
|||||||
dev->rev);
|
dev->rev);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&dev->isr_lock, irqsave_flags);
|
||||||
|
qcom_edma_init(&dev->pdev->dev);
|
||||||
|
spin_lock_irqsave(&dev->isr_lock, irqsave_flags);
|
||||||
|
|
||||||
dev->enumerated = true;
|
dev->enumerated = true;
|
||||||
dev->link_status = EP_PCIE_LINK_ENABLED;
|
dev->link_status = EP_PCIE_LINK_ENABLED;
|
||||||
|
|
||||||
@ -3477,7 +3482,6 @@ static int ep_pcie_probe(struct platform_device *pdev)
|
|||||||
EP_PCIE_ERR(&ep_pcie_dev,
|
EP_PCIE_ERR(&ep_pcie_dev,
|
||||||
"PCIe V%d: failed to init GPIO\n",
|
"PCIe V%d: failed to init GPIO\n",
|
||||||
ep_pcie_dev.rev);
|
ep_pcie_dev.rev);
|
||||||
ep_pcie_release_resources(&ep_pcie_dev);
|
|
||||||
goto gpio_failure;
|
goto gpio_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3486,8 +3490,6 @@ static int ep_pcie_probe(struct platform_device *pdev)
|
|||||||
EP_PCIE_ERR(&ep_pcie_dev,
|
EP_PCIE_ERR(&ep_pcie_dev,
|
||||||
"PCIe V%d: failed to init IRQ\n",
|
"PCIe V%d: failed to init IRQ\n",
|
||||||
ep_pcie_dev.rev);
|
ep_pcie_dev.rev);
|
||||||
ep_pcie_release_resources(&ep_pcie_dev);
|
|
||||||
ep_pcie_gpio_deinit(&ep_pcie_dev);
|
|
||||||
goto irq_failure;
|
goto irq_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3521,7 +3523,6 @@ static int ep_pcie_probe(struct platform_device *pdev)
|
|||||||
atomic_notifier_chain_register(&panic_notifier_list,
|
atomic_notifier_chain_register(&panic_notifier_list,
|
||||||
&ep_pcie_core_panic_notifier);
|
&ep_pcie_core_panic_notifier);
|
||||||
|
|
||||||
qcom_edma_init(&pdev->dev);
|
|
||||||
|
|
||||||
if (!ep_pcie_dev.perst_enum)
|
if (!ep_pcie_dev.perst_enum)
|
||||||
enable_irq(ep_pcie_dev.irq[EP_PCIE_INT_GLOBAL].num);
|
enable_irq(ep_pcie_dev.irq[EP_PCIE_INT_GLOBAL].num);
|
||||||
|
Loading…
Reference in New Issue
Block a user