mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
qcacmn: Enable msi support for ext_group ring groupings
assign msi vectors to srng rings based on the ext_group they will be serviced in. provide support for ext_groups in hif_pci. Change-Id: If313fdb43b939871c0d73dea9a05f757427b5b16 CRs-Fixed: 2051911
This commit is contained in:
parent
811c917719
commit
648a918927
14 changed files with 553 additions and 186 deletions
|
|
@ -194,6 +194,15 @@ extern uint32_t hal_srng_get_entrysize(void *hal_soc, int ring_type);
|
|||
*/
|
||||
uint32_t hal_srng_max_entries(void *hal_soc, int ring_type);
|
||||
|
||||
/**
|
||||
* hal_srng_get_dir - Returns the direction of the ring
|
||||
* @hal_soc: Opaque HAL SOC handle
|
||||
* @ring_type: one of the types from hal_ring_type
|
||||
*
|
||||
* Return: Ring direction
|
||||
*/
|
||||
enum hal_srng_dir hal_srng_get_dir(void *hal_soc, int ring_type);
|
||||
|
||||
/* HAL memory information */
|
||||
struct hal_mem_info {
|
||||
/* dev base virutal addr */
|
||||
|
|
@ -306,6 +315,13 @@ extern void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
|
|||
*/
|
||||
extern void hal_srng_cleanup(void *hal_soc, void *hal_srng);
|
||||
|
||||
static inline bool hal_srng_initialized(void *hal_ring)
|
||||
{
|
||||
struct hal_srng *srng = (struct hal_srng *)hal_ring;
|
||||
|
||||
return !!srng->initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_srng_access_start_unlocked - Start ring access (unlocked). Should use
|
||||
* hal_srng_access_start if locked access is required
|
||||
|
|
|
|||
|
|
@ -840,9 +840,6 @@ static inline void hal_srng_src_hw_init(struct hal_soc *hal,
|
|||
SRNG_SRC_REG_WRITE(srng, MSI1_DATA, srng->msi_data);
|
||||
}
|
||||
|
||||
HIF_INFO("%s: hw_init srng (msi_end) %d", __func__, srng->ring_id);
|
||||
|
||||
|
||||
SRNG_SRC_REG_WRITE(srng, BASE_LSB, srng->ring_base_paddr & 0xffffffff);
|
||||
reg_val = SRNG_SM(SRNG_SRC_FLD(BASE_MSB, RING_BASE_ADDR_MSB),
|
||||
((uint64_t)(srng->ring_base_paddr) >> 32)) |
|
||||
|
|
@ -983,8 +980,6 @@ static inline void hal_srng_dst_hw_init(struct hal_soc *hal,
|
|||
SRNG_DST_REG_WRITE(srng, MSI1_DATA, srng->msi_data);
|
||||
}
|
||||
|
||||
HIF_INFO("%s: hw_init srng msi end %d", __func__, srng->ring_id);
|
||||
|
||||
SRNG_DST_REG_WRITE(srng, BASE_LSB, srng->ring_base_paddr & 0xffffffff);
|
||||
reg_val = SRNG_SM(SRNG_DST_FLD(BASE_MSB, RING_BASE_ADDR_MSB),
|
||||
((uint64_t)(srng->ring_base_paddr) >> 32)) |
|
||||
|
|
@ -1227,6 +1222,8 @@ void *hal_srng_setup(void *hal_soc, int ring_type, int ring_num,
|
|||
|
||||
SRNG_LOCK_INIT(&srng->lock);
|
||||
|
||||
srng->initialized = true;
|
||||
|
||||
return (void *)srng;
|
||||
}
|
||||
|
||||
|
|
@ -1268,6 +1265,14 @@ uint32_t hal_srng_max_entries(void *hal_soc, int ring_type)
|
|||
return SRNG_MAX_SIZE_DWORDS / ring_config->entry_size;
|
||||
}
|
||||
|
||||
enum hal_srng_dir hal_srng_get_dir(void *hal_soc, int ring_type)
|
||||
{
|
||||
struct hal_hw_srng_config *ring_config =
|
||||
HAL_SRNG_CONFIG(hal, ring_type);
|
||||
|
||||
return ring_config->ring_dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_get_srng_params - Retreive SRNG parameters for a given ring from HAL
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue