Эх сурвалжийг харах

qcacmn: Hif changes for umac reset in QCA5332

Add hif changes for umac reset in QCA5332. Changes are done to read the
umac reset IPC number from dst and request irq for the same.

Change-Id: I0feafb06ef63f37c3ae6db0270bd5ed50debd91d
CRs-Fixed: 3401146
Nandha Kishore Easwaran 2 жил өмнө
parent
commit
f2ffa7ab59

+ 9 - 1
hif/inc/hif.h

@@ -136,7 +136,6 @@ enum hif_ic_irq {
 	txmon2host_monitor_destination_mac2,
 	txmon2host_monitor_destination_mac1,
 	host2tx_monitor_ring1,
-	umac_reset,
 };
 
 #ifdef QCA_SUPPORT_LEGACY_INTERRUPTS
@@ -2566,6 +2565,8 @@ QDF_STATUS hif_register_umac_reset_handler(struct hif_opaque_softc *hif_scn,
  * Return: QDF_STATUS of operation
  */
 QDF_STATUS hif_unregister_umac_reset_handler(struct hif_opaque_softc *hif_scn);
+QDF_STATUS hif_get_umac_reset_irq(struct hif_opaque_softc *hif_scn,
+				  int *umac_reset_irq);
 #else
 static inline
 QDF_STATUS hif_register_umac_reset_handler(struct hif_opaque_softc *hif_scn,
@@ -2581,6 +2582,13 @@ QDF_STATUS hif_unregister_umac_reset_handler(struct hif_opaque_softc *hif_scn)
 	return QDF_STATUS_SUCCESS;
 }
 
+static inline
+QDF_STATUS hif_get_umac_reset_irq(struct hif_opaque_softc *hif_scn,
+				  int *umac_reset_irq)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
 #endif /* DP_UMAC_HW_RESET_SUPPORT */
 
 #ifdef FEATURE_DIRECT_LINK

+ 23 - 0
hif/src/hif_exec.c

@@ -22,6 +22,9 @@
 #include "qdf_module.h"
 #include "qdf_net_if.h"
 #include <pld_common.h>
+#ifdef DP_UMAC_HW_RESET_SUPPORT
+#include "if_pci.h"
+#endif
 
 /* mapping NAPI budget 0 to internal budget 0
  * NAPI budget 1 to internal budget [1,scaler -1]
@@ -1193,6 +1196,26 @@ static irqreturn_t hif_umac_reset_irq_handler(int irq, void *ctx)
 	return IRQ_HANDLED;
 }
 
+QDF_STATUS hif_get_umac_reset_irq(struct hif_opaque_softc *hif_scn,
+				  int *umac_reset_irq)
+{
+	int ret;
+	struct hif_softc *hif_sc = HIF_GET_SOFTC(hif_scn);
+	struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_sc);
+	struct platform_device *pdev = (struct platform_device *)sc->pdev;
+
+	ret = pfrm_get_irq(&pdev->dev, (struct qdf_pfm_hndl *)pdev,
+			   "umac_reset", 0, umac_reset_irq);
+
+	if (ret) {
+		hif_err("umac reset get irq failed ret %d\n", ret);
+		return QDF_STATUS_E_FAILURE;
+	}
+	return QDF_STATUS_SUCCESS;
+}
+
+qdf_export_symbol(hif_get_umac_reset_irq);
+
 QDF_STATUS hif_register_umac_reset_handler(struct hif_opaque_softc *hif_scn,
 					   int (*handler)(void *cb_ctx),
 					   void *cb_ctx, int irq)

+ 0 - 1
hif/src/snoc/if_ahb.c

@@ -106,7 +106,6 @@ const char *ic_irqname[HIF_IC_MAX_IRQ] = {
 "txmon2host-monitor-destination-mac2",
 "txmon2host-monitor-destination-mac1",
 "host2tx-monitor-ring1",
-"umac_reset"
 };
 
 /**