Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb74174b authored by ankusa's avatar ankusa Committed by Nitesh Kataria
Browse files

msm: pcie: add parallelization support for pcie msm probe



Few systems need less kernel boot time. Add support for
msm_pcie_probe to run as thread that can parallelize the
system bootup and helps in reducing boot time.

Change-Id: I51d96dea89e29559d9d06ad1cade6f12476baafb
Signed-off-by: default avatarankusa <ankusa@codeaurora.org>
parent 1e8f2043
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
#include <linux/compiler.h>
#include <linux/ipc_logging.h>
#include <linux/msm_pcie.h>
#include <linux/kthread.h>

#define PCIE_VENDOR_ID_QCOM		0x17cb

@@ -5661,12 +5662,14 @@ static void msm_pcie_check_l1ss_support_all(struct msm_pcie_dev_t *dev)
	pci_walk_bus(dev->dev->bus, msm_pcie_check_l1ss_support, dev);
}

static int msm_pcie_probe(struct platform_device *pdev)
static int __msm_pcie_probe(void *arg)
{
	int ret = 0;
	int rc_idx = -1;
	int i, j;
	struct platform_device *pdev;

	pdev = (struct platform_device *)arg;
	PCIE_GEN_DBG("%s\n", __func__);

	mutex_lock(&pcie_drv.drv_lock);
@@ -6145,6 +6148,24 @@ static int msm_pcie_probe(struct platform_device *pdev)
	return ret;
}

static int msm_pcie_probe(struct platform_device *pdev)
{
#ifdef CONFIG_PLATFORM_AUTO
	struct task_struct *msm_pcie_task =
			kthread_run(__msm_pcie_probe, pdev,
					"msm_pcie_probe");
	if (IS_ERR(msm_pcie_task))
		return PTR_ERR(msm_pcie_task);
	else
		return 0;
#else
	int ret = 0;

	ret = __msm_pcie_probe(pdev);
	return ret;
#endif
}

static int msm_pcie_remove(struct platform_device *pdev)
{
	int ret = 0;