qcacmn: Add USB bus support (HIF Common)
Add module specific changes for USB bus support.
Change-Id: I98ca380567c279d3206aa4afc7a28c2feeb65993
CRs-Fixed: 1023663
diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c
index 885462d..abdb158 100644
--- a/hif/src/hif_main.c
+++ b/hif/src/hif_main.c
@@ -39,13 +39,13 @@
#include "hif_main.h"
#include "hif_hw_version.h"
#if defined(HIF_PCI) || defined(HIF_SNOC) || defined(HIF_AHB)
-#include "ce_api.h"
#include "ce_tasklet.h"
#endif
#include "qdf_trace.h"
#include "qdf_status.h"
#include "hif_debug.h"
#include "mp_dev.h"
+#include "ce_api.h"
void hif_dump(struct hif_opaque_softc *hif_ctx, uint8_t cmd_id, bool start)
{
@@ -324,6 +324,11 @@
const char **target_name)
{
struct hif_target_info *info = hif_get_target_info_handle(scn);
+ struct hif_softc *sc = HIF_GET_SOFTC(scn);
+
+ if (sc->bus_type == QDF_BUS_TYPE_USB)
+ hif_usb_get_hw_info(sc);
+
*version = info->target_version;
*revision = info->target_revision;
*target_name = hif_get_hw_name(info);
@@ -455,7 +460,7 @@
scn->hif_init_done = true;
- HIF_TRACE("%s: X OK", __func__);
+ HIF_TRACE("%s: OK", __func__);
return QDF_STATUS_SUCCESS;
}
@@ -888,7 +893,7 @@
return false;
}
-
+#if defined(HIF_PCI) || defined(SNOC) || defined(HIF_AHB)
/**
* hif_batch_send() - API to access hif specific function
* ce_batch_send.
@@ -958,6 +963,7 @@
return ce_send_fast((struct CE_handle *)ce_tx_hdl, nbuf,
transfer_id, download_len);
}
+#endif
/**
* hif_reg_write() - API to access hif specific function
@@ -990,3 +996,19 @@
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
return hif_read32_mb(scn->mem + offset);
}
+
+#if defined(HIF_USB)
+/**
+ * hif_ramdump_handler(): generic ramdump handler
+ * @scn: struct hif_opaque_softc
+ *
+ * Return: None
+ */
+
+void hif_ramdump_handler(struct hif_opaque_softc *scn)
+
+{
+ if (hif_get_bus_type == QDF_BUS_TYPE_USB)
+ hif_usb_ramdump_handler();
+}
+#endif