qcacmn: Retain ds ring indices across wifi restart
Retain ds ring indices across wifi restart to avoid edma hang. Fetch the indices from ds module and set the corresponding ds ring indices. Change-Id: Ia299a7006166aef096c7d2c1f65f6bef65415a37 CRs-Fixed: 3332152
This commit is contained in:

committed by
Madan Koyyalamudi

parent
4f77d1f3c1
commit
a2ddd8956b
@@ -1102,7 +1102,34 @@ bool hal_srng_is_near_full_irq_supported(hal_soc_handle_t hal_soc,
|
||||
* NULL on failure (if given ring is not available)
|
||||
*/
|
||||
extern void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
|
||||
int mac_id, struct hal_srng_params *ring_params, bool idle_check);
|
||||
int mac_id, struct hal_srng_params *ring_params,
|
||||
bool idle_check);
|
||||
|
||||
/**
|
||||
* hal_srng_setup_idx - Initialize HW SRNG ring.
|
||||
*
|
||||
* @hal_soc: Opaque HAL SOC handle
|
||||
* @ring_type: one of the types from hal_ring_type
|
||||
* @ring_num: Ring number if there are multiple rings of
|
||||
* same type (staring from 0)
|
||||
* @mac_id: valid MAC Id should be passed if ring type is one of lmac rings
|
||||
* @ring_params: SRNG ring params in hal_srng_params structure.
|
||||
* @idle_check: Check if ring is idle
|
||||
* @idx: Ring index
|
||||
|
||||
* Callers are expected to allocate contiguous ring memory of size
|
||||
* 'num_entries * entry_size' bytes and pass the physical and virtual base
|
||||
* addresses through 'ring_base_paddr' and 'ring_base_vaddr' in hal_srng_params
|
||||
* structure. Ring base address should be 8 byte aligned and size of each ring
|
||||
* entry should be queried using the API hal_srng_get_entrysize
|
||||
*
|
||||
* Return: Opaque pointer to ring on success
|
||||
* NULL on failure (if given ring is not available)
|
||||
*/
|
||||
extern void *hal_srng_setup_idx(void *hal_soc, int ring_type, int ring_num,
|
||||
int mac_id, struct hal_srng_params *ring_params,
|
||||
bool idle_check, uint32_t idx);
|
||||
|
||||
|
||||
/* Remapping ids of REO rings */
|
||||
#define REO_REMAP_TCL 0
|
||||
@@ -2712,11 +2739,13 @@ uint32_t hal_get_target_type(hal_soc_handle_t hal_soc_hdl);
|
||||
* @hal_soc: HAL SOC handle
|
||||
* @srng: SRNG ring pointer
|
||||
* @idle_check: Check if ring is idle
|
||||
* @idx: Ring index
|
||||
*/
|
||||
static inline void hal_srng_dst_hw_init(struct hal_soc *hal,
|
||||
struct hal_srng *srng, bool idle_check)
|
||||
struct hal_srng *srng, bool idle_check,
|
||||
uint16_t idx)
|
||||
{
|
||||
hal->ops->hal_srng_dst_hw_init(hal, srng, idle_check);
|
||||
hal->ops->hal_srng_dst_hw_init(hal, srng, idle_check, idx);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2725,11 +2754,13 @@ static inline void hal_srng_dst_hw_init(struct hal_soc *hal,
|
||||
* @hal_soc: HAL SOC handle
|
||||
* @srng: SRNG ring pointer
|
||||
* @idle_check: Check if ring is idle
|
||||
* @idx: Ring index
|
||||
*/
|
||||
static inline void hal_srng_src_hw_init(struct hal_soc *hal,
|
||||
struct hal_srng *srng, bool idle_check)
|
||||
struct hal_srng *srng, bool idle_check,
|
||||
uint16_t idx)
|
||||
{
|
||||
hal->ops->hal_srng_src_hw_init(hal, srng, idle_check);
|
||||
hal->ops->hal_srng_src_hw_init(hal, srng, idle_check, idx);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user