diff --git a/hif/src/dispatcher/ahb_api.h b/hif/src/dispatcher/ahb_api.h index e53c17545bbb..8ba0c754d2d9 100644 --- a/hif/src/dispatcher/ahb_api.h +++ b/hif/src/dispatcher/ahb_api.h @@ -36,4 +36,11 @@ void hif_ahb_irq_disable(struct hif_softc *scn, int ce_id); void hif_ahb_irq_enable(struct hif_softc *scn, int ce_id); int hif_ahb_dump_registers(struct hif_softc *scn); +int hif_ahb_configure_legacy_irq(struct hif_pci_softc *sc); +int hif_ahb_clk_enable_disable(struct device *dev, int enable); +void hif_ahb_device_reset(struct hif_softc *scn); +int hif_ahb_enable_radio(struct hif_pci_softc *sc, + struct platform_device *pdev, + const struct platform_device_id *id); + #endif diff --git a/hif/src/dispatcher/multibus_ahb.c b/hif/src/dispatcher/multibus_ahb.c index 314d67bb1cf7..b543e8fb420b 100644 --- a/hif/src/dispatcher/multibus_ahb.c +++ b/hif/src/dispatcher/multibus_ahb.c @@ -20,6 +20,7 @@ #include "hif_main.h" #include "multibus.h" #include "ce_main.h" +#include "if_pci.h" #include "ahb_api.h" #include "dummy.h" diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 0601b75d0cfa..03078948f01f 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -61,6 +61,7 @@ #include "targaddrs.h" #include "pci_api.h" +#include "ahb_api.h" /* Maximum ms timeout for host to wake up target */ #define PCIE_WAKE_TIMEOUT 1000 diff --git a/hif/src/snoc/if_ahb.c b/hif/src/snoc/if_ahb.c index d8bf1fb4fc6a..fb795603df0d 100644 --- a/hif/src/snoc/if_ahb.c +++ b/hif/src/snoc/if_ahb.c @@ -31,6 +31,7 @@ #include "if_ahb.h" #include "if_pci.h" #include "ahb_api.h" +#include "pci_api.h" #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) #define IRQF_DISABLED 0x00000020 diff --git a/hif/src/snoc/if_ahb_reset.c b/hif/src/snoc/if_ahb_reset.c index b65edf499f60..5cb1040929cb 100644 --- a/hif/src/snoc/if_ahb_reset.c +++ b/hif/src/snoc/if_ahb_reset.c @@ -64,7 +64,7 @@ static int clk_enable_disable(struct device *dev, const char *str, int enable) __func__, str, PTR_ERR(clk_t)); return -EFAULT; } - if (TRUE == enable) { + if (true == enable) { /* Prepare and Enable clk */ ret = clk_prepare_enable(clk_t); if (ret) { @@ -288,7 +288,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) if (hif_read32_mb(mem_tcsr + haltack_offset) & 0x1) break; - A_MDELAY(1); + qdf_mdelay(1); wait_limit--; } @@ -306,7 +306,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) /* TBD: Check if we should also assert other bits (radio_cold, radio_ warm, radio_srif, cpu_ini) */ - A_MDELAY(1); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(1); /* TBD: Get reqd delay from HW team */ /* Assert radio cold reset */ resetctl = reset_control_get(&pdev->dev, "wifi_radio_cold"); @@ -316,7 +316,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) return; } reset_control_assert(resetctl); - A_MDELAY(1); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(1); /* TBD: Get reqd delay from HW team */ reset_control_put(resetctl); /* Assert radio warm reset */ @@ -327,7 +327,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) return; } reset_control_assert(resetctl); - A_MDELAY(1); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(1); /* TBD: Get reqd delay from HW team */ reset_control_put(resetctl); /* Assert radio srif reset */ @@ -338,7 +338,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) return; } reset_control_assert(resetctl); - A_MDELAY(1); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(1); /* TBD: Get reqd delay from HW team */ reset_control_put(resetctl); /* Assert target CPU reset */ @@ -348,7 +348,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) return; } reset_control_assert(resetctl); - A_MDELAY(10); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(10); /* TBD: Get reqd delay from HW team */ reset_control_put(resetctl); /* Clear gbl_cfg and haltreq before clearing Wifi core reset */ @@ -360,7 +360,7 @@ void hif_ahb_device_reset(struct hif_softc *scn) /* de-assert wifi core reset */ reset_control_deassert(core_resetctl); - A_MDELAY(1); /* TBD: Get reqd delay from HW team */ + qdf_mdelay(1); /* TBD: Get reqd delay from HW team */ /* TBD: Check if we should de-assert other bits here */ reset_control_put(core_resetctl);