qcacmn: Add config flag to use shadow registers

For platforms that don't use QMI and have firmware
enable shadow registers, host needs to ignore the
shadow register configuration it calculated.

Change-Id: I91a3d9a0c65172afde6a2ddab61651f9f8683aee
CRs-Fixed: 2003581
This commit is contained in:
Houston Hoffman 2017-01-31 10:45:07 -08:00 • committed by qcabuildsw
commit f60a3488d0
2 changed files with 16 additions and 2 deletions

View file

@ -963,7 +963,14 @@ static inline void hal_srng_hw_init(struct hal_soc *hal,
hal_srng_dst_hw_init(hal, srng);
}
#ifdef CONFIG_SHADOW_V2
#define ignore_shadow false
#define CHECK_SHADOW_REGISTERS true
#else
#define ignore_shadow true
#define CHECK_SHADOW_REGISTERS false
#endif
/**
* hal_srng_setup - Initalize HW SRNG ring.
* @hal_soc: Opaque HAL SOC handle
@ -1043,7 +1050,6 @@ void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
srng->flags |= HAL_SRNG_RING_PTR_SWAP;
#endif
#define ignore_shadow false
if (srng->ring_dir == HAL_SRNG_SRC_RING) {
srng->u.src_ring.hp = 0;
srng->u.src_ring.reap_hp = srng->ring_size -

View file

@ -2015,7 +2015,7 @@ void hif_get_target_ce_config(struct hif_softc *scn,
*shadow_cfg_sz_ret = shadow_cfg_sz;
}
#ifdef CONFIG_SHADOW_V2
static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg)
{
int i;
@ -2029,6 +2029,14 @@ static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg)
}
}
#else
static void hif_print_hal_shadow_register_cfg(struct pld_wlan_enable_cfg *cfg)
{
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"%s: CONFIG_SHADOW_V2 not defined\n", __func__);
}
#endif
/**
* hif_wlan_enable(): call the platform driver to enable wlan
* @scn: HIF Context