msm: gsi: Define scratch reg for gsi v1 header

Define scratch register 6 & 7 for gsi v1 targets to avoid
compilation failure.
Derive the hw_type index after platform type and auto/mhi configs
are already stored in ipa3_ctx.

Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
This commit is contained in:
Akshay Pandit 2020-11-03 19:35:52 +05:30
commit d71a7a3641
2 changed files with 11 additions and 1 deletions

View file

@ -591,6 +591,16 @@
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
#define GSI_EE_n_GSI_CH_k_SCRATCH_6_OFFS(k, n) \
(GSI_GSI_REG_BASE_OFFS + 0x0000f048 + 0x4000 * (n) + 0x80 * (k))
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
#define GSI_EE_n_GSI_CH_k_SCRATCH_7_OFFS(k, n) \
(GSI_GSI_REG_BASE_OFFS + 0x0000f04c + 0x4000 * (n) + 0x80 * (k))
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_BMSK 0xffffffff
#define GSI_EE_n_GSI_CH_k_SCRATCH_3_SCRATCH_SHFT 0x0
#define GSI_EE_n_EV_CH_k_CNTXT_0_OFFS(k, n) \
(GSI_GSI_REG_BASE_OFFS + 0x0001d000 + 0x4000 * (n) + 0x80 * (k))
#define GSI_EE_n_EV_CH_k_CNTXT_0_ELEMENT_SIZE_BMSK 0xff000000

View file

@ -6995,7 +6995,6 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
ipa3_ctx->ipa_wrapper_size = resource_p->ipa_mem_size;
ipa3_ctx->ipa_hw_type = resource_p->ipa_hw_type;
ipa3_ctx->ipa_config_is_mhi = resource_p->ipa_mhi_dynamic_config;
ipa3_ctx->hw_type_index = ipa3_get_hw_type_index();
ipa3_ctx->ipa3_hw_mode = resource_p->ipa3_hw_mode;
ipa3_ctx->platform_type = resource_p->platform_type;
ipa3_ctx->use_ipa_teth_bridge = resource_p->use_ipa_teth_bridge;
@ -7052,6 +7051,7 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
ipa3_ctx->ipa_config_is_auto = resource_p->ipa_config_is_auto;
ipa3_ctx->manual_fw_load = resource_p->manual_fw_load;
ipa3_ctx->max_num_smmu_cb = resource_p->max_num_smmu_cb;
ipa3_ctx->hw_type_index = ipa3_get_hw_type_index();
if (resource_p->gsi_fw_file_name) {
ipa3_ctx->gsi_fw_file_name =