qcacld-3.0: Move Targetdef from ol_softc to ol_context
Targetdef is needed during BMI phase of PLL switching.
Move this member to ol_context.
Change-Id: Ibd7d9a916d9e61c1f7c13d4e18d018add94a6fa3
CRs-Fixed: 967765
diff --git a/core/bmi/src/bmi.c b/core/bmi/src/bmi.c
index c3fd046..e1b01c4 100644
--- a/core/bmi/src/bmi.c
+++ b/core/bmi/src/bmi.c
@@ -543,6 +543,7 @@
ol_info->cdf_dev = cdf_dev;
ol_info->scn = hif_ctx;
+ ol_info->tgt_def.targetdef = hif_get_targetdef(hif_ctx);
cdf_create_work(&ol_info->ramdump_work, ramdump_work_handler, ol_info);
diff --git a/core/bmi/src/i_bmi.h b/core/bmi/src/i_bmi.h
index 007bc61..f9271a8 100644
--- a/core/bmi/src/i_bmi.h
+++ b/core/bmi/src/i_bmi.h
@@ -133,6 +133,9 @@
cdf_device_t cdf_dev;
struct ol_softc *scn;
cdf_work_t ramdump_work;
+ struct targetdef_t {
+ struct targetdef_s *targetdef;
+ } tgt_def;
};
CDF_STATUS bmi_execute(uint32_t address, uint32_t *param,
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index 78cd3a8..a18c055 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -887,7 +887,7 @@
CDF_STATUS ol_patch_pll_switch(struct ol_context *ol_ctx)
{
- struct ol_softc *scn = ol_ctx->scn;
+ struct ol_softc *hif = ol_ctx->scn;
CDF_STATUS status = CDF_STATUS_SUCCESS;
uint32_t addr = 0;
uint32_t reg_val = 0;
@@ -896,8 +896,9 @@
uint32_t cmnos_core_clk_div_addr = 0;
uint32_t cmnos_cpu_pll_init_done_addr = 0;
uint32_t cmnos_cpu_speed_addr = 0;
- struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
+ struct hif_target_info *tgt_info = hif_get_target_info_handle(hif);
uint32_t target_version = tgt_info->target_version;
+ struct targetdef_t *scn = &ol_ctx->tgt_def;
switch (target_version) {
case AR6320_REV1_1_VERSION: