qcacmn: Initialize command/credit ring for qca8074 & qcn9000

Initialize command/credit ring for qca8074 & qcn9000.

Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1
CRs-fixed: 2562649
Этот коммит содержится в:
Ankit Kumar
2019-10-29 10:29:00 +05:30
коммит произвёл nshrivas
родитель 7e0bf6da72
Коммит 2bf9b7a18a
20 изменённых файлов: 214 добавлений и 17 удалений

Просмотреть файл

@@ -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
@@ -144,3 +144,33 @@ void hal_tx_update_dscp_tid_8074(struct hal_soc *soc, uint8_t tid,
static void hal_tx_desc_set_lmac_id_8074(void *desc, uint8_t lmac_id)
{
}
/**
* hal_tx_init_cmd_credit_ring_8074v1() - 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_8074v1(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--;
}
}