qcacmn: Initialize command/credit ring for qca8074 & qcn9000
Initialize command/credit ring for qca8074 & qcn9000. Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1 CRs-fixed: 2562649
This commit is contained in:

committed by
nshrivas

orang tua
7e0bf6da72
melakukan
2bf9b7a18a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -212,3 +212,32 @@ static void hal_tx_desc_set_lmac_id_8074v2(void *desc, uint8_t lmac_id)
|
||||
HAL_TX_SM(TCL_DATA_CMD_4, LMAC_ID, lmac_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_tx_init_cmd_credit_ring_8074v2() - Initialize command/credit SRNG
|
||||
* @hal_soc_hdl: Handle to HAL SoC structure
|
||||
* @hal_srng: Handle to HAL SRNG structure
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static inline void hal_tx_init_cmd_credit_ring_8074v2(hal_soc_handle_t hal_soc_hdl,
|
||||
hal_ring_handle_t hal_ring_hdl)
|
||||
{
|
||||
uint8_t *desc_addr;
|
||||
struct hal_srng_params srng_params;
|
||||
uint32_t desc_size;
|
||||
uint32_t num_desc;
|
||||
|
||||
hal_get_srng_params(hal_soc_hdl, hal_ring_hdl, &srng_params);
|
||||
|
||||
desc_addr = (uint8_t *)srng_params.ring_base_vaddr;
|
||||
desc_size = sizeof(struct tcl_data_cmd);
|
||||
num_desc = srng_params.num_entries;
|
||||
|
||||
while (num_desc) {
|
||||
/* using CMD/CREDIT Ring to send DATA CMD tag */
|
||||
HAL_TX_DESC_SET_TLV_HDR(desc_addr, WIFITCL_DATA_CMD_E,
|
||||
desc_size);
|
||||
desc_addr += (desc_size + sizeof(struct tlv_32_hdr));
|
||||
num_desc--;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user