Преглед на файлове

qcacmn: Initial changes for york bring-up in target_if layer

Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: Ic28edc568c09aa5d43ba71393eca26479dd49463
CRs-Fixed: 3282639
Kannan Saravanan преди 2 години
родител
ревизия
a73234426a

+ 6 - 2
target_if/cfr/src/target_if_cfr.c

@@ -266,6 +266,8 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_MAPLE;
 		else if (target_type == TARGET_TYPE_QCN6122)
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_SPRUCE;
+		else if (target_type == TARGET_TYPE_QCN9160)
+			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_YORK;
 		else if (target_type == TARGET_TYPE_QCN9224)
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_WAIKIKI;
 		else if (target_type == TARGET_TYPE_QCA5332)
@@ -461,7 +463,8 @@ target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
 		   (target_type == TARGET_TYPE_QCN6122) ||
 		   (target_type == TARGET_TYPE_QCA5018) ||
 		   (target_type == TARGET_TYPE_QCA5332) ||
-		   (target_type == TARGET_TYPE_QCN9224)) {
+		   (target_type == TARGET_TYPE_QCN9224) ||
+		   (target_type == TARGET_TYPE_QCN9160)) {
 		pa->is_cfr_capable = cfr_sc->is_cfr_capable;
 		return cfr_enh_init_pdev(psoc, pdev);
 	} else
@@ -489,7 +492,8 @@ target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
 		   (target_type == TARGET_TYPE_QCN6122) ||
 		   (target_type == TARGET_TYPE_QCA5018) ||
 		   (target_type == TARGET_TYPE_QCA5332) ||
-		   (target_type == TARGET_TYPE_QCN9224)) {
+		   (target_type == TARGET_TYPE_QCN9224) ||
+		   (target_type == TARGET_TYPE_QCN9160)) {
 		return cfr_enh_deinit_pdev(psoc, pdev);
 	} else
 		return QDF_STATUS_E_NOSUPPORT;

+ 4 - 2
target_if/cfr/src/target_if_cfr_enh.c

@@ -716,7 +716,8 @@ static QDF_STATUS check_dma_length(struct look_up_table *lut,
 		    lut->payload_length <= PINE_MAX_DATA_LENGTH_BYTES) {
 			return QDF_STATUS_SUCCESS;
 		}
