mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: Remove IHELIUM_BU flag
This flag supports depricated emulation hardware. Remove conditionally compiled code and dummy functions that become unused as a result. Change-Id: Ie21df7e39b196109acfb6b41afc6b8c22fecb822 CRs-Fixed: 958120
This commit is contained in:
parent
79b4af2999
commit
6ccc86afd8
8 changed files with 11 additions and 103 deletions
|
|
@ -112,7 +112,7 @@ CDF_STATUS bmi_done(struct ol_softc *scn)
|
|||
CDF_STATUS status = CDF_STATUS_SUCCESS;
|
||||
hif_claim_device(scn, scn);
|
||||
|
||||
if (IHELIUM_NO_BMI)
|
||||
if (NO_BMI)
|
||||
return status;
|
||||
|
||||
status = bmi_done_local(scn);
|
||||
|
|
@ -175,7 +175,7 @@ CDF_STATUS bmi_download_firmware(struct ol_softc *scn)
|
|||
uint32_t address;
|
||||
int32_t ret;
|
||||
|
||||
if (IHELIUM_NO_BMI)
|
||||
if (NO_BMI)
|
||||
return CDF_STATUS_SUCCESS; /* no BMI for Q6 bring up */
|
||||
|
||||
if (!scn) {
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ CDF_STATUS bmi_firmware_download(struct ol_softc *scn)
|
|||
{
|
||||
CDF_STATUS status;
|
||||
|
||||
if (IHELIUM_NO_BMI)
|
||||
if (NO_BMI)
|
||||
return CDF_STATUS_SUCCESS;
|
||||
|
||||
status = bmi_init(scn);
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ typedef enum _ATH_BIN_FILE {
|
|||
ATH_SETUP_FILE,
|
||||
} ATH_BIN_FILE;
|
||||
|
||||
#if defined(QCA_WIFI_3_0_IHELIUM) || defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
#define IHELIUM_NO_BMI 1
|
||||
#if defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
#define NO_BMI 1
|
||||
#else
|
||||
#define IHELIUM_NO_BMI 0
|
||||
#define NO_BMI 0
|
||||
#endif
|
||||
|
||||
CDF_STATUS bmi_execute(uint32_t address, uint32_t *param,
|
||||
|
|
|
|||
|
|
@ -1812,11 +1812,7 @@
|
|||
|
||||
#define ADRASTEA_A_WIFI_APB_1_A_WFSS_CE_TARGET_HOST_DELTA 0x08
|
||||
#define ADRASTEA_A_SOC_PCIE_PCIE_SCRATCH_2 0x0013005C
|
||||
#ifdef QCA_WIFI_3_0_IHELIUM
|
||||
#define ADRASTEA_A_SOC_CORE_PCIE_INTR_ENABLE_GRP0_Q6_MASK 0xff
|
||||
#else
|
||||
#define ADRASTEA_A_SOC_CORE_PCIE_INTR_ENABLE_GRP0_Q6_MASK 0x0
|
||||
#endif /* QCA_WIFI_3_0_IHELIUM */
|
||||
/* end: Q6 iHelium emulation registers */
|
||||
|
||||
struct targetdef_s adrastea_targetdef = {
|
||||
|
|
|
|||
|
|
@ -1550,7 +1550,7 @@ int hif_set_hia(struct ol_softc *scn)
|
|||
|
||||
HIF_TRACE("%s: E", __func__);
|
||||
|
||||
if (IHELIUM_BU || ADRASTEA_BU)
|
||||
if (ADRASTEA_BU)
|
||||
return CDF_STATUS_SUCCESS;
|
||||
|
||||
#ifdef QCA_WIFI_3_0
|
||||
|
|
@ -1816,13 +1816,6 @@ static int hif_wlan_enable(void)
|
|||
return icnss_wlan_enable(&cfg, mode, QWLAN_VERSIONSTR);
|
||||
}
|
||||
|
||||
#if ((!defined(QCA_WIFI_3_0_IHELIUM) && !defined(QCA_WIFI_3_0_ADRASTEA)) || defined(CONFIG_ICNSS))
|
||||
static inline void cnss_pcie_notify_q6(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Called from PCI layer whenever a new PCI device is probed.
|
||||
* Initializes per-device HIF state and notifies the main
|
||||
|
|
@ -1861,11 +1854,6 @@ int hif_config_ce(hif_handle_t hif_hdl)
|
|||
HIF_ERROR("%s: hif_wlan_enable error = %d", __func__, ret);
|
||||
return CDF_STATUS_NOT_INITIALIZED;
|
||||
}
|
||||
if (IHELIUM_BU) {
|
||||
cnss_pcie_notify_q6();
|
||||
HIF_TRACE("%s: cnss_pcie_notify_q6 done, notice_send= %d",
|
||||
__func__, scn->notice_send);
|
||||
}
|
||||
|
||||
scn->notice_send = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -664,13 +664,6 @@ void hif_pktlogmod_exit(void *hif_ctx)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if ((!defined(QCA_WIFI_3_0_IHELIUM) && !defined(QCA_WIFI_3_0_ADRASTEA)) || defined(CONFIG_ICNSS))
|
||||
static inline void cnss_pcie_notify_q6(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hif_wlan_disable(): call the platform driver to disable wlan
|
||||
*
|
||||
|
|
@ -713,12 +706,6 @@ void hif_disable(void *hif_ctx, enum hif_disable_type type)
|
|||
if (scn->aps_osdev.bdev)
|
||||
hif_disable_bus(scn->aps_osdev.bdev);
|
||||
|
||||
if (IHELIUM_BU) {
|
||||
cnss_pcie_notify_q6();
|
||||
HIF_TRACE("%s: cnss_pcie_notify_q6 done, notice_send= %d",
|
||||
__func__, scn->notice_send);
|
||||
}
|
||||
|
||||
hif_wlan_disable();
|
||||
|
||||
scn->notice_send = false;
|
||||
|
|
|
|||
|
|
@ -73,12 +73,6 @@ bool hif_target_forced_awake(struct ol_softc *scn);
|
|||
#define MAX_NUM_OF_RECEIVES 1000
|
||||
#endif /* SLUB_DEBUG_ON / FEATURE_NAPI */
|
||||
|
||||
#ifdef QCA_WIFI_3_0_IHELIUM
|
||||
#define IHELIUM_BU 1
|
||||
#else
|
||||
#define IHELIUM_BU 0
|
||||
#endif
|
||||
|
||||
#ifdef QCA_WIFI_3_0_ADRASTEA
|
||||
#define ADRASTEA_BU 1
|
||||
#else
|
||||
|
|
@ -101,7 +95,7 @@ bool hif_target_forced_awake(struct ol_softc *scn);
|
|||
#define AR6320_FW_3_2 (0x32)
|
||||
#define ADRASTEA_DEVICE_ID (0xabcd)
|
||||
#define ADRASTEA_DEVICE_ID_P2_E12 (0x7021)
|
||||
#if (defined(QVIT) || defined (QCA_WIFI_3_0_IHELIUM))
|
||||
#if (defined(QVIT))
|
||||
#define QCA6180_DEVICE_ID (0xabcd)
|
||||
#else
|
||||
#define QCA6180_DEVICE_ID (0x041)
|
||||
|
|
|
|||
|
|
@ -100,64 +100,19 @@ struct ce_irq_reg_table {
|
|||
uint32_t irq_status;
|
||||
};
|
||||
|
||||
#if !defined(QCA_WIFI_3_0_IHELIUM) && !defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
#if !defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
static inline void cnss_intr_notify_q6(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(QCA_WIFI_3_0_IHELIUM) && !defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
#if !defined(QCA_WIFI_3_0_ADRASTEA)
|
||||
static inline void *cnss_get_target_smem(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void hif_pci_route_target_interrupt(struct hif_pci_softc *sc)
|
||||
{
|
||||
uint32_t target_cause0, target_cause1, target_cause2;
|
||||
uint32_t *target_smem;
|
||||
struct ol_softc *scn = sc->ol_sc;
|
||||
|
||||
target_smem = (uint32_t *)cnss_get_target_smem();
|
||||
if (!target_smem)
|
||||
return;
|
||||
|
||||
/* disable interrupts */
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_0_ADDRESS, 0);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_1_ADDRESS, 0);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_2_ADDRESS, 0);
|
||||
/* read cause */
|
||||
target_cause0 = hif_read32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_3_ADDRESS);
|
||||
target_cause1 = hif_read32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_4_ADDRESS);
|
||||
target_cause2 = hif_read32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_5_ADDRESS);
|
||||
/* clear cause registers */
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_3_ADDRESS, 0xffffffff);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_4_ADDRESS, 0xffffffff);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_5_ADDRESS, 0xffffffff);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_3_ADDRESS, 0);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_4_ADDRESS, 0);
|
||||
hif_write32_mb(sc->mem +
|
||||
A_SOC_CORE_SCRATCH_5_ADDRESS, 0);
|
||||
/* copy cause value to Q6 */
|
||||
*target_smem = target_cause0;
|
||||
*(target_smem + 1) = target_cause1;
|
||||
*(target_smem + 2) = target_cause2;
|
||||
if (scn->notice_send)
|
||||
cnss_intr_notify_q6();
|
||||
}
|
||||
|
||||
#ifndef QCA_WIFI_3_0_ADRASTEA
|
||||
static inline void hif_pci_route_adrastea_interrupt(struct hif_pci_softc *sc)
|
||||
{
|
||||
|
|
@ -220,18 +175,6 @@ static irqreturn_t hif_pci_interrupt_handler(int irq, void *arg)
|
|||
hif_write32_mb(sc->mem +
|
||||
(SOC_CORE_BASE_ADDRESS |
|
||||
PCIE_INTR_ENABLE_ADDRESS), 0);
|
||||
if (IHELIUM_BU) {
|
||||
if (!hif_read32_mb(sc->mem + PCIE_INTR_CAUSE_ADDRESS)) {
|
||||
hif_pci_route_target_interrupt(sc);
|
||||
|
||||
hif_write32_mb(sc->mem +
|
||||
(SOC_CORE_BASE_ADDRESS |
|
||||
PCIE_INTR_ENABLE_ADDRESS),
|
||||
HOST_GROUP0_MASK);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
}
|
||||
|
||||
hif_write32_mb(sc->mem +
|
||||
(SOC_CORE_BASE_ADDRESS | PCIE_INTR_CLR_ADDRESS),
|
||||
|
|
@ -850,7 +793,7 @@ static void wlan_tasklet(unsigned long data)
|
|||
if (cdf_atomic_read(&scn->link_suspended))
|
||||
goto end;
|
||||
|
||||
if (!IHELIUM_BU && !ADRASTEA_BU) {
|
||||
if (!ADRASTEA_BU) {
|
||||
(irqreturn_t) hif_fw_interrupt_handler(sc->irq_event, scn);
|
||||
if (sc->ol_sc->target_status == OL_TRGET_STATUS_RESET)
|
||||
goto end;
|
||||
|
|
|
|||
Loading…
Reference in a new issue