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

Commit 558cc7f7 authored by Ghanim Fodi's avatar Ghanim Fodi
Browse files

msm: ipa: Add support for IPA unit-test framework



Add IPA unit-test framework. The framework supports
definition and execution of tests that are grouped
into suites according to IPA functional blocks.
Debugfs file system is being used as a user interface.
An example test suite is added for reference.

Change-Id: Ide4ed54970c62f6485809c3bd63960536b4ace4f
CRs-Fixed: 1040200
Signed-off-by: default avatarGhanim Fodi <gfodi@codeaurora.org>
parent 8eefef21
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ config RMNET_IPA
	  It supports Embedded data transfer from A7 to Q6. Configures IPA HW
	  for RmNet Data Driver and also exchange of QMI messages between
	  A7 and Q6 IPA-driver.

config RMNET_IPA3
	tristate "IPA3 RMNET WWAN Network Device"
	depends on IPA3 && MSM_QMI_INTERFACE
@@ -183,6 +184,16 @@ config RMNET_IPA3
	  for RmNet Data Driver and also exchange of QMI messages between
	  A7 and Q6 IPA-driver.

config IPA_UT
	tristate "IPA Unit-Test Framework and Test Suites"
	depends on IPA3 && DEBUG_FS
	help
	  This Module implements IPA in-kernel test framework.
	  The framework supports defining and running tests, grouped
	  into suites according to the sub-unit of the IPA being tested.
	  The user interface to run and control the tests is debugfs file
	  system.

config SSM
	tristate "QTI Secure Service Module"
	depends on QSEECOM
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_IPA) += ipa_v2/ ipa_clients/ ipa_common
obj-$(CONFIG_IPA3) += ipa_v3/ ipa_clients/ ipa_common
obj-$(CONFIG_IPA_UT) += test/

ipa_common += ipa_api.o ipa_rm.o ipa_rm_dependency_graph.o ipa_rm_peers_list.o ipa_rm_resource.o ipa_rm_inactivity_timer.o
+44 −0
Original line number Diff line number Diff line
@@ -2415,6 +2415,50 @@ int ipa_stop_gsi_channel(u32 clnt_hdl)
}
EXPORT_SYMBOL(ipa_stop_gsi_channel);

/**
 * ipa_get_version_string() - Get string representation of IPA version
 * @ver: IPA version
 *
 * Return: Constant string representation
 */
const char *ipa_get_version_string(enum ipa_hw_type ver)
{
	const char *str;

	switch (ver) {
	case IPA_HW_v1_0:
		str = "1.0";
		break;
	case IPA_HW_v1_1:
		str = "1.1";
		break;
	case IPA_HW_v2_0:
		str = "2.0";
		break;
	case IPA_HW_v2_1:
		str = "2.1";
		break;
	case IPA_HW_v2_5:
		str = "2.5/2.6";
		break;
	case IPA_HW_v2_6L:
		str = "2.6L";
		break;
	case IPA_HW_v3_0:
		str = "3.0";
		break;
	case IPA_HW_v3_1:
		str = "3.1";
		break;
	default:
		str = "Invalid version";
		break;
	}

	return str;
}
EXPORT_SYMBOL(ipa_get_version_string);

static struct of_device_id ipa_plat_drv_match[] = {
	{ .compatible = "qcom,ipa", },
	{ .compatible = "qcom,ipa-smmu-ap-cb", },
+1 −0
Original line number Diff line number Diff line
@@ -348,5 +348,6 @@ int ipa_setup_uc_ntn_pipes(struct ipa_ntn_conn_in_params *in,
	struct ipa_ntn_conn_out_params *outp);

int ipa_tear_down_uc_offload_pipes(int ipa_ep_idx_ul, int ipa_ep_idx_dl);
const char *ipa_get_version_string(enum ipa_hw_type ver);

#endif /* _IPA_COMMON_I_H_ */
+6 −0
Original line number Diff line number Diff line
@@ -2072,6 +2072,12 @@ void ipa3_debugfs_remove(void)
	debugfs_remove_recursive(dent);
}

struct dentry *ipa_debugfs_get_root(void)
{
	return dent;
}
EXPORT_SYMBOL(ipa_debugfs_get_root);

#else /* !CONFIG_DEBUG_FS */
void ipa3_debugfs_init(void) {}
void ipa3_debugfs_remove(void) {}
Loading