qcacmn: Clean up HIF module to remove CONFIG_WIN macros

Replace CONFIG_WIN macro definitions with feature based macros
for HIF module.

Change-Id: I31a3ef0f70d19f838e2dff0db345e765a0aeb84e
CRs-Fixed: 2407222
This commit is contained in:
Akshay Kosigi
2018-11-26 17:02:54 +05:30
committed by nshrivas
parent 3e7e01e645
commit 181b2f52e6
6 changed files with 18 additions and 22 deletions

View File

@@ -0,0 +1 @@
EXTRA_CFLAGS += -DQCA_NAPI_DEF_SCALE_BIN_SHIFT=1

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -129,16 +129,15 @@ struct CE_state;
#ifndef NAPI_YIELD_BUDGET_BASED #ifndef NAPI_YIELD_BUDGET_BASED
#ifdef HIF_CONFIG_SLUB_DEBUG_ON #ifdef HIF_CONFIG_SLUB_DEBUG_ON
#define QCA_NAPI_DEF_SCALE_BIN_SHIFT 1 #define QCA_NAPI_DEF_SCALE_BIN_SHIFT 1
#else /* PERF build */
#ifdef CONFIG_WIN
#define QCA_NAPI_DEF_SCALE_BIN_SHIFT 1
#else #else
#define QCA_NAPI_DEF_SCALE_BIN_SHIFT 4 #ifndef QCA_NAPI_DEF_SCALE_BIN_SHIFT
#endif /* CONFIG_WIN */ #define QCA_NAPI_DEF_SCALE_BIN_SHIFT 4
#endif
#endif /* SLUB_DEBUG_ON */ #endif /* SLUB_DEBUG_ON */
#else /* NAPI_YIELD_BUDGET_BASED */ #else /* NAPI_YIELD_BUDGET_BASED */
#define QCA_NAPI_DEF_SCALE_BIN_SHIFT 2 #define QCA_NAPI_DEF_SCALE_BIN_SHIFT 2
#endif /* NAPI_YIELD_BUDGET_BASED */ #endif /* NAPI_YIELD_BUDGET_BASED */
#define QCA_NAPI_BUDGET 64 #define QCA_NAPI_BUDGET 64
#define QCA_NAPI_DEF_SCALE \ #define QCA_NAPI_DEF_SCALE \
(1 << QCA_NAPI_DEF_SCALE_BIN_SHIFT) (1 << QCA_NAPI_DEF_SCALE_BIN_SHIFT)
@@ -295,6 +294,7 @@ struct hif_config_info {
* @target_type: Target Type * @target_type: Target Type
* @target_revision: Target Revision * @target_revision: Target Revision
* @soc_version: SOC Version * @soc_version: SOC Version
* @hw_name: pointer to hardware name
* *
* Structure to hold target information. * Structure to hold target information.
*/ */

View File

@@ -24,11 +24,9 @@
#ifndef __HIF_PCI_INTERNAL_H__ #ifndef __HIF_PCI_INTERNAL_H__
#define __HIF_PCI_INTERNAL_H__ #define __HIF_PCI_INTERNAL_H__
#ifndef CONFIG_WIN
#ifndef PEER_CACHEING_HOST_ENABLE #ifndef PEER_CACHEING_HOST_ENABLE
#define PEER_CACHEING_HOST_ENABLE 0 #define PEER_CACHEING_HOST_ENABLE 0
#endif #endif
#endif
#define HIF_PCI_DEBUG ATH_DEBUG_MAKE_MODULE_MASK(0) #define HIF_PCI_DEBUG ATH_DEBUG_MAKE_MODULE_MASK(0)
#define HIF_PCI_IPA_UC_ASSIGNED_CE 5 #define HIF_PCI_IPA_UC_ASSIGNED_CE 5
@@ -70,10 +68,6 @@ static void hif_target_dump_access_log(void);
#define EPPING_CE_FLAGS_POLL \ #define EPPING_CE_FLAGS_POLL \
(CE_ATTR_DISABLE_INTR|CE_ATTR_ENABLE_POLL|CE_ATTR_FLAGS) (CE_ATTR_DISABLE_INTR|CE_ATTR_ENABLE_POLL|CE_ATTR_FLAGS)
#ifdef CONFIG_WIN
#define PIPEDIR_INOUT_H2H 4
#endif
#define CE_ATTR_DIAG_FLAGS \ #define CE_ATTR_DIAG_FLAGS \
(CE_ATTR_FLAGS | CE_ATTR_DIAG) (CE_ATTR_FLAGS | CE_ATTR_DIAG)
@@ -791,7 +785,7 @@ static struct CE_pipe_config target_ce_config_wlan_qca8074_pci[] = {
}; };
#define QCA_6290_CE_COUNT 9 #define QCA_6290_CE_COUNT 9
#ifdef CONFIG_WIN #ifdef QCA_6290_AP_MODE
static struct CE_attr host_ce_config_wlan_qca6290[] = { static struct CE_attr host_ce_config_wlan_qca6290[] = {
/* host->target HTC control and raw streams */ /* host->target HTC control and raw streams */
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,}, { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},

View File

@@ -73,14 +73,14 @@ QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info);
#define BYPASS_QMI 0 #define BYPASS_QMI 0
#endif #endif
#ifdef CONFIG_WIN #ifdef ENABLE_10_4_FW_HDR
#if ENABLE_10_4_FW_HDR #if (ENABLE_10_4_FW_HDR == 1)
#define WDI_IPA_SERVICE_GROUP 5 #define WDI_IPA_SERVICE_GROUP 5
#define WDI_IPA_TX_SVC MAKE_SERVICE_ID(WDI_IPA_SERVICE_GROUP, 0) #define WDI_IPA_TX_SVC MAKE_SERVICE_ID(WDI_IPA_SERVICE_GROUP, 0)
#define HTT_DATA2_MSG_SVC MAKE_SERVICE_ID(HTT_SERVICE_GROUP, 1) #define HTT_DATA2_MSG_SVC MAKE_SERVICE_ID(HTT_SERVICE_GROUP, 1)
#define HTT_DATA3_MSG_SVC MAKE_SERVICE_ID(HTT_SERVICE_GROUP, 2) #define HTT_DATA3_MSG_SVC MAKE_SERVICE_ID(HTT_SERVICE_GROUP, 2)
#endif /* ENABLE_10_4_FW_HDR == 1 */
#endif /* ENABLE_10_4_FW_HDR */ #endif /* ENABLE_10_4_FW_HDR */
#endif
QDF_STATUS hif_post_recv_buffers(struct hif_softc *scn); QDF_STATUS hif_post_recv_buffers(struct hif_softc *scn);
static void hif_config_rri_on_ddr(struct hif_softc *scn); static void hif_config_rri_on_ddr(struct hif_softc *scn);
@@ -515,7 +515,7 @@ static struct service_to_pipe target_service_to_ce_map_qcn7605[] = {
#endif #endif
#if (defined(QCA_WIFI_QCA6290)) #if (defined(QCA_WIFI_QCA6290))
#ifdef CONFIG_WIN #ifdef QCA_6290_AP_MODE
static struct service_to_pipe target_service_to_ce_map_qca6290[] = { static struct service_to_pipe target_service_to_ce_map_qca6290[] = {
{ WMI_DATA_VO_SVC, PIPEDIR_OUT, 3, }, { WMI_DATA_VO_SVC, PIPEDIR_OUT, 3, },
{ WMI_DATA_VO_SVC, PIPEDIR_IN , 2, }, { WMI_DATA_VO_SVC, PIPEDIR_IN , 2, },

View File

@@ -62,10 +62,6 @@
*/ */
#define CPU_WARM_RESET_WAR #define CPU_WARM_RESET_WAR
#ifdef CONFIG_WIN
extern int32_t frac, intval, ar900b_20_targ_clk, qca9888_20_targ_clk;
#endif
/* /*
* Top-level interrupt handler for all PCI interrupts from a Target. * Top-level interrupt handler for all PCI interrupts from a Target.
* When a block of MSI interrupts is allocated, this top-level handler * When a block of MSI interrupts is allocated, this top-level handler
@@ -1498,7 +1494,8 @@ static void hif_sleep_entry(void *arg)
#define HIF_HIA_MAX_POLL_LOOP 1000000 #define HIF_HIA_MAX_POLL_LOOP 1000000
#define HIF_HIA_POLLING_DELAY_MS 10 #define HIF_HIA_POLLING_DELAY_MS 10
#ifdef CONFIG_WIN #ifdef QCA_HIF_HIA_EXTND
static void hif_set_hia_extnd(struct hif_softc *scn) static void hif_set_hia_extnd(struct hif_softc *scn)
{ {
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn); struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);

View File

@@ -29,6 +29,10 @@
#include "cepci.h" #include "cepci.h"
#include "ce_main.h" #include "ce_main.h"
#ifdef QCA_HIF_HIA_EXTND
extern int32_t frac, intval, ar900b_20_targ_clk, qca9888_20_targ_clk;
#endif
/* An address (e.g. of a buffer) in Copy Engine space. */ /* An address (e.g. of a buffer) in Copy Engine space. */
#define HIF_MAX_TASKLET_NUM 11 #define HIF_MAX_TASKLET_NUM 11