-	} else if (target_type == TARGET_TYPE_QCN6122) {
+	} else if (target_type == TARGET_TYPE_QCN6122 ||
+		   target_type == TARGET_TYPE_QCN9160) {
 		if (lut->header_length <= SPRUCE_MAX_HEADER_LENGTH_WORDS &&
 		    lut->payload_length <= SPRUCE_MAX_DATA_LENGTH_BYTES) {
 			return QDF_STATUS_SUCCESS;
@@ -2200,7 +2201,8 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc,
 		pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_MAPLE;
 		pcfr->chip_type = CFR_CAPTURE_RADIO_MAPLE;
 		pcfr->max_mu_users = MAPLE_CFR_MU_USERS;
-	} else if (target_type == TARGET_TYPE_QCN6122) {
+	} else if (target_type == TARGET_TYPE_QCN6122 ||
+		   target_type == TARGET_TYPE_QCN9160) {
 		pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_SPRUCE;
 		pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_SPRUCE;
 		pcfr->chip_type = CFR_CAPTURE_RADIO_SPRUCE;

+ 8 - 0
target_if/core/inc/target_if.h

@@ -567,6 +567,14 @@ bool target_is_tgt_type_qcn9000(uint32_t target_type);
  */
 bool target_is_tgt_type_qcn6122(uint32_t target_type);
 
+/**
+ * target_is_tgt_type_qcn9160() - Check if the target type is QCN9160 (york)
+ * @target_type: target type to be checked.
+ *
+ * Return: true if the target_type is QCN9160, else false.
+ */
+bool target_is_tgt_type_qcn9160(uint32_t target_type);
+
 /**
  * target_is_tgt_type_qcn7605() - Check if the target type is QCN7605
  * @target_type: target type to be checked.

+ 8 - 0
target_if/core/src/target_if_main.c

@@ -478,6 +478,9 @@ static void target_if_target_tx_ops_register(
 	target_tx_ops->tgt_is_tgt_type_qcn6122 =
 		target_is_tgt_type_qcn6122;
 
+	target_tx_ops->tgt_is_tgt_type_qcn9160 =
+		target_is_tgt_type_qcn9160;
+
 	target_tx_ops->tgt_is_tgt_type_qcn7605 =
 		target_is_tgt_type_qcn7605;
 
@@ -834,6 +837,11 @@ bool target_is_tgt_type_qcn6122(uint32_t target_type)
 	return target_type == TARGET_TYPE_QCN6122;
 }
 
+bool target_is_tgt_type_qcn9160(uint32_t target_type)
+{
+	return target_type == TARGET_TYPE_QCN9160;
+}
+
 bool target_is_tgt_type_qcn7605(uint32_t target_type)
 {
 	return target_type == TARGET_TYPE_QCN7605;

+ 2 - 0
target_if/init_deinit/src/service_ready_util.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022, Qualcomm Innovation Center, Inc. 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
@@ -966,6 +967,7 @@ QDF_STATUS init_deinit_validate_160_80p80_fw_caps(
 	if ((tgt_hdl->info.target_type == TARGET_TYPE_QCA8074) ||
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCA8074V2) ||
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCN6122) ||
+	    (tgt_hdl->info.target_type == TARGET_TYPE_QCN9160) ||
 	    (tgt_hdl->info.target_type == TARGET_TYPE_QCA6290)) {
 		/**
 		 * Return true for now. This is not available in

+ 8 - 0
target_if/spectral/target_if_spectral.c

@@ -2115,6 +2115,7 @@ target_if_init_spectral_param_min_max(
 				SPECTRAL_PARAM_FFT_SIZE_MAX_GEN3_DEFAULT;
 		if (target_type == TARGET_TYPE_QCN9000 ||
 		    target_type == TARGET_TYPE_QCN6122 ||
+		    target_type == TARGET_TYPE_QCN9160 ||
 		    target_type == TARGET_TYPE_QCA5018 ||
 		    target_type == TARGET_TYPE_QCA6490 ||
 		    target_type == TARGET_TYPE_KIWI ||
@@ -2477,6 +2478,7 @@ target_if_init_spectral_capability(struct target_if_spectral *spectral,
 	pcap->num_detectors_80mhz = 1;
 	if (target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
 	    target_type == TARGET_TYPE_KIWI ||
 	    target_type == TARGET_TYPE_MANGO) {
@@ -3133,6 +3135,7 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar,
 	    target_type == TARGET_TYPE_QCA9574 ||
 	    target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCA6750 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
@@ -3155,6 +3158,7 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar,
 	    target_type == TARGET_TYPE_QCA9574 ||
 	    target_type == TARGET_TYPE_QCA6018 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA5332 ||
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCN9000 ||
@@ -3200,6 +3204,7 @@ target_if_spectral_report_params_init(
 	 */
 	if (target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCA6750 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
@@ -3244,6 +3249,7 @@ target_if_spectral_report_params_init(
 	if (target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
 	    target_type == TARGET_TYPE_QCN9224 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
 	    target_type == TARGET_TYPE_KIWI ||
 	    target_type == TARGET_TYPE_MANGO) {
@@ -3657,6 +3663,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
 	    target_type == TARGET_TYPE_QCA5018 ||
 	    target_type == TARGET_TYPE_QCA6390 ||
 	    target_type == TARGET_TYPE_QCN6122 ||
+	    target_type == TARGET_TYPE_QCN9160 ||
 	    target_type == TARGET_TYPE_QCA6490 ||
 	    target_type == TARGET_TYPE_QCN9000 ||
 	    target_type == TARGET_TYPE_QCA6750 ||
@@ -3678,6 +3685,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev)
 	    (target_type == TARGET_TYPE_QCA5018) ||
 	    (target_type == TARGET_TYPE_QCA5332) ||
 	    (target_type == TARGET_TYPE_QCN6122) ||
+	    (target_type == TARGET_TYPE_QCN9160) ||
 	    (target_type == TARGET_TYPE_QCN9000) ||
 	    (target_type == TARGET_TYPE_QCA6290) ||
 	    (target_type == TARGET_TYPE_QCA6390) ||