Prechádzať zdrojové kódy

qcacld-3.0: Add shadow register version 2 structures in PLD

These version 2 shadow registers are filled by HIF and sent to firmware
through QMI for QCA6290 chipset.

Change-Id: I92edb4140f707a933dacbe982eb4da167841b501
CRs-fixed: 1107457
Yue Ma 8 rokov pred
rodič
commit
502a28fa0f
2 zmenil súbory, kde vykonal 19 pridanie a 1 odobranie
  1. 16 1
      core/pld/inc/pld_common.h
  2. 3 0
      core/pld/src/pld_pcie.c

+ 16 - 1
core/pld/inc/pld_common.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -178,6 +178,17 @@ struct pld_shadow_reg_cfg {
 	u16 reg_offset;
 };
 
+/**
+ * struct pld_shadow_reg_v2_cfg - shadow register version 2 configuration
+ * @addr: shadow register physical address
+ *
+ * pld_shadow_reg_v2_cfg is used to store shadow register version 2
+ * configuration.
+ */
+struct pld_shadow_reg_v2_cfg {
+	u32 addr;
+};
+
 /**
  * struct pld_wlan_enable_cfg - WLAN FW configuration
  * @num_ce_tgt_cfg: number of CE target configuration
@@ -186,6 +197,8 @@ struct pld_shadow_reg_cfg {
  * @ce_svc_cfg: CE service configuration
  * @num_shadow_reg_cfg: number of shadow register configuration
  * @shadow_reg_cfg: shadow register configuration
+ * @num_shadow_reg_v2_cfg: number of shadow register version 2 configuration
+ * @shadow_reg_v2_cfg: shadow register version 2 configuration
  *
  * pld_wlan_enable_cfg stores WLAN FW configurations. It will be
  * passed to WLAN FW when WLAN host driver calls wlan_enable.
@@ -197,6 +210,8 @@ struct pld_wlan_enable_cfg {
 	struct pld_ce_svc_pipe_cfg *ce_svc_cfg;
 	u32 num_shadow_reg_cfg;
 	struct pld_shadow_reg_cfg *shadow_reg_cfg;
+	u32 num_shadow_reg_v2_cfg;
+	struct pld_shadow_reg_v2_cfg *shadow_reg_v2_cfg;
 };
 
 /**

+ 3 - 0
core/pld/src/pld_pcie.c

@@ -381,6 +381,9 @@ int pld_pcie_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
 	cfg.num_shadow_reg_cfg = config->num_shadow_reg_cfg;
 	cfg.shadow_reg_cfg = (struct cnss_shadow_reg_cfg *)
 		config->shadow_reg_cfg;
+	cfg.num_shadow_reg_v2_cfg = config->num_shadow_reg_v2_cfg;
+	cfg.shadow_reg_v2_cfg = (struct cnss_shadow_reg_v2_cfg *)
+		config->shadow_reg_v2_cfg;
 
 	switch (mode) {
 	case PLD_FTM: