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

Commit 1735c856 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: update IPA BCR register values"

parents 96e6f66d c964d81a
Loading
Loading
Loading
Loading
+20 −3
Original line number Diff line number Diff line
@@ -39,7 +39,9 @@
#define IPA_TAG_SLEEP_MIN_USEC (1000)
#define IPA_TAG_SLEEP_MAX_USEC (2000)
#define IPA_FORCE_CLOSE_TAG_PROCESS_TIMEOUT (10 * HZ)
#define IPA_BCR_REG_VAL (0x00000001)
#define IPA_BCR_REG_VAL_v3_0 (0x00000001)
#define IPA_BCR_REG_VAL_v3_1 (0x00000003)
#define IPA_BCR_REG_VAL_v3_5_1 (0x0000003B)
#define IPA_AGGR_GRAN_MIN (1)
#define IPA_AGGR_GRAN_MAX (32)
#define IPA_EOT_COAL_GRAN_MIN (1)
@@ -857,14 +859,29 @@ void ipa3_cfg_qsb(void)
int ipa3_init_hw(void)
{
	u32 ipa_version = 0;
	u32 val;

	/* Read IPA version and make sure we have access to the registers */
	ipa_version = ipahal_read_reg(IPA_VERSION);
	if (ipa_version == 0)
		return -EFAULT;

	/* using old BCR configuration(IPAv2.6)*/
	ipahal_write_reg(IPA_BCR, IPA_BCR_REG_VAL);
	switch (ipa3_ctx->ipa_hw_type) {
	case IPA_HW_v3_0:
		val = IPA_BCR_REG_VAL_v3_0;
		break;
	case IPA_HW_v3_1:
		val = IPA_BCR_REG_VAL_v3_1;
		break;
	case IPA_HW_v3_5_1:
		val = IPA_BCR_REG_VAL_v3_5_1;
		break;
	default:
		IPAERR("unknown HW type in dts\n");
		return -EFAULT;
	}

	ipahal_write_reg(IPA_BCR, val);

	ipa3_cfg_qsb();

+5 −0
Original line number Diff line number Diff line
@@ -439,6 +439,9 @@ enum ipa_rm_resource_name {
 * @IPA_HW_v2_6: IPA hardware version 2.6
 * @IPA_HW_v2_6L: IPA hardware version 2.6L
 * @IPA_HW_v3_0: IPA hardware version 3.0
 * @IPA_HW_v3_1: IPA hardware version 3.1
 * @IPA_HW_v3_5: IPA hardware version 3.5
 * @IPA_HW_v3_5_1: IPA hardware version 3.5.1
 */
enum ipa_hw_type {
	IPA_HW_None = 0,
@@ -451,6 +454,8 @@ enum ipa_hw_type {
	IPA_HW_v2_6L = 6,
	IPA_HW_v3_0 = 10,
	IPA_HW_v3_1 = 11,
	IPA_HW_v3_5 = 12,
	IPA_HW_v3_5_1 = 13,
	IPA_HW_MAX
};