qcacmn: Change Shadow Register configuration for QCA6390

- Change the SR mapping address for QCA6390
- Use ring direction field from HAL ring config instead of HAL ring
  directly as ring is not yet initialized here.

Change-Id: I900b2329367cc02ae2f9d7f164e5f867d8253d90
CRs-Fixed: 2299919
This commit is contained in:
Pramod Simha
2018-08-14 11:58:29 -07:00
committed by nshrivas
parent 8ebfe83d1f
commit 627278cdfe
2 changed files with 7 additions and 1 deletions

View File

@@ -78,7 +78,11 @@
#define HAL_SRNG_REO_ALTERNATE_SELECT 0x7
/* calculate the register address offset from bar0 of shadow register x */
#ifdef QCA_WIFI_QCA6390
#define SHADOW_REGISTER(x) (0x000008FC + (4 * (x)))
#else
#define SHADOW_REGISTER(x) (0x00003024 + (4 * (x)))
#endif
/* TODO: Check if the following can be provided directly by HW headers */
#define SRNG_LOOP_CNT_MASK REO_DESTINATION_RING_15_LOOPING_COUNT_MASK

View File

@@ -84,6 +84,8 @@ static void hal_update_srng_hp_tp_address(void *hal_soc,
struct hal_srng *srng;
struct hal_soc *hal = (struct hal_soc *)hal_soc;
int ring_id;
struct hal_hw_srng_config *ring_config =
HAL_SRNG_CONFIG(hal, ring_type);
ring_id = hal_get_srng_ring_id(hal_soc, ring_type, ring_num, 0);
if (ring_id < 0)
@@ -91,7 +93,7 @@ static void hal_update_srng_hp_tp_address(void *hal_soc,
srng = hal_get_srng(hal_soc, ring_id);
if (srng->ring_dir == HAL_SRNG_DST_RING)
if (ring_config->ring_dir == HAL_SRNG_DST_RING)
srng->u.dst_ring.tp_addr = SHADOW_REGISTER(shadow_config_index)
+ hal->dev_base_addr;
else