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

Commit 3253b953 authored by Rishabh Bhatnagar's avatar Rishabh Bhatnagar
Browse files

drivers: esoc: Add support for sm8150 + chitwan target



Modify esoc driver to introduce new compatible and fops
for sdxchitwan.

Change-Id: Ieb2c6c3ba6a05cf879c0b2c53cbf995540898774
Signed-off-by: default avatarRishabh Bhatnagar <rishabhb@codeaurora.org>
parent 219051b4
Loading
Loading
Loading
Loading
+29 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 2017-2018, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1071,6 +1071,26 @@ static int sdxprairie_setup_hw(struct mdm_ctrl *mdm,
	return ret;
}

static int sdxchitwan_setup_hw(struct mdm_ctrl *mdm,
					const struct mdm_ops *ops,
					struct platform_device *pdev)
{
	int ret;

	/* Same configuration as that of sdx50, except for the name */
	ret = sdx50m_setup_hw(mdm, ops, pdev);
	if (ret) {
		dev_err(mdm->dev, "Hardware setup failed for sdxchitwan\n");
		esoc_mdm_log("Hardware setup failed for sdxchitwan\n");
		return ret;
	}

	mdm->esoc->name = SDXCHITWAN_LABEL;
	esoc_mdm_log("Hardware setup done for sdxchitwan\n");

	return ret;
}

static struct esoc_clink_ops mdm_cops = {
	.cmd_exe = mdm_cmd_exe,
	.get_status = mdm_get_status,
@@ -1096,6 +1116,12 @@ static struct mdm_ops sdxprairie_ops = {
	.pon_ops = &sdx50m_pon_ops,
};

static struct mdm_ops sdxchitwan_ops = {
	.clink_ops = &mdm_cops,
	.config_hw = sdxchitwan_setup_hw,
	.pon_ops = &sdx50m_pon_ops,
};

static const struct of_device_id mdm_dt_match[] = {
	{ .compatible = "qcom,ext-mdm9x55",
		.data = &mdm9x55_ops, },
@@ -1103,6 +1129,8 @@ static const struct of_device_id mdm_dt_match[] = {
		.data = &sdx50m_ops, },
	{ .compatible = "qcom,ext-sdxprairie",
		.data = &sdxprairie_ops, },
	{ .compatible = "qcom,ext-sdxchitwan",
		.data = &sdxchitwan_ops, },
	{},
};
MODULE_DEVICE_TABLE(of, mdm_dt_match);
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 2017-2018, 2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -32,6 +32,7 @@
#define SDX50M_LABEL			"SDX50M"
#define SDX50M_PCIE			"PCIe"
#define SDXPRAIRIE_LABEL		"SDXPRAIRIE"
#define SDXCHITWAN_LABEL		"SDXCHITWAN"
#define MDM2AP_STATUS_TIMEOUT_MS	120000L
#define MDM_MODEM_TIMEOUT		3000
#define DEF_RAMDUMP_TIMEOUT		120000