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

Commit c964d81a authored by Amir Levy's avatar Amir Levy Committed by Gidon Studinski
Browse files

msm: ipa3: update IPA BCR register values



Set IPA BCR register value according to HW type.
BCR register values are taken from IPA HPG and should
correlate with the relevant IPAv3.x HW type.

CRs-Fixed: 1048435
Change-Id: I5ece4a5676cf1d2fae4a5276da5833272cd95ecb
Signed-off-by: default avatarAmir Levy <alevy@codeaurora.org>
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 64120cd2
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
};