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

Commit 75998d34 authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: controller: qcom: add debug mode parameter for debug control



Adding debug mode to enable MHI to operate in debug mode.

CRs-Fixed: 2281252
Change-Id: I9bfb5d2c809def6ca072359563871a1afbb52111
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent a44dccd8
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ static const struct firmware_info firmware_table[] = {
	{.fw_image = "debug.mbn"},
};

static int debug_mode;
module_param_named(debug_mode, debug_mode, int, 0644);

void mhi_deinit_pci_dev(struct mhi_controller *mhi_cntrl)
{
	struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
@@ -420,7 +423,9 @@ static struct mhi_controller *mhi_register_controller(struct pci_dev *pci_dev)

	for (i = 0; i < ARRAY_SIZE(firmware_table); i++) {
		firmware_info = firmware_table + i;
		if (mhi_cntrl->dev_id == firmware_info->dev_id)

		/* debug mode always use default */
		if (!debug_mode && mhi_cntrl->dev_id == firmware_info->dev_id)
			break;
	}

@@ -470,9 +475,11 @@ int mhi_pci_probe(struct pci_dev *pci_dev,
		goto error_init_pci;

	/* start power up sequence */
	if (!debug_mode) {
		ret = mhi_async_power_up(mhi_cntrl);
		if (ret)
			goto error_power_up;
	}

	pm_runtime_mark_last_busy(&pci_dev->dev);
	pm_runtime_allow(&pci_dev->dev);