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

Commit 699fd2ab 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 e94b446e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ config IPA3
	  Kernel and user-space processes can call the IPA driver
	  to configure IPA core.


config RMNET_IPA3
	tristate "IPA3 RMNET WWAN Network Device"
	depends on IPA3 && MSM_QMI_INTERFACE
@@ -124,6 +123,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
@@ -2533,6 +2533,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
@@ -355,5 +355,6 @@ u8 *ipa_write_16(u16 hw, u8 *dest);
u8 *ipa_write_8(u8 b, u8 *dest);
u8 *ipa_pad_to_64(u8 *dest);
u8 *ipa_pad_to_32(u8 *dest);
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
@@ -2131,6 +2131,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